GridSearchCV- Select the best hyperparameter for any Classification Model

Поділитися
Вставка
  • Опубліковано 17 січ 2025

КОМЕНТАРІ • 133

  • @SamratKar
    @SamratKar 5 років тому +9

    Thank you Krish! This is very detailed, and explains the GridSearchCV pretty clearly. It helped me a lot. Thank you again for your time and efforts in putting this together!

  • @ayushpalak
    @ayushpalak 5 років тому +18

    Such a neat explanation! Keep posting . God bless.

  • @prachiarora7823
    @prachiarora7823 5 років тому +2

    Krish it's a very crisp n clear explanation of SVM. Really helpful and these 18 minutes are worth it.
    Understood the concept. Thanks

  • @akfaisel
    @akfaisel 5 років тому +1

    YT is suggesting this guys videos and they are very simple and understandable

  • @aiz_i564
    @aiz_i564 8 місяців тому

    Game-changer! This is the best explanation! Thanks, Sir! God bless you!

  • @sagaryadav3473
    @sagaryadav3473 5 років тому +4

    Cool ! One of the best example I have seen, the way you explain is just wow :)

  • @harikrishna-harrypth
    @harikrishna-harrypth 3 роки тому

    Krish Naik, you are a Legendary teacher !!! Thanks much for your videos blud!

  • @kingolafff7739
    @kingolafff7739 3 роки тому

    All other youtube channels are a waste of time!
    what a well explained video ;)
    thanks millions of times :*******************

  • @balamurugansanjeevirayar
    @balamurugansanjeevirayar 5 років тому +1

    Very Good explanation of grid search. Clean and neat.

  • @suryameda6215
    @suryameda6215 5 років тому +5

    Very neat and elegant explanation. Thank yo

  • @AshishBangwal
    @AshishBangwal 2 роки тому

    bruh you are the Top G !!! respect

  • @himanshuinca
    @himanshuinca 5 років тому +1

    Wow man. Great example. !! Well Explained with the example and code !

  • @ahmedbouchou6893
    @ahmedbouchou6893 5 років тому +8

    Thank you Krish ! Where can I find a simplified description of each model parameters. Sometimes the python documentation is very hard to understand.

  • @kirangeorge7659
    @kirangeorge7659 4 роки тому +2

    That was a really clear explanation. Thank you!

  • @shivadumnawar7741
    @shivadumnawar7741 4 роки тому +1

    Great tutorial

  • @adeyinkasotunde6870
    @adeyinkasotunde6870 5 років тому +3

    Bravo........ God bless you real good. You really imparted me with this great techniques. Well done sir. Nice one. wow.... cudos....

    • @adeyinkasotunde6870
      @adeyinkasotunde6870 4 роки тому

      I will love to see you teaching us on how to use XGBRegressor for example ( say House Sale price) just like the one on Kaggle.com. Second, I will love to see how to remove outliers and lastly how to normalize or standardize the data set. Thanks. Hope we will see you do something on that very soon. Thanks a lot Sir. More power to your elbow. God bless 🙏.

  • @VamsiKrishna-vg6vd
    @VamsiKrishna-vg6vd 5 років тому +1

    Very cleared explained. Thank u so much.. Keep posting more videos.

  • @mayurkhandeshe4813
    @mayurkhandeshe4813 5 років тому

    very well explained by krish sir .....easy to understand

  • @ibrahimmondal9104
    @ibrahimmondal9104 2 роки тому

    thank u sir.....now I understand how to apply best model under the specifics algo.

  • @KieranBathgate
    @KieranBathgate 4 роки тому

    Krish you're an amazing teacher

  • @jitenkumarsahoo667
    @jitenkumarsahoo667 4 роки тому

    Thanks sir......its properly explained.... couldn't find it in Google or anywhere...

  • @subodhagrawal4087
    @subodhagrawal4087 5 років тому +1

    oh..after seeing the 20 videos, I understand from your explanation.

  • @michaelschlitzer8742
    @michaelschlitzer8742 4 роки тому

    You are a good teacher! You have answered a question for me very succinctly. Thank you so much,

  • @AkshaykumarPatilAkki
    @AkshaykumarPatilAkki 4 роки тому

    Fantastik Explanation Anna... Thank you very much for the Knowledge which you are sharing with us.

  • @lokeshsutrave4906
    @lokeshsutrave4906 5 років тому +1

    Great explanation. Thanks for sharing.

  • @iscream3184
    @iscream3184 5 років тому +1

    you are a life saver

  • @shaiksuleman3191
    @shaiksuleman3191 4 роки тому

    Wow Super.No More Questions asked

  • @csit3093
    @csit3093 Рік тому

    You are a blessing 😊

  • @rambaldotra2221
    @rambaldotra2221 3 роки тому

    Mind Blowing Sir.

  • @KiranKumar-lq4td
    @KiranKumar-lq4td 3 роки тому

    Nice explanation 💯

  • @sharifdmd
    @sharifdmd 5 років тому

    Very excellent detailed explanation ..

  • @shankar3109
    @shankar3109 5 років тому

    It's Crystel Clear... Thanks Krish..

  • @Trouble.drouble
    @Trouble.drouble 4 роки тому

    Superb explanation sir, how to use grid search CV for deep learning models and when to use random search CV

  • @text-book-pages
    @text-book-pages 4 роки тому

    Sir accept my thanks. It was an amazing video

  • @thecosmiccases
    @thecosmiccases 2 роки тому

    Great Explanation

  • @manthanladva6547
    @manthanladva6547 5 років тому

    Thanks a lot brother for the detail explanation . My topic get cleared. Thanks

  • @sandipansarkar9211
    @sandipansarkar9211 4 роки тому

    great explanation.thanks

  • @muhammadsaadmansoor7777
    @muhammadsaadmansoor7777 4 роки тому

    Did I like this video, hell yes. Loved it.

  • @panchaldp
    @panchaldp 4 роки тому

    Good Explanation ...Thanks ...!!

  • @jo1261
    @jo1261 4 роки тому

    Very good explanation! Thank you!

  • @tomtom-wv3hc
    @tomtom-wv3hc 4 роки тому

    Amazing Teacher !!!! Nice and clean explanation :)

  • @amritanigote
    @amritanigote 3 роки тому

    Very Helpful... Thank you!!

  • @saisumantabehera3891
    @saisumantabehera3891 5 років тому +1

    nice explanation Krish, how can we use grid search for multi-label classification problem

  • @usaikiran96
    @usaikiran96 Рік тому

    Please make a separate video on running gridsearchcv on Random Forest algorithm.

  • @arjunpukale3310
    @arjunpukale3310 5 років тому +2

    I think in gridsearch.fit u must give X,y rather than Xtrain, ytrain coz cross validation in gridsearch will divide your entire dataset into train, test .

    • @saxenarachit
      @saxenarachit 5 років тому

      even i think so. Can you pl validate this @Krish Naik

    • @arjunpukale3310
      @arjunpukale3310 5 років тому

      @@saxenarachit no, i realized afterwards that u have to keep xtest for final testing on unseen data. So u can use only remaining dataset that is xtrain for grid search

    • @saxenarachit
      @saxenarachit 5 років тому

      @@arjunpukale3310 ok... In what situation we will use normal cross validation (not of grid search cv) to get the cross val score on whole data (X, y) and whats the purpose. Can you help me steps when to do cross validation on which data and when grid search cv on which data. I am bit confused here.

    • @arjunpukale3310
      @arjunpukale3310 5 років тому +2

      @@saxenarachit see 1st step is to divide your dataset into train and test. And keep the test data untouched till the end. Now you have your train data in your hand on which you have to fit your model. So now decide which model you will use to fit your train data. Suppose u select svm then use grid search on this model(use training data). And this will give you best parameter and cross val score of this model with best parameters. So you dont need to apply cross val again. Now using thise best features from grid search create your svm model and fit it with your train data. And now finally your model is created. So now test your model with unseen data that is your test data and see how well it works on your unseen test data based on accuracy, confusion matrix etc

    • @saxenarachit
      @saxenarachit 5 років тому +2

      @@arjunpukale3310 Thanks for this dear... One more thing - correct me where I am wrong ....
      1- EDA, handling missing data, feature selection, scaling on whole data
      2- Split the data for test and keep until very end using train test split on whole data
      3- Applying algorithms, Imbalance techniques if needed, Handling Over/Underfitting probs. if needed, GridSearch CV to get best params on train data
      4- Make the model with the best algo and best params on train data
      5- Test the model accuracy with different measures
      6- All Good - Deploy the model else goto 1 thru all steps except 2 to gain more accuracy.

  • @rahulsonvane8141
    @rahulsonvane8141 4 роки тому

    Thank you so much, you explained it very nicely :)

  • @kiran082
    @kiran082 4 роки тому

    Thank You Krish

  • @nitinpatil1074
    @nitinpatil1074 5 років тому

    Vary nice explanation

  • @hilalkucuk5
    @hilalkucuk5 2 роки тому

    Excellent

  • @RajKumar-vm2kr
    @RajKumar-vm2kr 5 років тому

    Thank you for making this videos

  • @the_imposter_analyst
    @the_imposter_analyst 5 років тому

    this was so helpful. Been having great difficulty in parameter tuning, this has made it so much better, thank you sir

  • @shanmukhasaratponugupati6308
    @shanmukhasaratponugupati6308 4 роки тому

    A very very very bigggg thanks

  • @sudeshnadutta5702
    @sudeshnadutta5702 4 роки тому +1

    Krish can you please explain the difference between cross validation and gridsearch cross validation? As in how do we use cv or gridsearchcv to select among different models?

  • @luanaleticia2644
    @luanaleticia2644 5 років тому +1

    So great. Thanks!

  • @louerleseigneur4532
    @louerleseigneur4532 3 роки тому

    Thanks Krish

  • @sneha6999
    @sneha6999 4 роки тому +1

    Hi Krish ,
    You are doing an amazing job ,your vidios are really helpful . Could you please tell me why are we not performing sc.fit transform on X_test ?

  • @karanroy-vr1wn
    @karanroy-vr1wn 4 роки тому

    well explained , sir

  • @abdullahmahammadmir5541
    @abdullahmahammadmir5541 2 роки тому

    Really appreciate

  • @Vinit_Ambat
    @Vinit_Ambat 2 роки тому

    Great video!

  • @kingolafff7739
    @kingolafff7739 3 роки тому

    God bless you

  • @write2ruby
    @write2ruby 2 роки тому

    Nice

  • @nagandranathvemishetti9247
    @nagandranathvemishetti9247 3 роки тому

    Hi krish sir can u make a video on applying LDA and perform hyper parameter tuning.

  • @yigitsevim7741
    @yigitsevim7741 4 роки тому

    best vşdeo on the youtube

  • @subbaraogannavarapu7405
    @subbaraogannavarapu7405 4 роки тому

    Hi Krish,
    This is amazing and i have one doubt.. what if we would like to use GridsearchCV for regression Problem? is this the same way we do for regression as well? if not, where it differs.

  • @manulavishvajith4551
    @manulavishvajith4551 4 роки тому

    Hi Krish, great explanation. Thanks. Would you mind giving me an idea of your PC configurations, I plan to build a better PC for my machine learning projects. Basically I'm currently unable to execute high degree polynomial regressions on high dimensions. Would be a great help if you can tell me? Thanks

  • @adityadev2825
    @adityadev2825 4 роки тому

    Awesome

  • @gayatrikvr1111
    @gayatrikvr1111 4 роки тому

    Hi Krish
    How do we choose values for the params_grid?

  • @lopabhattacharjee3845
    @lopabhattacharjee3845 5 років тому

    Very nicely explained. Do you have a similar video for LSTMs with hyperopt or Talos ?

  • @Mustistics
    @Mustistics 2 роки тому

    Thanks for the video. I see you didn't take into account class imbalance, which makes accuracy not very reliable.

  • @rds6484
    @rds6484 5 років тому

    you nailed it man...

  • @sandeepnigam757
    @sandeepnigam757 4 роки тому

    Is this good technique if we are applying feature scaling on test data??

  • @sujithkumar_ga
    @sujithkumar_ga 5 років тому

    U r a genius bro

    • @sujithkumar_ga
      @sujithkumar_ga 5 років тому

      Need u r help !.. am doing an internship they gave me task .. it would be very helpful if u help me plz.. give u r mail id . So that i can contact you

  • @pratheeeeeesh4839
    @pratheeeeeesh4839 4 роки тому

    Wonderful !

  • @_edd.ie_.o.8101
    @_edd.ie_.o.8101 2 роки тому

    Thank you!

  • @bajajchirag123
    @bajajchirag123 5 років тому +1

    How do we get to know that the provided range is the correct? For eg. in the given case, you used the range from 1 to 1000 for C value and for gamma the range was from 0.1 to 0.9. why we haven't taken the range to be .001 to 12130 or anything else for C values and similarly for the gamma values. and there are so many other parameters as well but we considered only these 2.
    Currently, I am trying to use this gridsearchCV on a linear regression model. then what should be the param_grid values I should take. Please provide a pseudo code and explain if possible. Thanks in advance.

    • @subodhagrawal4087
      @subodhagrawal4087 5 років тому

      brother, this was just an example. I real world there will be 100s of values.

    • @arjunpukale3310
      @arjunpukale3310 5 років тому

      U must know the math behind it

  • @yutishah1673
    @yutishah1673 3 роки тому +1

    Hi Krish!
    I have a question, while performing logistic regression when I want to perform gridsearch for hyper parameter tuning, I want to also find precision, F1 score, recall, ROC AUC, etc. So while trying to perform that gridsearch is returning me NAN values. How to handle this situation?

  • @harpreetsandhu7697
    @harpreetsandhu7697 4 роки тому

    can we use it on naive bayes algorithm

  • @kamal6762
    @kamal6762 5 років тому

    I have one doubt that why we only transform the X_test data set not fit first or we have to use fit data(mean and SD) from the X_train?

  • @NR_Tutorials
    @NR_Tutorials 5 років тому

    thanks ... this optimisation for any classification ..?

    • @maYYidtS
      @maYYidtS 5 років тому

      no....every model has different non-default parameters. ex. knn has n_nighbours=10...

  • @oozzar2841
    @oozzar2841 5 років тому

    Is this same for multi classification SVM or not?

  • @maYYidtS
    @maYYidtS 5 років тому

    is that necessary to fit (x_train,y_train)again instead of fit(x,y) at 14:15 because the cv parameter will automatically split the data right?

  • @zee4654
    @zee4654 3 роки тому

    Sir please can you provide a link where to I find the freight travel time prediction Dataset ??? 😔

  • @kushalminachi445
    @kushalminachi445 5 років тому

    Can we use RandomizedSearchCV instead of gridsearchcv?

  • @Ash-bc8vw
    @Ash-bc8vw 3 роки тому

    Hello, can you suggest a good laptop for running machine learning codes
    Or the specification

  • @parikshitrajpara5706
    @parikshitrajpara5706 4 роки тому +1

    hello all

  • @awanishkumar6308
    @awanishkumar6308 4 роки тому

    And could you please tell me that what sections of Big Data and Hadoop is required for Data science and machine learning

  • @karthickkk9427
    @karthickkk9427 2 роки тому

    Thank You Krish, When GridSearchCV is performed on Random Forest, with scoring based on accuracy, best parameters identified seems to be overfit. Training data accuracy= 91% and test data accuracy=81%. Any suggestions to deal with this

  • @deepakgehani
    @deepakgehani 5 років тому

    Hi krish. Can you make a video on hypermetric tuning using grid search on Random Forest Classifier

  • @khanmohammedaamir8900
    @khanmohammedaamir8900 3 роки тому

    But how to know , which parameter we can pass and what type of parameter is not important ?

  • @rashmir4742
    @rashmir4742 3 роки тому

    Thank you

  • @mickaelsgro3370
    @mickaelsgro3370 5 років тому

    hi , please how do u chose "cv=10" in GridSearchCV ? Thanks a lot

  • @teacherHub6723
    @teacherHub6723 4 роки тому

    Thanks u sir

  • @prashantig1205
    @prashantig1205 5 років тому

    Thank you so much! Shift+Tab is not working(jupyter notebook) for me to see the help, any settings need to do?

  • @Kmysiak1
    @Kmysiak1 5 років тому +1

    You the man!

  • @awanishkumar6308
    @awanishkumar6308 4 роки тому

    Hello sir sorry to ask,
    Here we have fitted the model without scaled features (I.e- X_train) then why you have scaled the features using StandardScaler??

  • @ajaykushwaha-je6mw
    @ajaykushwaha-je6mw 3 роки тому

    Hi Sir, after running this code: classifier.fit(X_train,y_train) you are getting various parameter in o/p section but i am getting just one. why sir ?

  • @ajaychhillar1033
    @ajaychhillar1033 6 років тому

    Hey, Krish please make video on Bayesian optimisation for hyperparameter tunning. Thanks in advance

    • @krishnaik06
      @krishnaik06  6 років тому

      Hey Ajay yes I will be uploading both random search and Bayesian optimization techniques in a couple of days

  • @dhairyamehta6277
    @dhairyamehta6277 3 роки тому

    Hey, I had a question, what is C in the parameters passed?

  • @chinnam8053
    @chinnam8053 5 років тому

    Too good..can u please help me in real time??
    How can I contact u personally??

  • @Rishi-fo8qj
    @Rishi-fo8qj 5 років тому

    What if my grid search accuracy itself is not good ?