nipunbatra / ml-teaching

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

Refactoring DT Notebook Code. #26

Closed RahulVC02 closed 7 months ago

RahulVC02 commented 7 months ago

This PR is for issue #3 . I have added the following functions to make the code easier to follow-

  1. create_DT_Regressor (used in the Real Input-Real Output case)
  2. create_graph (uses graphviz and sklearn to draw the decision tree figure)
  3. create_DT_Classifier (used in the Bias-Variance Tradeoff Demo)
  4. create_DT_Classifier_with_graph (used in Bias-Variance Tradeoff Demo on Dataset II)
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

Merged the PR. Thanks @RahulVC02

I had one minor comment on concatenating paths. Might be better to use f-strings or os.path.join

nipunbatra commented 7 months ago

@RahulVC02 can you add YAML with raw format as follows to this and all other notebooks?

Screenshot 2023-12-30 at 15 25 46

This way, they render nicely https://nipunbatra.github.io/ml-teaching/notebooks.html#category=Tutorial

See in contrast: https://nipunbatra.github.io/ml-teaching/notebooks.html#category=

RahulVC02 commented 7 months ago

@RahulVC02 can you add YAML with raw format as follows to this and all other notebooks?

Screenshot 2023-12-30 at 15 25 46

This way, they render nicely https://nipunbatra.github.io/ml-teaching/notebooks.html#category=Tutorial

See in contrast: https://nipunbatra.github.io/ml-teaching/notebooks.html#category=

I have raised another PR incorporating these changes @nipunbatra Sir.