Machine Learning Tutorial Python - 16: Hyper parameter Tuning (GridSearchCV)

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 369

  • @codebasics
    @codebasics  2 года назад +4

    Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced

  • @gurtejkaur1897
    @gurtejkaur1897 4 года назад +135

    Thank you sir.I also completed your ml course in your previous videos in last year.Now i'm in interview process for getting job,your videos really helped me.I'm a house wife and learning from home (your videos).Thank you a lot.god bless you.

    • @codebasics
      @codebasics  4 года назад +40

      Dear Gurtej Kaur,
      I am glad that my content helped you. Wish you all the best for your future and always believe in yourself. Believe that you can do it. Good luck. 🙏😊

    • @jiyabyju565
      @jiyabyju565 3 года назад

      hai gurtej ...glad to hear it...did you take any other course with it for certificate ? are you working now?

    • @jamesang8735
      @jamesang8735 2 года назад

      Inspirational

  • @codecomedytv1998
    @codecomedytv1998 4 года назад +78

    I learned more in last 5 mins of this video than I have in a week studying on my own

  • @Emmanuel-gf8xv
    @Emmanuel-gf8xv 4 года назад +17

    Thanks for your wonderful tutorials
    Best Model = SVM
    Best parameter = {'C': 10, 'gamma': 'scale', 'kernel': 'rbf'}
    Score = 0.973850 accuracy (97.4%)

  • @kelvinmcanim5005
    @kelvinmcanim5005 2 года назад +3

    Can't really express how lucky I am to have found you. By far the best tutorial on machine learning

  • @udayashangar
    @udayashangar 4 года назад +11

    Hi Dhaval, your tutorials are very informative and very helpful for self learning. Kudos!!!
    Here is some of best score with optimal parameters for the exercise.
    1 svm --> 0.992045 {'C': 10, 'gamma': 'scale', 'kernel': 'rbf', '...
    2 random_forest --> 0.994435 {'criterion': 'gini', 'n_estimators': 100}
    3 logistic_regression --> 0.980114 {'C': 1, 'multi_class': 'auto', 'penalty': 'l1...
    4 GaussianNB--> 0.995225 {}
    5 DecisionTreeClassifier --> 1.000000 {'criterion': 'gini', 'splitter': 'best'}

    • @codebasics
      @codebasics  4 года назад +1

      Wow great score. Good job indeed 👍👏👏👏

    • @anandsiva8765
      @anandsiva8765 2 года назад

      Hi Udayashangar, can you share a link to your notebook?

  • @alexgottlieb1286
    @alexgottlieb1286 2 года назад

    You are a great professor of Deep Machine Learnings! Congrats!

  • @koushikccbp4.0
    @koushikccbp4.0 6 месяцев назад

    Thank you very much sir for teaching this wonderful Machine Learning course. Now I am able to enjoy the ML Models better than earlier. I have found SVM model as best model for digits datasets
    Here are the scores using GridSearchCV
    model best_score best_params
    svm 0.947697 {'C': 1, 'kernel': 'linear'}
    random_forest 0.903757 {'n_estimators': 10}
    logistic_regression 0.922114 {'C': 1}
    gaussian_nb 0.806928 {'var_smoothing': 1e-09}
    multinomial_nb 0.876476 {'alpha': 1000}
    decision_tree 0.732934 {'max_leaf_nodes': 20, 'min_samples_split': 2}

  • @basantgiri346
    @basantgiri346 4 года назад +2

    You got me sir , i was roaming here and there but you covered almost everything in one video thats the spirit sir and salute sir .

    • @codebasics
      @codebasics  4 года назад

      Glad you liked it Basant Girl.

  • @userhandle-u7b
    @userhandle-u7b 7 месяцев назад

    To be honest, I don't understand much the parameters' definition. But also gave it a try. Thanks a lot for this tutorial, sir!!!
    svm 0.973850 {'C': 10, 'gamma': 'scale', 'kernel': 'rbf'}
    random_forest 0.908200 {'n_estimators': 10}
    logistic_regression 0.920446 {'C': 2, 'solver': 'liblinear'}
    GaussianNB 0.806928 {}
    MultinomialNB 0.870350 {}
    Decision_tree 0.784121 {'criterion': 'gini'}

  • @saksham_965
    @saksham_965 6 месяцев назад +1

    Thank You Sir!
    This was my best model for the given exercise:
    Support Vector Machine 0.986084 SVC(C = 1, gamma = 'auto', kernel = 'poly')

  • @theduffrichie2050
    @theduffrichie2050 3 года назад +1

    one line for you: "sophisticated code made simple" . Thank you. was really helpful .

  • @saisanthosh8370
    @saisanthosh8370 2 года назад

    Tbh this is the toughest tutorial in the playlist everything took me around 2-3 hrs a day but this taken around 2 days as we have to see all the parameters and do the tunning and selecting the best model I got SVM as the best model for the digits dataset
    Thank you for giving such a good playlist

  • @yogeshbharadwaj6200
    @yogeshbharadwaj6200 4 года назад

    wow....this is what I was looking for i.e how to compare results of different model with different Parameters....you have consolidated all and shown easy methods.... tks a lot sir....very helpful...

  • @viveksoni3526
    @viveksoni3526 Год назад +1

    Hey Dhaval,
    My sincere thanks to you and the efforts you have taken. I do not have much background in AI and ML, your videos make me feel that even a novice can learn and excel in this field. I am consistently watching your videos and exploring things out. A must series for every learner. Best wishes to you.

  • @snehil9735
    @snehil9735 5 месяцев назад

    Very nice intro , really helped me when I was following an applied ML book and needed to get better understanding than presented in text.Thanks

  • @lukeswift3148
    @lukeswift3148 5 лет назад

    I have doubt on the diff between cross val score & grid search cv for long time. you just solved it in a single video. Excellent work. Thank you very much.

    • @codebasics
      @codebasics  5 лет назад

      John I am really happy that this helped you resolve your doubts 😊

  • @vishnumurali6524
    @vishnumurali6524 4 года назад +1

    The best tutorial I have ever watched... Thank u sir!!!!!

  • @karthigasankarananth5520
    @karthigasankarananth5520 2 года назад

    Really your videos are equal to learning lot of books

  • @justusndegwa
    @justusndegwa 2 года назад

    Thanks so much. I've learnt of GridSearch in a very clear way than I have ever come close to.

  • @vinayraghunath1992
    @vinayraghunath1992 3 года назад

    Wow...Loved the simple explanation....Crisp and Clear....Thanks a lot

  • @flamboyantperson5936
    @flamboyantperson5936 5 лет назад +11

    This is very helpful for increasing accuracy. A good tutorial. Thank you :-)

    • @codebasics
      @codebasics  5 лет назад +2

      Glad you liked it, did you feel out Google form ? I would like to call you buddy

    • @flamboyantperson5936
      @flamboyantperson5936 5 лет назад

      @@codebasics Oh sorry I missed it. I will fill it now.

  • @rajbir_singh0517
    @rajbir_singh0517 4 года назад

    your all videos are very very very very very related to practical worlds. it always gives complete information.

  • @jilhenry
    @jilhenry 3 года назад

    Very Comprehensive Tutorial.
    I did feature scaling before training the models
    Best Model: SVM
    Parameters: {C=10.0, Gamma = 'scale', Kernel = 'rbf'}
    Accuracy Score: 0.9749628597957288, approx 97.5%

  • @bhaskarg8438
    @bhaskarg8438 2 года назад

    Thanks a lot, I got the Scores as
    SVM : {'C': 10, 'gamma': 'scale', 'kernel': 'rbf'} ==> 0.990451
    Logistic_Regression {'C': 1, 'max_iter': 5000, 'multi_class': 'auto' ==> 0.972143
    SVM is the Best

  • @MohammadMahdijadidi
    @MohammadMahdijadidi 7 месяцев назад

    very good for beginners, Logical and classified

  • @bhagirathsinhjadeja2917
    @bhagirathsinhjadeja2917 Год назад

    Inspired by your teaching style sir i am frm india and just joined Intellipaat (IIT Roorkee University) for Data science and Ai , but since mentor is teaching style is not good i have to see your videos to learn even better thanks sir for providing such a valuable and free stuff on youTube i will also join your one of the course of Excel

  • @hackknowledge24
    @hackknowledge24 2 года назад

    Good and nice teaching approach sir and keep uploading like this a good content videos sir

  • @chertify
    @chertify 2 года назад +1

    Your information is GOLD. Thank you for sharing your knowledge (and codes) to us!

  • @MRBAM
    @MRBAM 2 года назад +1

    Very simple and easy way to learn... thank you for your time..🙌🇮🇳

  • @kattamurinagabhushan9879
    @kattamurinagabhushan9879 Год назад

    Great content for learning Machine Learning , Thank You so much sir .. 🙂

  • @swatimudiya8663
    @swatimudiya8663 4 года назад +2

    You make amazing content pls do more so that we can learn more during qurantine

  • @thejsrinivasan820
    @thejsrinivasan820 4 года назад

    It is crisp and clear to follow...

  • @techstackgochannel
    @techstackgochannel 4 года назад

    WOW This is the best explanation for GridSearch CV..Thank you very much SIR

  • @damian-crypto
    @damian-crypto 6 месяцев назад

    Very clear practical explanation.

  • @Ishant875
    @Ishant875 Год назад

    Thanks for such a content, this was very interesting and helpful.

  • @codebasics
    @codebasics  4 года назад +4

    Exercise solution: github.com/codebasics/py/blob/master/ML/15_gridsearch/Exercise/15_grid_search_cv_exercise.ipynb
    Step by step guide on how to learn data science for free: ruclips.net/video/Vn_mmOuQkSA/видео.html
    Machine learning tutorials with exercises:
    ruclips.net/video/gmvvaobm7eQ/видео.html

  • @ElfTRAVELTOUR
    @ElfTRAVELTOUR Год назад

    thanks for sharing, i finally understood the gridsearch!

  • @sathyag2608
    @sathyag2608 3 года назад

    It is really awesome explanation with examples

  • @adityahpatel
    @adityahpatel 3 года назад +1

    The way you explain the code is the best I've seen anyone do it online. Great teaching style! Thanks

  • @artofscience9888
    @artofscience9888 4 месяца назад

    Excellent Video
    Excellent content

  • @vamsikali
    @vamsikali 10 месяцев назад

    Thank you sir. Your videos really helped to understand the concepts well. Thnak you very much.

  • @govinm143
    @govinm143 2 года назад

    thank you, I learned a lot from your video. Only one correct the git code shared missing from sklearn.model_selection import cross_val_score. Thanks again for sharing your knowledge.

  • @69nukeee
    @69nukeee Год назад

    Awesome! You explained a pretty tricky topic very clearly, and also gave plenty of highly usable insight. This video is a gem, thanks for your work!

  • @renjithms6681
    @renjithms6681 3 года назад

    great.I respect you for your nice explanation

  • @tejobhiru1092
    @tejobhiru1092 3 года назад

    thank you so much for the tutorial... youve taken a complete novice like me and taught him quite a great deal about ML
    this will surely be useful in my professional life..
    thank you so so much..!
    by the way, in the exercise, i got best model as SVM with parameters C=1, and kernel = rbf with score as 0.98

    • @codebasics
      @codebasics  3 года назад

      Great to hear! .98 is a great score. well done.

  • @srimannarayanakodem5191
    @srimannarayanakodem5191 4 года назад +1

    Thank you sir ! .Results :
    model best_score best_params
    0 svm 0.980000 {'C': 1, 'kernel': 'rbf'}

  • @benvelloor
    @benvelloor 4 года назад +2

    This has been an amazing series. Thank you so much!

  • @anonymousAsquare
    @anonymousAsquare 2 года назад

    Thank you so much sir, I have learned a lot from you.

  • @SKumar-Munna
    @SKumar-Munna 4 года назад

    Nice explanation sir. I like it. Concept is clear now.

  • @avinashnagar7861
    @avinashnagar7861 4 года назад +1

    Amazing videos Sir, Your selection of easy examples during teaching really helps understand the underlying working of these classes. Thank You.

    • @codebasics
      @codebasics  4 года назад

      Glad you liked it Avinash 😊👍

  • @leamon9024
    @leamon9024 4 года назад +2

    Looking forward to more amazing contents about Machine/Deep Learning in the future.

  • @talented_ignorant
    @talented_ignorant 3 года назад

    So much content in 16min😌..thank you Sir!!!

  • @edgostyn
    @edgostyn 3 года назад

    Thank you very much! A hug from Brazil!

  • @shubhangiagrawal336
    @shubhangiagrawal336 4 года назад

    Thankyou Sir for making such brilliant videos..........

  • @raseswarsahoo1134
    @raseswarsahoo1134 4 года назад

    Loved it..Got nice explanation of the topic..Thank you sir

  • @sakalagamingyt3563
    @sakalagamingyt3563 7 месяцев назад +2

    Best_Model: svm
    Score: 0.947697
    params: {'C': 1, 'kernel': 'linear'}

  • @khachinboonshup9220
    @khachinboonshup9220 2 года назад

    Thnk you so much ,More complex series

  • @subhajitadhikary155
    @subhajitadhikary155 4 года назад

    I think this video is the best among all as it tells which one is the most efficient among all models
    For the exercise part:
    model best_score best_params
    svm 0.973 {'C': 5, 'gamma': 'scale', 'kernel': 'rbf'}
    Random_Forest 0.909870 {'criterion': 'entropy', 'max_features': ''sqrt', 'n_estimators':10}
    Logistic_Regression 0.928233 {'C': 1, 'penalty': 'l1', 'solver': 'liblinear'}
    GaussianNB 0.814157 {'var_smoothing': 2e-09}
    MultinomialNB 0.871464 {'alpha': 2.0}
    Decision_Tree 0.805263 {'criterion': 'entropy', 'splitter': 'best'}

    • @codebasics
      @codebasics  4 года назад +1

      Good job subhajit on exercise 👏👍

    • @jaihind5092
      @jaihind5092 4 года назад

      but if i want to make predictions using this svm model how we can do that??

  • @ricjrob
    @ricjrob 2 года назад

    Thanks for the video. This was so much easier than the training provided on my MSc

  • @shubhamsanu9031
    @shubhamsanu9031 3 года назад

    This was an awesome video, please make more videos like this

  • @sujithramanathan3275
    @sujithramanathan3275 4 года назад

    Dhaval Patel @ codebasics. I am done with your tutorials till now. It's really great. Your videos shows your passion. Heartful thanks to you for providing an Initial step into ML.
    If you can upload more real life project then that would be awesome.
    I would like to request one thing, Please start creating videos for OpenCV. If people are learning from your videos then surely it will be worthy.
    Thanks again !!!

    • @codebasics
      @codebasics  4 года назад

      I am working on more projects. I have one project series coming up pretty soon. Stay tuned

    • @sujithramanathan3275
      @sujithramanathan3275 4 года назад

      @@codebasics Bro really excited... Counting the days 😄😄

  • @soajack
    @soajack 2 года назад

    Amazing explanation ! Thanks !

  • @CMSWisCon
    @CMSWisCon 3 года назад +1

    Thanks! So nicely explained 👍👍

  • @naveenn6255
    @naveenn6255 4 года назад

    Appreciate your efforts sir, nicely explained

  • @lj123-g9d
    @lj123-g9d 9 месяцев назад

    Great explanation

  • @LamNguyen-jp5vh
    @LamNguyen-jp5vh 2 года назад

    Thank you sir! My result for the exercise is svm 0.968842 {'C': 1, 'kernel': 'poly'}, with best_score 96.88%.

  • @samadhemmaty1796
    @samadhemmaty1796 5 лет назад

    you are the best teacher !!!

    • @codebasics
      @codebasics  5 лет назад

      Thanks Samad for your kind words of appreciation

  • @emmanuelbonnet8539
    @emmanuelbonnet8539 4 года назад

    Excellent! Thanks for this tutorial

  • @dok3820
    @dok3820 2 года назад

    Thank you sir...You are a good man.

  • @ayenewyihune
    @ayenewyihune 2 года назад

    Great video, thanks

  • @carlosmoreno4212
    @carlosmoreno4212 4 года назад

    Thank you a lot. Excellent video. Congratulations.

  • @micheleadriaans6688
    @micheleadriaans6688 7 месяцев назад

    Wow, this video was incredibly informative! It not only answered all the questions I had, but also covered additional topics that I hadn’t even considered. The explanations are very easy to understand. Thank you for the great content and for going the extra mile to ensure thorough understanding. Looking forward to more videos like this! Just a quick question I see that when fitting the models which include the GridSearchCV object and later the RandomizedSearchCV object with the training data you used iris.data and iris.target, instead of X_train and y_train. Should it have been X_train and y_train?

  • @robertorolo
    @robertorolo 4 года назад

    Excellent explanation. Thank you very much!

  • @CMusicPro11
    @CMusicPro11 4 года назад

    Very good explanation!

    • @codebasics
      @codebasics  4 года назад

      I am happy this was helpful to you.

  • @golammuhaimeen2825
    @golammuhaimeen2825 3 года назад

    very useful demonstration man! thank you!

  • @rashmir4742
    @rashmir4742 3 года назад

    Thank you so much for making things clear

  • @陳翰儒-d5m
    @陳翰儒-d5m 3 года назад

    Man, you just did it so well, thank you very much.

  • @bnnbnnn4517
    @bnnbnnn4517 2 года назад

    Thank you. You solved my problem

  • @विशालकुमार-छ7त

    Best 4 min from last.

  • @TheSambita20
    @TheSambita20 4 года назад

    Contains very useful information, thanks.

  • @Asoville18
    @Asoville18 2 года назад

    great work. thank you.

  • @manu-prakash-choudhary
    @manu-prakash-choudhary 3 года назад

    In exercise my answer coming is best model : SVM , best_params = { kernel=rbf,C=5 } with best_score of 0.97
    BTW Happy Teachers Day sir 😊😊

  • @asadahmedkhan8089
    @asadahmedkhan8089 2 года назад

    You are a great guy

  • @muhammadroshan7315
    @muhammadroshan7315 3 года назад

    This video was so good and the fact that you gave the code. I subscribed :D

    • @codebasics
      @codebasics  3 года назад

      I am happy this was helpful to you.

  • @mhysh33
    @mhysh33 3 года назад +1

    Thank U sir to add Arabic translation, I appreciate that 😞🙏🏻

  • @ramandeepbains862
    @ramandeepbains862 2 года назад

    for iris dataset svm and logistic_regression results are same for paramters :
    svm 0.980000 {'C': 1, 'kernel': 'rbf'} and
    logistic_regression 0.980000 {'C': 100} ,
    for given exercise for digits dataset the best model is
    svm score and paramters are : 0.947697 {'C': 1, 'kernel': 'linear'} ,
    second best model is : random_forest 0.941586 {'n_estimators': 192}

  • @mishuchoudhary5146
    @mishuchoudhary5146 4 года назад

    thank you sir for such a nice explanation

  • @Sla-og3ii
    @Sla-og3ii 2 года назад

    this was so helpful, thank you!

  • @darshikaverma9170
    @darshikaverma9170 4 года назад

    Awesome video, well explained!!

  • @shubhamkanwal8977
    @shubhamkanwal8977 4 года назад +5

    Using RandomizedCV:-
    LogisticRegression : Best Score =91% , C=1
    RandomForestClassifier: Best Score =94% , n_estimators=100
    DecisionTreeClassifier : Best Score =81% , criterion = entropy
    SVC : Best Score =97%, C=50, gamma =scale, kernel= rbf
    GaussianNB : Best Score =72%, priors=None, var_smoothing=1e-15
    MultinomialNB :Best Score =87%, alpha =0
    Best Classifier =SVM

    • @jaihind5092
      @jaihind5092 4 года назад

      but if i want to make predictions using this svm model how we can do that??

    • @MarsLanding91
      @MarsLanding91 4 года назад

      Do you have your code posted somewhere? Would love to see it.

  • @AhmedSamy-96
    @AhmedSamy-96 3 года назад

    Amazing 🤩❤️

  • @untangledyogi4864
    @untangledyogi4864 2 года назад

    I have visited lots of channels and have bought 2-3 courses, but only this channel could make these concepts clear to me. Thankful to you! @codebasics🏆

  • @shankrukulkarni3234
    @shankrukulkarni3234 4 года назад

    Really good videos

  • @priyankshekhar2454
    @priyankshekhar2454 3 года назад

    Your videos are really quite informative and the exercises are helpful. Thanks !!

  • @vikastangudu8244
    @vikastangudu8244 4 года назад

    you are the best

  • @manishsharma2211
    @manishsharma2211 4 года назад +1

    you are soo good!!

  • @bharathiaswath3770
    @bharathiaswath3770 3 года назад

    Thank you!! It was really helpful. You just explain everything in the right way..😊

  • @kudimaysey2459
    @kudimaysey2459 3 года назад

    great job

  • @aaaa-pr2dd
    @aaaa-pr2dd 4 года назад

    Sir your teaching helps me a lot. Please make a video on pipelines.