Decision Tree Regression in Python (from scratch!)

How about creating a decision tree regressor without using sci-kit learn? This video will show you how to code a decision tree to solve regression problems from scratch!
#machinelearning #datascience #python
For more videos please subscribe -
bit.ly/normalizedNERD
Love my work? Support me -
www.buymeacoffee.com/normaliz...
Join our discord -
/ discord
Source code -
github.com/Suji04/ML_from_Scr...
Data source -
archive.ics.uci.edu/ml/datase...
(Donor: Dr Roberto Lopez
robertolopez '@' intelnics.com
Intelnics
Creators: Thomas F. Brooks, D. Stuart Pope and Michael A. Marcolini
NASA)
ML algorithms from scratch -
• ML Algorithms from Scr...
Reference -
machinelearningmastery.com/im...
Facebook -
/ nerdywits
Instagram -
/ normalizednerd
Twitter -
/ normalized_nerd

Пікірлер: 26

  • @dominiquedewet3311
    @dominiquedewet3311 Жыл бұрын

    Just beautiful! Thank you so much for all your effort, it is greatly appreciated!

  • @piyushnashani7162
    @piyushnashani71622 жыл бұрын

    you are doing a great work, the videos are really helpful, keep up the good work!!

  • @NormalizedNerd

    @NormalizedNerd

    2 жыл бұрын

    Thanks a lot!

  • @rishabhjain1418
    @rishabhjain141825 күн бұрын

    Thank you so much for the awesome explanation!

  • @averyiorio4337
    @averyiorio43373 жыл бұрын

    you make videos so quickly, keep up the good work!!!

  • @NormalizedNerd

    @NormalizedNerd

    3 жыл бұрын

    Thanks, will do!

  • @mohandev7385
    @mohandev73852 жыл бұрын

    Please make a video on decision tree using grid search cv and explaining all the hyperparameters of it

  • @Tusharlone-hc4zo
    @Tusharlone-hc4zo Жыл бұрын

    Thank you.

  • @nipunkulshrestha4329
    @nipunkulshrestha4329Ай бұрын

    Please make a complete series on how you create such astonishing animations to explain the concepts ...I think you use manim library of python...It would be of great help

  • @keshia822
    @keshia8223 жыл бұрын

    This is a great video! I have watched all your decision tree videos, but i still wondering how to make decision tree regression or classification if you have categorical data on it?

  • @NormalizedNerd

    @NormalizedNerd

    3 жыл бұрын

    In case of categorical variables the nodes will ask the question like this "if x1 = category 1". Instead of less than equal we'll check equality.

  • @kayodeoyeniran2862

    @kayodeoyeniran2862

    Жыл бұрын

    Do we need to explicitly state the equality condition for categorical feature in the code?

  • @BigNickPoodle

    @BigNickPoodle

    7 ай бұрын

    @@kayodeoyeniran2862 For numerical features you have to check all the unique values of that feature (1,2,3,4,5...) as potential thresholds. For categorical features you do the same but for each category (color=red,color=blue,color=yellow, ...)

  • @amirtaghavy7647
    @amirtaghavy76473 жыл бұрын

    Thanks for the great videos. A question though. To quantify accuracy of your predictions, you use RMSE which is not a dim-less measure of error. I am just wondering about the value of RMSE normalized with mean(Yi). Thanks again.

  • @NormalizedNerd

    @NormalizedNerd

    3 жыл бұрын

    Yeah you can surely do that.

  • @g_arm_
    @g_arm_2 жыл бұрын

    if the max depth is too high, I get a key error during the best split routine. Is there a way to fix that?

  • @_jakiya_hereweare5270
    @_jakiya_hereweare5270 Жыл бұрын

    Hello, very nice video! Is there a way to say this model r2 values is above .7 or something in decision tree regression model? if yes, how we can extract that r2 in case of your given example?

  • @aakashkarmakar7478

    @aakashkarmakar7478

    Жыл бұрын

    You can calculate r2 value for any regression model by simply calculating sum of squares of explained error divided by sum of squares of total error sum of squares of total error (SST)= sum of ( y(actual) - y(mean) )^2 sum of squares of residual error (SSR)= sum of ( y(actual) - y(pred) )^2 r2 = 1 - (SSR/SST)

  • @TTS888
    @TTS888 Жыл бұрын

    beside the airfoil csv, can i apply other data and apply to this model ?

  • @juanrenatojimenezpasache5910
    @juanrenatojimenezpasache5910 Жыл бұрын

    why do you use variance reduction? I see other sources use sum of squared errors for splitting

  • @TheTOMAVITAN
    @TheTOMAVITAN2 жыл бұрын

    can you help me convert the variance_reduction to a calculation of SSR ?

  • @maryamazeez7830
    @maryamazeez78302 жыл бұрын

    hello, I have a problem please, when I wrote the codes jupyter said " invalid syntax" !!!!, for the first codes of partition"class Node'', any help ,please

  • @JimWright1950
    @JimWright19502 жыл бұрын

    Noise is indicative of vibration.

  • @kritiakash
    @kritiakash2 жыл бұрын

    getting error 1 frames

  • @PsynideNeel
    @PsynideNeel3 жыл бұрын

    Where facecam?

  • @NormalizedNerd

    @NormalizedNerd

    3 жыл бұрын

    Will do in future ;)