301 - Evaluating keras model using KFold cross validation​

Ғылым және технология

Code generated in the video can be downloaded from here:
github.com/bnsreenu/python_fo...
Direct link: github.com/bnsreenu/python_fo...
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
from tensorflow.keras.wrappers.scikit_learn
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
Dataset link: www.kaggle.com/datasets/uciml...

Пікірлер: 18

  • @ajay0909
    @ajay0909 Жыл бұрын

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

  • @eli_m6556
    @eli_m6556 Жыл бұрын

    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!

  • @waynewen4370
    @waynewen4370 Жыл бұрын

    Fantastic video Prof Sreeni, it was really useful!

  • @servatechtips
    @servatechtips Жыл бұрын

    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?

  • @ozomata
    @ozomata11 ай бұрын

    This was sooooooo Helpful in my Research Project. Thanks!

  • @DigitalSreeni

    @DigitalSreeni

    11 ай бұрын

    Glad it was helpful!

  • @vladislavpershin1903
    @vladislavpershin1903 Жыл бұрын

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

  • @harshilkassamkuttiyil2224
    @harshilkassamkuttiyil2224 Жыл бұрын

    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.

  • @rawson_501
    @rawson_501 Жыл бұрын

    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?

  • @rabieelhakouni1167
    @rabieelhakouni1167 Жыл бұрын

    how i can use cross validation for models deep learning

  • @JAIRAM-hg8en
    @JAIRAM-hg8en Жыл бұрын

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

  • @curiousGoyangi
    @curiousGoyangi4 ай бұрын

    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.

  • @debanjanrana7071
    @debanjanrana707111 ай бұрын

    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

  • @theronealmadin1077

    @theronealmadin1077

    10 ай бұрын

    Legit just Trial and Error

  • @mehek3897
    @mehek38973 ай бұрын

    i love u.

  • @lucianaespindola4726
    @lucianaespindola4726 Жыл бұрын

    Which books do you recommend?

  • @solar_girl_here
    @solar_girl_here5 ай бұрын

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

  • @DigitalSreeni

    @DigitalSreeni

    5 ай бұрын

    Just checked the link I provided in my comments, it still works.

Келесі