Hyperparameter Tuning

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

КОМЕНТАРІ • 17

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

    Learned a load of small little tricks on Grid Search! Thank You!

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

      same here.How are you ?Ivhope you remenber me.I am student of jigsaw

  • @fanwu281
    @fanwu281 6 років тому +2

    Thank you SOOOOO much!

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

    So near 6:50 you say that "'C': SciPy.stats.expon(scale=100)" maybe was not the best idea. So what would be a random function you would use instead?

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

      Just using uniforms over the space is probably best. If you have not seen it before: random search www.jmlr.org/papers/volume13/bergstra12a/bergstra12a.pdf. This is a pretty classic result that can give some intuition into how to search for parameters.
      n.b. if you are super serious about it you can always look into bayesian hyper parameter search

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

    Feature selection based on linear regression? Come again?

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

      Yup it is a real thing (first link on Google - just thought the title was funny in this reference - towardsdatascience.com/feature-selection-using-regularisation-a3678b71e499). You technically can use Lasso to do feature selection and it was commonly done in the past.
      Admittedly it is a bit old school, but hey I made this video in 2017 ;)
      If interested please let me know if you'd be interested in a more advanced feature selection video (especially with Neural Networks in mind!

  • @marshmallow-u5x
    @marshmallow-u5x 7 років тому

    I got lost at 1:53 . Why did you say twelve?

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

      Good question, I definitely did not explain this well enough!
      Notice in the param grid I have two dictionaries. Grid Search will search through the cross product (all the combinations) of every key in each dictionary.
      The first dictionary has a cross product of 4. And the second has a cross product of 8, so 4+8 goes to 12.
      Sorry for the confusion, hope this helps!

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

    Any suggestions on what to do if the Grid Search takes so long???

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

      You are probably in a situation where you should have a single validation set instead of using cross validation. Honestly just a series of for loops is what I do (unless I'm training a NN)

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

    Hi, I have applied this grid search to my data set but I get the error message "ValueError: Unknown label type: 'continuous". My x_train and y_train data are floats but this grid search accepts integers, any idea how I could overcome this? Kind regards
    ( your video is really helpful by the way!)

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

      Great to hear! It seems like you are trying to feed a regression dataset into a classifier. I would check to make sure you are using a regressor instead of a classifier.

    • @asifpatan
      @asifpatan 6 років тому +1

      Data Talks Yes that was exactly the problem. Thankyou for replying!

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

    Your Videos help a lot..I am new to this field, and hence a confusion, if GridSearch CV has cross validation, and we fit the whole data set (X, y), then why do we need train test split , also if i want to use kfold cross validation instead of the train test split, will it be absurd? i have tested both scenerio and accuracy decreases when train test split is not being used..a little insight please!!

    • @DataTalks
      @DataTalks  6 років тому +1

      Really excellent question. One that I will cover in great detail in my intro to data science class (should be posting them in July). But the short answer is: the validation set (or cross validation) is used to pick between models. The test set is used only once as an estimate of how well the model will perform in the real world (aka in practice).

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

    gosh, you're hot (and smart)