301 - Evaluating keras model using KFold cross validation​

  Рет қаралды 10,376

DigitalSreeni

DigitalSreeni

Күн бұрын

Code generated in the video can be downloaded from here:
github.com/bns...
Direct link: github.com/bns...
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...

Пікірлер: 19
@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?
@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.
@rabieelhakouni1167
@rabieelhakouni1167 Жыл бұрын
how i can use cross validation for models deep learning
@ajay0909
@ajay0909 Жыл бұрын
I thought I know this method until watching this video. You are the best. Thank You Sir
@HiradAbedzadeh
@HiradAbedzadeh Ай бұрын
Thank you sir!
@solar_girl_here
@solar_girl_here 7 ай бұрын
I can't find the csv file anywhere. Can you help me ?
@DigitalSreeni
@DigitalSreeni 7 ай бұрын
Just checked the link I provided in my comments, it still works.
@curiousGoyangi
@curiousGoyangi 6 ай бұрын
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.
@mehek3897
@mehek3897 5 ай бұрын
i love u.
@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?
@vladislavpershin1903
@vladislavpershin1903 Жыл бұрын
Thank you for your work! Сould you please touch upon of the subject of pseudo labels for segmentation🙌
@JAIRAM-hg8en
@JAIRAM-hg8en Жыл бұрын
Hi sir, excellent videos, can u pls try with automatic plant disease detection
@debanjanrana7071
@debanjanrana7071 Жыл бұрын
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 Жыл бұрын
Legit just Trial and Error
@lucianaespindola4726
@lucianaespindola4726 Жыл бұрын
Which books do you recommend?
@ozomata
@ozomata Жыл бұрын
This was sooooooo Helpful in my Research Project. Thanks!
@DigitalSreeni
@DigitalSreeni Жыл бұрын
Glad it was helpful!
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 11 МЛН
отомстил?
00:56
История одного вокалиста
Рет қаралды 7 МЛН
Cross Validation : Data Science Concepts
10:12
ritvikmath
Рет қаралды 38 М.
244 - What are embedding layers in keras?
18:24
DigitalSreeni
Рет қаралды 21 М.
Learn How to Fine-tune SAM 2 with Your Own Data
57:08
Encord
Рет қаралды 3,7 М.
Complete Guide to Cross Validation
29:49
Rob Mulla
Рет қаралды 55 М.
213 - Ensemble of networks for improved accuracy in deep learning
25:31
Machine Learning Tutorial Python 12 - K Fold Cross Validation
25:20
Watching Neural Networks Learn
25:28
Emergent Garden
Рет қаралды 1,3 МЛН