Тёмный

301 - Evaluating keras model using KFold cross validation​ 

DigitalSreeni
Подписаться 103 тыс.
Просмотров 10 тыс.
50% 1

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...

Наука

Опубликовано:

 

28 мар 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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
@ozomata 10 месяцев назад
This was sooooooo Helpful in my Research Project. Thanks!
@DigitalSreeni
@DigitalSreeni 10 месяцев назад
Glad it was helpful!
@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?
@curiousGoyangi
@curiousGoyangi 3 месяца назад
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.
@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.
@debanjanrana7071
@debanjanrana7071 10 месяцев назад
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
@JAIRAM-hg8en
@JAIRAM-hg8en Год назад
Hi sir, excellent videos, can u pls try with automatic plant disease detection
@lucianaespindola4726
@lucianaespindola4726 Год назад
Which books do you recommend?
@rabieelhakouni1167
@rabieelhakouni1167 Год назад
how i can use cross validation for models deep learning
@mehek3897
@mehek3897 2 месяца назад
i love u.
@solar_girl_here
@solar_girl_here 4 месяца назад
I can't find the csv file anywhere. Can you help me ?
@DigitalSreeni
@DigitalSreeni 4 месяца назад
Just checked the link I provided in my comments, it still works.
Далее
На чем играют ПРО | Standoff 2
07:25
Просмотров 137 тыс.
k-Fold Cross-Validation
15:20
Просмотров 20 тыс.
Complete Guide to Cross Validation
29:49
Просмотров 51 тыс.
All Learning Algorithms Explained in 14 Minutes
14:10
Просмотров 193 тыс.