sklearn Logistic Regression hyperparameter optimization

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 พ.ย. 2024

ความคิดเห็น • 56

  • @KunaalNaik
    @KunaalNaik  2 ปีที่แล้ว +2

    Want to learn Data Science effectively and show confidence during interviews?
    Download the 6 -Step Strategy to master Data Science through now linear methods of learning
    Download Link - kunaalnaik.com/learn-data-science-youtube/

  • @rohitkhan1399
    @rohitkhan1399 ปีที่แล้ว

    Coolll !!!! Very simple and effective sir

  • @Webenefit_Youtube
    @Webenefit_Youtube 4 หลายเดือนก่อน +1

    Thank you so much for the video, very well explained

    • @KunaalNaik
      @KunaalNaik  4 หลายเดือนก่อน

      Glad it was helpful!

  • @apoorva3635
    @apoorva3635 3 ปีที่แล้ว +1

    Thanks. Crisp & clear explanation.

    • @KunaalNaik
      @KunaalNaik  3 ปีที่แล้ว

      Glad it was helpful!

  • @18meiy13
    @18meiy13 3 ปีที่แล้ว +1

    Thank you so much for the video, very well explained with simple words.

  • @rishabhpanesar3683
    @rishabhpanesar3683 3 ปีที่แล้ว +1

    Very Helpful Video!
    Thanks for posting this video! Helped a lot!!

    • @KunaalNaik
      @KunaalNaik  3 ปีที่แล้ว

      I am glad it helped!

  • @ganeshprabhakaran9316
    @ganeshprabhakaran9316 4 ปีที่แล้ว +2

    Simple and neat explanation brother.. sounds great ..Kindly suggest Parameters for Voting classifier

    • @KunaalNaik
      @KunaalNaik  4 ปีที่แล้ว

      Hi Ganesh, I am opening a tight group of learners on whatsapp to actively engage and mentor. You can join if you are interested - bit.ly/DataScience_Kunaal_Whatsapp

    • @KunaalNaik
      @KunaalNaik  4 ปีที่แล้ว

      Will try another video :)

  • @sudaniscience249
    @sudaniscience249 2 ปีที่แล้ว +1

    you saved my life tonight

  • @dok3820
    @dok3820 2 ปีที่แล้ว

    I appreciate your video sir...but may I ask how you chose what you wanted in the parameter grid?

  • @sachink110
    @sachink110 2 ปีที่แล้ว

    Hello Kunaal, Nice informative video. Can I use Randomized search CV for decision tree/SVM/Logistic regression/NLP for checking hyperparameters? If yes, then the same parameter code needs to be put for all, or different parameters should be put in that hyperparameter selection bracket?

  • @amirhosseinrahimi3964
    @amirhosseinrahimi3964 ปีที่แล้ว +2

    Thanks, one queation, after tuining the model and finding the best hyper parameter, it is not necessary to run the model with found best parameter for moel training right? i mean after using GridSearchCV, model is already configured by best parameter? can you please elaborate?

    • @KunaalNaik
      @KunaalNaik  ปีที่แล้ว +1

      Yes, you should rerun the model with the best parameters. In this case, it just uses the best version for the model for doing calculations. (me being lazy :p)

    • @amirhosseinrahimi3964
      @amirhosseinrahimi3964 ปีที่แล้ว +1

      @@KunaalNaik Thanks!
      Si i chose a model, then i found the best parameter, then train the model with best parameter, and finally model.predict.. right?

    • @KunaalNaik
      @KunaalNaik  ปีที่แล้ว +1

      @@amirhosseinrahimi3964 You are right :) what model are you building?

    • @amirhosseinrahimi3964
      @amirhosseinrahimi3964 ปีที่แล้ว +1

      @@KunaalNaik Thaks! in a classification problem, I am using Randomforest, Logistic Regression, and Knn to compare the f1 score...

    • @KunaalNaik
      @KunaalNaik  ปีที่แล้ว

      @@amirhosseinrahimi3964 Which one is best?

  • @AaSinSin137
    @AaSinSin137 3 ปีที่แล้ว +2

    Thank you so much... very much appreciated.

  • @antonis7x
    @antonis7x 3 ปีที่แล้ว +1

    Thank you so much!

  • @CuteCreeperYT
    @CuteCreeperYT หลายเดือนก่อน

    For a project
    I removed multicollinearity and then dis hyperparameter tuning
    Yet accuracy doesnt increase
    Instead it decreased
    Can jt happen?

  • @vishnurajkr3769
    @vishnurajkr3769 3 ปีที่แล้ว +2

    Input contains NaN, infinity or a value too large for dtype('float64'). i got an error like this

    • @KunaalNaik
      @KunaalNaik  3 ปีที่แล้ว

      You might want to do missing value treatment before you run this code. Check this code out - www.kaggle.com/funxexcel/titanic-solution-random-forest

  • @zimelkhan8928
    @zimelkhan8928 2 ปีที่แล้ว +1

    Why you not passed scoring in gridsearchCV ??

    • @KunaalNaik
      @KunaalNaik  2 ปีที่แล้ว

      Most learners get confused about it when using it for the first time :)

  • @ABDULLAHALATIQMARZUQIMARZUKI
    @ABDULLAHALATIQMARZUQIMARZUKI 11 หลายเดือนก่อน

    Question, I reached a penalty 11... so how do I fix that?

  • @ibrahimalhassan5996
    @ibrahimalhassan5996 2 ปีที่แล้ว +1

    What happens if one of the x variables is nominal, for example sex(male/female)?

    • @KunaalNaik
      @KunaalNaik  2 ปีที่แล้ว

      convert it to binary feature and then build the model.

  • @sshahidmalik97
    @sshahidmalik97 2 ปีที่แล้ว +1

    hello sir, i almost used the same param_grid which you showed and i was working in Google Colab and GridSearchCV was fitting different combinations for about 3h 40m. it crashed at the end...what can or should i do to get the results?(my training dataset contained 17145 examples)... thanks

    • @KunaalNaik
      @KunaalNaik  2 ปีที่แล้ว

      Hi Shahid, try reducing the number of combinations. Take only two variations of each parameter and make it run.

  • @rawindersingh4007
    @rawindersingh4007 3 ปีที่แล้ว +2

    Hi there, I am not seeming to get more optimal performance using this, Do you have any idea why?

    • @KunaalNaik
      @KunaalNaik  3 ปีที่แล้ว +2

      You need to apply these strategies:
      1/ Outlier Detection and imputation
      2/ Missing Value Imputation Strategy
      3/ Transformation Strategy
      4/ Cross-Validation Framework
      Iterate by changing the above first and check your performance.

    • @rawindersingh4007
      @rawindersingh4007 3 ปีที่แล้ว +1

      @@KunaalNaik thank you 😇

  • @vishnurajkr3769
    @vishnurajkr3769 3 ปีที่แล้ว +1

    i got error as "Solver lbfgs supports only 'l2' or 'none' penalties, got l1 penalty".

    • @KunaalNaik
      @KunaalNaik  3 ปีที่แล้ว +1

      lbfgs cannot be used with L1 Penalty, that why the error. When you use lbfgs you could remove L1 from it. For others you could use L1.

  • @กฤตนนทองสุทธิ์
    @กฤตนนทองสุทธิ์ ปีที่แล้ว

    Thanks

  • @varuntandon4465
    @varuntandon4465 4 ปีที่แล้ว

    Could hyperparameter tuning cause over fitting on the training data? Shouldn't you use a subset of the data to tune your hyperparameters (a validation set)?

    • @KunaalNaik
      @KunaalNaik  4 ปีที่แล้ว

      Agree, you should use a validation set. That works for a some models like XGBoost, LGB etc... for basic model we just tune with parameters.

  • @harshverma574
    @harshverma574 3 ปีที่แล้ว +1

    What am I doing wrong if after gridsearchcv my accuracy for the model is decreasing!

    • @KunaalNaik
      @KunaalNaik  3 ปีที่แล้ว

      Stir the range of the parameters. It takes a while to get the sweet spot :)

  • @varunchakilam1294
    @varunchakilam1294 4 ปีที่แล้ว +1

    failed to perform for categorical data
    movie review classifier

    • @KunaalNaik
      @KunaalNaik  4 ปีที่แล้ว

      Does it have more than one category? If Yes, then try some other algorithm.

  • @chetanmazumder310
    @chetanmazumder310 4 ปีที่แล้ว

    Why can't see the hyper parameters after dot fit ?

    • @KunaalNaik
      @KunaalNaik  4 ปีที่แล้ว

      Could not get you Chetan?

  • @Mustistics
    @Mustistics 3 ปีที่แล้ว +1

    I thought you'd explain the meaning of the hyperparams.

    • @7polletes
      @7polletes 2 ปีที่แล้ว

      This is much better than that. Amazing trick.

  • @arpitakar3384
    @arpitakar3384 หลายเดือนก่อน

    reached haha