154 - Understanding the training and validation loss curves

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

Loss curves contain a lot of information about training of an artificial neural network. This video goes through the interpretation of various loss curves generated using the Wisconsin breast cancer data set.
archive.ics.uci.edu/ml/datase...)
Code generated in the video can be downloaded from here:
github.com/bnsreenu/python_fo...

Пікірлер: 143

  • @farazshaikh4967
    @farazshaikh49672 жыл бұрын

    Thank you very much for the amazing video. This is one of the most important topic that no body talks about!!

  • @yizhenwu5707
    @yizhenwu57073 жыл бұрын

    Thank you for this helpful video. You are the best teacher!

  • @guillermoalejandrobastianf7330
    @guillermoalejandrobastianf73302 жыл бұрын

    You're the best! Very complex scenarios explained in simple way

  • @dr_flunks
    @dr_flunks3 жыл бұрын

    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
    @ashutoshshinde52673 жыл бұрын

    Benefited immensely learning about the training and validation curves. Thank you!!

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    You're so welcome!

  • @MessiahAtaey
    @MessiahAtaey2 жыл бұрын

    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!

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

    Thanks for sharing how to determine the loss curve. very useful and concise.

  • @nazymsatbekova8863
    @nazymsatbekova88632 жыл бұрын

    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!

  • @soumyabrata111
    @soumyabrata1113 жыл бұрын

    How nicely explained! Thank you so much

  • @vaibhavvaibhav6118
    @vaibhavvaibhav61183 жыл бұрын

    I don't know how exactly to thank you. Simply amazing !!!

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    You're very welcome!

  • @mk2103.
    @mk2103.2 ай бұрын

    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!

  • @satrioyudanto9856
    @satrioyudanto98562 жыл бұрын

    The explanation is so clear for my deeper understanding about underfitting and overfitting phenomenon. Thanks! It's really helpful!

  • @DigitalSreeni

    @DigitalSreeni

    2 жыл бұрын

    You're very welcome!

  • @muiistudio7741
    @muiistudio77413 жыл бұрын

    Amazing explanation!!! Loved it. Thank you.

  • @tymothylim6550
    @tymothylim65502 жыл бұрын

    Thank you very much for the video. Really clear explanations and wonderful slides! :)

  • @Shaan11s
    @Shaan11s2 ай бұрын

    This was so helpful I was struggling to see the big picture here and now I feel much more equipped! Thanks

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

    Thanks a lot this really help me a lot the way you explain small small things in between that really helps

  • @limzisin26
    @limzisin262 жыл бұрын

    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!

  • @alexburger7214
    @alexburger72143 жыл бұрын

    bowed down to you sir ! what a crystal clear explanation

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    You are welcome.

  • @satadrudas3675
    @satadrudas36754 ай бұрын

    Beautifully explained

  • @gauthamsk4040
    @gauthamsk40403 жыл бұрын

    Perfectly Explained... I wish I get teacher like you.

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    Well, you have a teacher like me on KZread :)

  • @ozodbekozodov0609
    @ozodbekozodov060910 ай бұрын

    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!

  • @anuragkumar1015
    @anuragkumar10153 жыл бұрын

    Wow! Best video on this topic.

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

    Clearly explained - much apprecitaed

  • @RajeshSharma-bd5zo
    @RajeshSharma-bd5zo3 жыл бұрын

    Great video, as always amazingly explained!!

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    Thanks!

  • @IrfanKhan-oh7kb

    @IrfanKhan-oh7kb

    2 жыл бұрын

    @@DigitalSreeni Wisconsin breast cancer data set is not available

  • @ZanBor69
    @ZanBor692 жыл бұрын

    Great explanation! Thanks!

  • @lizbethmontiel-ruiz2077
    @lizbethmontiel-ruiz20773 жыл бұрын

    Excellent!! Very Well Explained!!

  • @chouchou2445
    @chouchou24453 жыл бұрын

    thank you again !! where ever i need y you're there ^_^

  • @mathewchan503
    @mathewchan5035 ай бұрын

    very clear and easy to understand video

  • @DigitalSreeni

    @DigitalSreeni

    5 ай бұрын

    Glad you think so!

  • @adithaugustine3251
    @adithaugustine32512 жыл бұрын

    Thank you! This video was very helpful..

  • @extrememike
    @extrememike2 жыл бұрын

    Very good an practical explanation. Yo have another subscriber.

  • @benjaminschnepf7362
    @benjaminschnepf73622 жыл бұрын

    your videos are great! thank u

  • @alricliew714
    @alricliew7143 жыл бұрын

    Well explained the curves.

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

    Thank you for your wonderful clips. Please also teach about epoch and batch size. Thank you

  • @quantumbyte-studios
    @quantumbyte-studios2 жыл бұрын

    Very informative, didn't get bogged down in the code

  • @We.shall.fly1
    @We.shall.fly14 ай бұрын

    This was too helpful.

  • @abderrahmaneherbadji5478
    @abderrahmaneherbadji54783 жыл бұрын

    Very useful video. Thanks a lot.

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    You are welcome

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

    I learnt a lot, thank you!

  • @ebrahimahmedal-rahawe3161
    @ebrahimahmedal-rahawe31613 жыл бұрын

    Thanks a lot sir, for all these information..

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    Always welcome

  • @smoothumut
    @smoothumut3 жыл бұрын

    finally I have understood, thanks a lot

  • @harres8694
    @harres86947 ай бұрын

    very good video my friend, love you

  • @qandos-nour
    @qandos-nour Жыл бұрын

    Very useful , thanks

  • @samarafroz9852
    @samarafroz98523 жыл бұрын

    Awesome tutorial sir

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    Glad you liked it

  • @faez8220
    @faez822015 күн бұрын

    very useful information, ty sir

  • @rupeshnaik7626
    @rupeshnaik76262 жыл бұрын

    thank you so much sir, for this video

  • @thebiggerpicture__
    @thebiggerpicture__2 жыл бұрын

    Thanks, great video!

  • @DigitalSreeni

    @DigitalSreeni

    2 жыл бұрын

    Glad you liked it!

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

    thank you SIR !

  • @nasgaroth1
    @nasgaroth13 жыл бұрын

    Really awesome, keep going that way ;-)

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    Thanks, will do!

  • @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" ♥

  • @eyosiyastibebu6102
    @eyosiyastibebu61023 жыл бұрын

    Thanks sir it's Amazing tutorial !!

  • @DigitalSreeni

    @DigitalSreeni

    3 жыл бұрын

    Most welcome!

  • @alejandrovillalobos1678
    @alejandrovillalobos16783 жыл бұрын

    thank you very much

  • @mohammadhassan5240
    @mohammadhassan52403 жыл бұрын

    perfect I never seen before

  • @Mojtaba.Sirati-Amsheh
    @Mojtaba.Sirati-Amsheh2 жыл бұрын

    Thank you

  • @hilalkucuk5
    @hilalkucuk52 жыл бұрын

    It is brilliant

  • @DigitalSreeni

    @DigitalSreeni

    2 жыл бұрын

    Thanks

  • @saraex8558
    @saraex85582 жыл бұрын

    Thanks 🙏🏼

  • @DigitalSreeni

    @DigitalSreeni

    2 жыл бұрын

    You’re welcome 😊

  • @tilkesh
    @tilkesh2 жыл бұрын

    Thanks

  • @cwumin2105
    @cwumin21052 жыл бұрын

    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

  • @anua7589
    @anua75893 жыл бұрын

    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

    Жыл бұрын

    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
    @cyrilmouttet18563 жыл бұрын

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

  • @teeg-wendezougmore6663
    @teeg-wendezougmore6663 Жыл бұрын

    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!

  • @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?

  • @ImranAhmed-tf6uk
    @ImranAhmed-tf6uk2 жыл бұрын

    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

  • @kannu5039
    @kannu50393 жыл бұрын

    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?

  • @ahmadneishabouri4306
    @ahmadneishabouri43062 жыл бұрын

    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

    5 ай бұрын

    yes! I also wanted to mention this... we shouldn't mix validation and test data! Thank you for the video tho

  • @shankargonti8609
    @shankargonti86093 жыл бұрын

    Can you please provide the ppt of this lecture.

  • @paulntalo1425
    @paulntalo14253 жыл бұрын

    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?

  • @RafiKhalil
    @RafiKhalil2 жыл бұрын

    Thank you, Sir, can you please make a video on Mask RCNN.

  • @arpitpatel7010
    @arpitpatel70102 жыл бұрын

    Excellent explanation, just wondering which IDE you are using?

  • @sharmisthachakrabarti9880

    @sharmisthachakrabarti9880

    Жыл бұрын

    That's Spyder

  • @TheHarpanOnly
    @TheHarpanOnly2 жыл бұрын

    Do you already make video about when to go up the layer or neuron?

  • @DigitalSreeni

    @DigitalSreeni

    2 жыл бұрын

    kzread.info/dash/bejne/lKV2tKeNZ9fImbQ.html

  • @ilhamrizaldywidy744
    @ilhamrizaldywidy7443 жыл бұрын

    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?

  • @vijayasarathir4270
    @vijayasarathir42702 жыл бұрын

    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

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

    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.

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

    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

  • @satinathdebnath5333
    @satinathdebnath53332 жыл бұрын

    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.

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

    what will be the difference between reshuffling and changing random_state

  • @saidokieh2493
    @saidokieh24933 жыл бұрын

    Hello sir how to split the data into 3 dataset pls I need that code could u refers to me ...thanks so much

  • @samuelkandolo1549
    @samuelkandolo15493 ай бұрын

    Which among those plots represent a curve with noise?

  • @389_kavetiupender2
    @389_kavetiupender23 жыл бұрын

    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

    3 жыл бұрын

    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

    3 жыл бұрын

    Thanks alot sir for quick and clear reply.....

  • @ajilisaaliyar3156
    @ajilisaaliyar31563 жыл бұрын

    Sir please add tutorials on interpretable machine learning technique s

  • @skynetpro549
    @skynetpro5492 жыл бұрын

    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?

  • @hirutabera1947
    @hirutabera19473 жыл бұрын

    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 :)

  • @Mojtaba.Sirati-Amsheh
    @Mojtaba.Sirati-Amsheh2 жыл бұрын

    please make a tutorial about transformers for image regression tasks.

  • @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😢

  • @muhammadgulfam1869
    @muhammadgulfam18692 жыл бұрын

    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?

  • @DONTfakeTOshow
    @DONTfakeTOshow2 жыл бұрын

    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.

  • @nerlia2854
    @nerlia285416 күн бұрын

    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?

  • @hemantsah6254
    @hemantsah62542 жыл бұрын

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

  • @emadqalaja246
    @emadqalaja2462 жыл бұрын

    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

  • @pammikumari9726
    @pammikumari97262 жыл бұрын

    Sir I need cascade of two pre-trained deep learning model code plz help me

  • @derejesenay8928
    @derejesenay89283 жыл бұрын

    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.

  • @IrfanKhan-oh7kb
    @IrfanKhan-oh7kb2 жыл бұрын

    Wisconsin breast cancer data set is not available

  • @mahdibelhadi2252
    @mahdibelhadi22522 жыл бұрын

    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.

  • @abdulbareehussein787
    @abdulbareehussein7873 жыл бұрын

    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?

  • @deandevilliers2799
    @deandevilliers27993 жыл бұрын

    No mention of loss rate? xD

  • @zfolwick
    @zfolwick4 ай бұрын

    my validation accuracy is 98%. Submitting a real image to it... Not getting 98% accuracy.

  • @jameshopkins3541
    @jameshopkins35415 ай бұрын

    Understanding nothing from here

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

    Thank you

  • @mubariknoure5057
    @mubariknoure5057Ай бұрын

    Thanks

  • @Shoz_
    @Shoz_8 ай бұрын

    Thank you

Келесі