301 - Evaluating keras model using KFold cross validation​

preview_player
Показать описание
Code generated in the video can be downloaded from here:

We will start with the normal way most of us approach the problem of binary classification using neural networks (deep learning). In this example, we will split our data set the normal way into train and test groups.

Then, we will learn to divide data using K Fold splits.
We will iterate through each split to train and evaluate our model.

Normally, we would use cross_val_score in sklearn to automatically evaluate
the model over all splits and report the cross validation score. But, that method is designed to handle traditional sklearn models such as SVM, RF,
gradient boosting etc. - NOT deep learning models from TensorFlow or pytorch.

Therefore, in order to use cross_val_score, we will find a way to make our
keras model available to the function. This is done using the KerasClassifier

Note that the cross_val_score() function takes the dataset and cross-validation configuration and returns a list of scores calculated for each fold.

Wisconsin breast cancer example
Рекомендации по теме
Комментарии
Автор

The progression of your videos has followed the exact progression of my graduate research over the last 2 years. Whenever I need to learn how to implement something I immediately find a recent video from you. Funny how things work!

eli_m
Автор

I thought I know this method until watching this video. You are the best. Thank You Sir

ajay
Автор

Fantastic video Prof Sreeni, it was really useful!

waynewen
Автор

Very informative Video, this is very cool, I can wait for the next video.
Sorry, Are you going to show another video using an image dataset?

servatechtips
Автор

This was Helpful in my Research Project. Thanks!

ozomata
Автор

Thank you for your work! Сould you please touch upon of the subject of pseudo labels for segmentation🙌

vladislavpershin
Автор

This has been very helpful and thank you so much for that. I have one question though. What if I have an independent test set and i want to test my model's prediction for that set, how do i do it? Every cross validation article/ tutorial I have come across ends with printing the average accuracy. How do I test my model for independent test set?

rawson_
Автор

Hello Sir. Thank you for your work. It would be really helpful if you could implement transformer-based models for segmentation like transunet or segformer.

harshilkassamkuttiyil
Автор

how i can use cross validation for models deep learning

rabieelhakouni
Автор

Very nice explanation! But I had a major query regarding the number of epochs you chose to train the model. How do one decide on that since it can lead to overfitting

debanjanrana
Автор

Hi sir, excellent videos, can u pls try with automatic plant disease detection

JAIRAM-hgen
Автор

Hi prof, could you tell me the python version that you're using? The latest libraries seem to have some compatibility issues, and the cross_val_score did not work for me.

curiousGoyangi
Автор

I can't find the csv file anywhere. Can you help me ?

solar_girl_here