nipunbatra / ml-teaching

https://nipunbatra.github.io/ml-teaching/
5 stars 16 forks source link

Notebook on Hyperparameter Optimization. #27

Closed RahulVC02 closed 7 months ago

RahulVC02 commented 7 months ago

This PR addresses issue #18 .

I am optimizing hyperparameters of Decision Trees for Classification on a Train-Validation-Test split of the MakeMoons dataset. The hyperparameters are as follows-

  1. depth
  2. min_samples_split
  3. criterion

The optimization code is shown in 3 ways-

  1. Nested For loops (uses 1 fold)
  2. Itertools product (uses 1 fold)
  3. Sklearn's GridSearchCV (currently using 5 fold cross-validation on [Train + Val], and accuracies of the best model are reported on [Test])

This is a new notebook and so I've placed it in the "notebooks/hyperparameter-optimisation" location.

review-notebook-app[bot] commented 7 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

nipunbatra commented 7 months ago

Merging. Thanks @RahulVC02