154 - Understanding the training and validation loss curves

  Рет қаралды 106,664

DigitalSreeni

DigitalSreeni

Күн бұрын

Пікірлер: 147
@dr_flunks
@dr_flunks 3 жыл бұрын
This is outstanding. This is the first video to cover an actually useful process for developing a model from scratch in terms of arch decisions. Anyone else know of similar content?
@ashutoshshinde5267
@ashutoshshinde5267 4 жыл бұрын
Benefited immensely learning about the training and validation curves. Thank you!!
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
You're so welcome!
@satrioyudanto9856
@satrioyudanto9856 3 жыл бұрын
The explanation is so clear for my deeper understanding about underfitting and overfitting phenomenon. Thanks! It's really helpful!
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You're very welcome!
@HosseinKianAra
@HosseinKianAra 2 жыл бұрын
Thank you for your wonderful clips. Please also teach about epoch and batch size. Thank you
@nerlia2854
@nerlia2854 3 ай бұрын
what if the number of trains Found 1896 images belonging to 12 classes. test Found 528 images belonging to 12 classes. and validate Found 276 images belonging to 12 classes. what is the epoch, batch size and patience so that the training & val accuracy and Training and val loss plot graphs match and are close together?
@nazymsatbekova8863
@nazymsatbekova8863 2 жыл бұрын
Thank you very much for the video, it is concise and covers a lot of cases for the learning curves. Exactly what i was looking for!
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Great to hear!
@farazshaikh4967
@farazshaikh4967 2 жыл бұрын
Thank you very much for the amazing video. This is one of the most important topic that no body talks about!!
@limotto9452
@limotto9452 2 ай бұрын
Thank you very much sir for the video. You have enlighten me on the model evaluation for neural network. Any advice on optimising the hyperparameters?
@zfolwick
@zfolwick 7 ай бұрын
my validation accuracy is 98%. Submitting a real image to it... Not getting 98% accuracy.
@Messiah-000
@Messiah-000 2 жыл бұрын
Excellent series that covers a lot of important concepts that many tutorials typically do not cover in great detail.
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Glad you think so!
@Johan-b4l
@Johan-b4l Жыл бұрын
If I have a model that has only one dense layer and it immidiately over fits, does it mean that the data is unrepresentative? The trainning loss goes down and val loss goes up immidiately. Sorry for my english.
@tlotlisangnkhase9475
@tlotlisangnkhase9475 Жыл бұрын
what will be the difference between reshuffling and changing random_state
@soumyabrata111
@soumyabrata111 3 жыл бұрын
How nicely explained! Thank you so much
@shankargonti8609
@shankargonti8609 4 жыл бұрын
Can you please provide the ppt of this lecture.
@asraajalilsaeed7435
@asraajalilsaeed7435 Жыл бұрын
Can you state how draw fid metric curve, i know the equation and i can get number score but i cant draw it😢
@mahdibelhadi2252
@mahdibelhadi2252 2 жыл бұрын
Can Loss's value drop to zero?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Loss functions normally minimize a value to zero. In such loss functions, you will get zero loss if the model perfectly fits to the training data. This almost never happens. You will see a very small value but not zero.
@samuelkandolo1549
@samuelkandolo1549 6 ай бұрын
Which among those plots represent a curve with noise?
@ahmadneishabouri4306
@ahmadneishabouri4306 2 жыл бұрын
You mentioned a couple of times to keep changing the random_state in train/test splits and to choose the appropriate model based on their performance to each of these splits. But, doesn't this mean you are leaking information from your test set to train set? This way you'd choose your model while seeing the test set and this may not generalize to other unseen data. I haven't heard all your lectures but probably you are advising to include a separate validation set (train/validation/test) in your split. This would solve this problem and as much as trivial it might sound, it is a big problem in DL in my opinion. Very nice and informative video by the way, thank you!
@alonsomoran1646
@alonsomoran1646 8 ай бұрын
yes! I also wanted to mention this... we shouldn't mix validation and test data! Thank you for the video tho
@yizhenwu5707
@yizhenwu5707 3 жыл бұрын
Thank you for this helpful video. You are the best teacher!
@pammikumari9726
@pammikumari9726 2 жыл бұрын
Sir I need cascade of two pre-trained deep learning model code plz help me
@smoothumut
@smoothumut 3 жыл бұрын
finally I have understood, thanks a lot
@ZaTheZee
@ZaTheZee 8 күн бұрын
Thank you that was really helpful
@IrfanKhan-oh7kb
@IrfanKhan-oh7kb 2 жыл бұрын
Wisconsin breast cancer data set is not available
@faez8220
@faez8220 3 ай бұрын
very useful information, ty sir
@kumala-win
@kumala-win 2 ай бұрын
wow! That is an amusing and clear explanation with justifications, thanks, Dear and keep it up!!
@aomo5293
@aomo5293 2 жыл бұрын
Hi there. After training random foreset regressor on data I got the following scores: model.score(X_train,y_train) 0.88 model.score(X_test,y_test) 0.11 How can we intetpret this result ? Thank y
@emadqalaja246
@emadqalaja246 2 жыл бұрын
when i used your code i have received this error " Input 0 of layer sequential is incompatible with the layer: expected axis -1 of input shape to have value 30 but received input with shape (None, 7)" if you can help me please
@emadqalaja246
@emadqalaja246 2 жыл бұрын
history = model.fit(X_train, y_train ,verbose=1, epochs=50, batch_size=64, validation_data=(X_test, y_test)) in this section
@hemantsah6254
@hemantsah6254 2 жыл бұрын
Good morning sir. I am a research scholar and developing a ANN model. I am using four variables=Y=fx1,x2,x3... Twenty years of long panel data with 24 regions. I am getting problem to select weight and nodes to get training and validation for a good model. How to much weight and nodes should i assign to get a good model? kindly advice me. Thank You sir.....
@muhammadgulfam1869
@muhammadgulfam1869 2 жыл бұрын
So if the validation and training accuracy are almost same .... let's say 62% and don't improve as the training epochs increases. What does that represent? I assumed having validation and training accuracy the same is good but the fact that the accuracy is low like 62% means model doesn't have much to learn? How to improve that?
@ilhamrizaldywidy744
@ilhamrizaldywidy744 3 жыл бұрын
So what is the connection between loss and accuracy.. actually i didn't know how to explain it properly. and then i wanna ask something. i had descent accuracy at 75% and validation at 71%, but my loss is also high, accuracy at 66% and validation at 75%, is that means that my training model isn't good enough?
@mmskawish
@mmskawish Жыл бұрын
I bet you are a professor... Your explanations suffice the surface level understanding and enable to fundamentally understand the concepts... For sure, those concepts could be polished enough to convert them into knowledge after sufficient self-study... In-short, you are a "virtual professor" ♥
@harres8694
@harres8694 10 ай бұрын
very good video my friend, love you
@jerkmeo
@jerkmeo Жыл бұрын
Thanks for sharing how to determine the loss curve. very useful and concise.
@Shaan11s
@Shaan11s 5 ай бұрын
This was so helpful I was struggling to see the big picture here and now I feel much more equipped! Thanks
@skynetpro549
@skynetpro549 2 жыл бұрын
hello sir, sir my training shows only "accuracy and loss" after each step, i want it to show validation loss and validation accuracy after each STEP, can u please help me?
@teeg-wendezougmore6663
@teeg-wendezougmore6663 2 жыл бұрын
Great video. Thanks for sharing. Is it possible to get zero as loss value? I noted on your graphics that the minimum value of loss 0.1. this value can be 0 ?
@KamalkaGermany
@KamalkaGermany Жыл бұрын
Hi, is there a way to train the same model multiple times (for example 10 times) using the same data. Also it would be great if you can make a video for increasing the breadth (filters eg. 8, 16, 32, 64) and the depth (layers eg. 3, 4, 5) and training them 10 times each and then may be take the mean of the say mean_squared_error and plot the bar graph of all the 12 combinations. If there is already a tutorial on this please share the link. Thanks in advance!
@kannu5039
@kannu5039 3 жыл бұрын
Just a question after epoch 100 both the curve is just doesn’t do anything and it’s stable so what does it mean? Should we limit the epoch ? Is 100 epoch already good?
@vijayasarathir4270
@vijayasarathir4270 2 жыл бұрын
thank you so much.as said training accuracy is higher than validation accuracy, but reason why you get validation accuracy higher than training accuracy. If it is so, how to correct it. Thanks in advance
@RajeshSharma-bd5zo
@RajeshSharma-bd5zo 4 жыл бұрын
Great video, as always amazingly explained!!
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Thanks!
@IrfanKhan-oh7kb
@IrfanKhan-oh7kb 2 жыл бұрын
@@DigitalSreeni Wisconsin breast cancer data set is not available
@extrememike
@extrememike 3 жыл бұрын
Very good an practical explanation. Yo have another subscriber.
@RafiKhalil
@RafiKhalil 3 жыл бұрын
Thank you, Sir, can you please make a video on Mask RCNN.
@Ishant875
@Ishant875 7 ай бұрын
This was too helpful.
@mk2103.
@mk2103. 5 ай бұрын
This video is so good. The ideas were clearly explained and shown through the graphs. The examples cover a lot of cases you might encounter! I will definitely recommend to others and rewatch this video if I am ever feeling confused. Thank you so much! You are a great teacher!
@qandos-nour
@qandos-nour Жыл бұрын
Very useful , thanks
@adithaugustine3251
@adithaugustine3251 3 жыл бұрын
Thank you! This video was very helpful..
@kasun611
@kasun611 Жыл бұрын
Thank you for the video. Don't you need to split the data first and then scale - so that test data is not leaked to the model?
@dmz2885
@dmz2885 Жыл бұрын
Thanks a lot this really help me a lot the way you explain small small things in between that really helps
@vaibhavvaibhav6118
@vaibhavvaibhav6118 4 жыл бұрын
I don't know how exactly to thank you. Simply amazing !!!
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
You're very welcome!
@Mojtaba-Sirati-Amsheh
@Mojtaba-Sirati-Amsheh 2 жыл бұрын
please make a tutorial about transformers for image regression tasks.
@ozodbekozodov0609
@ozodbekozodov0609 Жыл бұрын
Great! Very clear and concise, and potentially all pitfalls are well-explained! I would appreciate if you talk about learning rate, batch size and kernel size and their impact on training and validation loss curves. Many thanks!
@quantumbyte-studios
@quantumbyte-studios 2 жыл бұрын
Very informative, didn't get bogged down in the code
@saidokieh2493
@saidokieh2493 3 жыл бұрын
Hello sir how to split the data into 3 dataset pls I need that code could u refers to me ...thanks so much
@TheHarpanOnly
@TheHarpanOnly 2 жыл бұрын
Do you already make video about when to go up the layer or neuron?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
kzbin.info/www/bejne/mKKlg3iKbNmVn7M
@DONTfakeTOshow
@DONTfakeTOshow 2 жыл бұрын
WHen running this Fit with early stopping and model checkpoint to save the best models. from keras.callbacks import EarlyStopping, ModelCheckpoint es = EarlyStopping(monitor='val_loss', mode='min', verbose=1, patience=50) mc = ModelCheckpoint('models/model-{epoch:03d}-{accuracy:03f}-{val_accuracy:03f}.h5', monitor='val_loss', mode='min', ver... I am obtaining an error eyError: 'Failed to format this callback filepath: "models/model-{epoch:03d}-{accuracy:03f}-{val_accuracy:03f}.h5". Reason: \'accuracy\'' any idea why?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Try replacing val_accuracy with val_acc and accuracy with acc. I wonder if you are using different names in your metrics and other locations.
@ajilisaaliyar3156
@ajilisaaliyar3156 3 жыл бұрын
Sir please add tutorials on interpretable machine learning technique s
@masbro1901
@masbro1901 2 жыл бұрын
thank you SIR !
@rupeshnaik7626
@rupeshnaik7626 2 жыл бұрын
thank you so much sir, for this video
@derejesenay8928
@derejesenay8928 3 жыл бұрын
my validation loss is very high and validation accuracy less than training accuracy by 20% but my dataset is small 2164 sentence in Bi-LSTM text classification please help if you are ok
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
For small datasets you will have smaller validation data. That means the validation curves will look a bit bumpy and the accuracy will be lower than training data. This is quite common. Try increasing the amount of validation data. If that doesn't help you need to change the model and try. May be no model can help and you need to acquire more data. Deep learning is great but cannot do miracles, especially for limited data.
@ordealdube14
@ordealdube14 2 жыл бұрын
Clearly explained - much apprecitaed
@mathewchan503
@mathewchan503 8 ай бұрын
very clear and easy to understand video
@DigitalSreeni
@DigitalSreeni 8 ай бұрын
Glad you think so!
@arpitpatel7010
@arpitpatel7010 2 жыл бұрын
Excellent explanation, just wondering which IDE you are using?
@sharmisthachakrabarti9880
@sharmisthachakrabarti9880 2 жыл бұрын
That's Spyder
@Shoz_
@Shoz_ 11 ай бұрын
Thank you
@abdulbareehussein787
@abdulbareehussein787 3 жыл бұрын
hay :i got this - loss: 0.6026 - accuracy: 0.8960 loss: 1.1142 - accuracy: 0.7748 ist this overfitting?
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
How can you tell if it is overfitting by looking at loss and accuracy at one data point?
@abdulbareehussein787
@abdulbareehussein787 3 жыл бұрын
@@DigitalSreeni i mean , if we have Acuuracy 0.90 and loss is 1.8, is this then an Overfitting?
@suphotnarapong355
@suphotnarapong355 Жыл бұрын
Thank you
@mubariknoure5057
@mubariknoure5057 4 ай бұрын
Thanks
@Mojtaba-Sirati-Amsheh
@Mojtaba-Sirati-Amsheh 2 жыл бұрын
Thank you
@ImranAhmed-tf6uk
@ImranAhmed-tf6uk 2 жыл бұрын
Can you please make a video lecture on K-fold cross validation and evaluation on test datasets with example code. Please explain from scratch, how to split datasets and everything with example. thanks in advance. Your lectures are very helpful to learn. Great work.
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Will try
@benjaminschnepf7362
@benjaminschnepf7362 2 жыл бұрын
your videos are great! thank u
@guillermoalejandrobastianf7330
@guillermoalejandrobastianf7330 2 жыл бұрын
You're the best! Very complex scenarios explained in simple way
@tilkesh
@tilkesh 2 жыл бұрын
Thanks
@muiistudio7741
@muiistudio7741 3 жыл бұрын
Amazing explanation!!! Loved it. Thank you.
@jameshopkins3541
@jameshopkins3541 8 ай бұрын
Understanding nothing from here
@منةالرحمن
@منةالرحمن 3 жыл бұрын
thank you again !! where ever i need y you're there ^_^
@cwumin2105
@cwumin2105 3 жыл бұрын
Hi Sir. I have a questions regarding the loss. Which should we check the loss in normal practice? loss per epoch or loss per batch? thanks
@hirutabera1947
@hirutabera1947 3 жыл бұрын
what it show i got training accuracy of 1.0 and testing accuracy of 0.99 is it good or correct
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
It shows that you are getting awesome results :)
@gauthamsk4040
@gauthamsk4040 3 жыл бұрын
Perfectly Explained... I wish I get teacher like you.
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Well, you have a teacher like me on KZbin :)
@tymothylim6550
@tymothylim6550 3 жыл бұрын
Thank you very much for the video. Really clear explanations and wonderful slides! :)
@deandevilliers2799
@deandevilliers2799 3 жыл бұрын
No mention of loss rate? xD
@satinathdebnath5333
@satinathdebnath5333 2 жыл бұрын
Thank you very much for delivering very detailed and informative videos. I have a doubt from last good fit slide. I understand that the length of training loss should be always greater than validation loss. However, sometimes I see that with some parameter changes such as validation split or batch size the training and validation loss curves toggles. So, training loss curve become shorter than validation loss curve. Could you please hint me what mistake I am doing? If anyone can clear my doubt it would be highly appreciated too. Thanks once again.
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
I am not sure what you mean by training curves being shorter than validation curves. They both should be of the same length as the x-axis represents epoch number and you'd get some values for training / validation for each epoch.
@satinathdebnath5333
@satinathdebnath5333 2 жыл бұрын
@@DigitalSreeni I meant to say training loss curve and validation loss curve. Do they need to have same length on the graph or Training loss curve is usually longer than validation loss curve. From online, I see that validation loss curve tip start after sometime from the start of Training loss curve.
@389_kavetiupender2
@389_kavetiupender2 4 жыл бұрын
Nice video. I have doubt .. I'm working on a cnn model... Should I use training and testing dataset or training, validation and testing dataset?? I'm waiting for your ans
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
I divide my data into training, validation, and testing. I use training and validation during training where I track the loss curves and I use testing data to verify accuracy after the training process.
@389_kavetiupender2
@389_kavetiupender2 4 жыл бұрын
Thanks alot sir for quick and clear reply.....
@limzisin26
@limzisin26 2 жыл бұрын
Thank you so much sir. All of your videos really taught me a lot during my journey of completing my FYP!!!
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Great to hear!
@alricliew714
@alricliew714 3 жыл бұрын
Well explained the curves.
@pythonbrothersandfamily
@pythonbrothersandfamily 2 жыл бұрын
I learnt a lot, thank you!
@ZanBor69
@ZanBor69 3 жыл бұрын
Great explanation! Thanks!
@paulntalo1425
@paulntalo1425 3 жыл бұрын
Thank you for such a rich and practical example. Which IDE are you using
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Spyder IDE, part of Anaconda package.
@paulntalo1425
@paulntalo1425 3 жыл бұрын
@@DigitalSreeni am two months into learning data science. I am using jupyter Notebook using pip3 and not anaconda. So is Anaconda always a better choice?
@satadrudas3675
@satadrudas3675 7 ай бұрын
Beautifully explained
@anuragkumar1015
@anuragkumar1015 3 жыл бұрын
Wow! Best video on this topic.
@alejandrovillalobos1678
@alejandrovillalobos1678 3 жыл бұрын
thank you very much
@lizbethmontiel-ruiz2077
@lizbethmontiel-ruiz2077 3 жыл бұрын
Excellent!! Very Well Explained!!
@abderrahmaneherbadji5478
@abderrahmaneherbadji5478 4 жыл бұрын
Very useful video. Thanks a lot.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
You are welcome
@alexburger7214
@alexburger7214 3 жыл бұрын
bowed down to you sir ! what a crystal clear explanation
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You are welcome.
@ebrahimahmedal-rahawe3161
@ebrahimahmedal-rahawe3161 3 жыл бұрын
Thanks a lot sir, for all these information..
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Always welcome
@anua7589
@anua7589 3 жыл бұрын
Thank you for the informative video! For the splitting of the data, can we consider a stratified split to get a more representative train and test sample? i.e. X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.25, random_state = 42, stratify=Y)
@mostafaessam3994
@mostafaessam3994 2 жыл бұрын
Hey Could elaborate more how to do stratify sampling ? If we have 9 units (engine data) and we take 6 of them to train the model and 3 of them to test the model Appriciate your reply.
@cyrilmouttet1856
@cyrilmouttet1856 3 жыл бұрын
Thank you! I was wondering what to do if train and validation converges at Epoch x (like a good fit at 26:40) and Loss doesn't decrease anymore for many more Epochs. Should we try adding epochs till it starts to overfit or stop learning at the first epochs having the lowest Loss?
@julianaELF1D
@julianaELF1D Жыл бұрын
Should have just stopped learning at the first lowest loss. This trick can be performed by keras early stopping... but you need to wait for 10 to 20 epochs to see that your model has absolutely gotten the optimal result (will not overfit and training and validation already nearly constant zero)...
@thebiggerpicture__
@thebiggerpicture__ 3 жыл бұрын
Thanks, great video!
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Glad you liked it!
@hilalkucuk5
@hilalkucuk5 2 жыл бұрын
It is brilliant
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Thanks
@nasgaroth1
@nasgaroth1 3 жыл бұрын
Really awesome, keep going that way ;-)
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Thanks, will do!
@pioner40
@pioner40 3 ай бұрын
Thanks
@DigitalSreeni
@DigitalSreeni 2 ай бұрын
Thank you
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19
Win This Dodgeball Game or DIE…
00:36
Alan Chikin Chow
Рет қаралды 38 МЛН
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 2 МЛН
AI Basics: Accuracy, Epochs, Learning Rate, Batch Size and Loss
10:55
Prof. Ryan Ahmed
Рет қаралды 21 М.
136 understanding deep learning parameters batch size
11:38
DigitalSreeni
Рет қаралды 31 М.
Mastering Hyperparameter Tuning with Optuna: Boost Your Machine Learning Models!
28:15
The Wrong Batch Size Will Ruin Your Model
7:04
Underfitted
Рет қаралды 17 М.
MIT Introduction to Deep Learning | 6.S191
1:09:58
Alexander Amini
Рет қаралды 593 М.
145 - Confusion matrix,  ROC and AUC in machine learning
25:00
DigitalSreeni
Рет қаралды 33 М.
Why Neural Networks can learn (almost) anything
10:30
Emergent Garden
Рет қаралды 1,2 МЛН
141 - Regression using Neural Networks and comparison to other models
21:47
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19