Decision Tree Regression Clearly Explained!

Sdílet
Vložit
  • čas přidán 3. 02. 2021
  • Here, I've explained how to solve a regression problem using Decision Trees in great detail. You'll also learn the math behind splitting the nodes. The next video will show you how to code a decision tree regressor from scratch.
    #machinelearning #datascience
    For more videos please subscribe -
    bit.ly/normalizedNERD
    Decision Tree previous video -
    • Decision Tree Classifi...
    Love my work? Support me -
    www.buymeacoffee.com/normaliz...
    Join our discord -
    / discord
    Facebook -
    / nerdywits
    Instagram -
    / normalizednerd
    Twitter -
    / normalized_nerd

Komentáře • 114

  • @jamiyana4969
    @jamiyana4969 Před 10 dny +1

    Honestly this is the most high end professional video that's so simply explained! Amazing job!

  • @jayo3074
    @jayo3074 Před 2 lety +31

    It looks hard at first but with a good teacher explaining it really is so simple

  • @hannav7125
    @hannav7125 Před 2 lety +6

    Shout out to this dude for the awesome visualization and clearly explanation.

  • @sillem4337
    @sillem4337 Před rokem +8

    This video is next level teachning. Concept presented so clearly and so well. Thank you!

  • @gustavoalcarde
    @gustavoalcarde Před rokem +2

    Thank you so much! Very simple and visual, that's all I needed!

  • @rishabhgarodia410
    @rishabhgarodia410 Před 2 lety +3

    Thanks for these visualizations! Helps a lot

  • @Ivan-cp2hn
    @Ivan-cp2hn Před 2 lety +4

    your explanation is so far the best in youtube up till now. Dont know why the view number and likes counts not that high. But keep doing the great work !

  • @aminbakhtiari3026
    @aminbakhtiari3026 Před rokem +1

    that was quite understandable ! thanks for the good explanation and visualization!

  • @siddhantpathak6289
    @siddhantpathak6289 Před 2 lety +1

    Awesome visualization and explanation, I went through the Github implementation and it seems you are using unique feature values as possible thresholds. How this approach would work for a continuous feature with millions of records, as there will be many unique values to test.
    Possible thresholds in the video were 1 and 2, right? Just checking my understanding.

  • @user-ll8dr9bm5v
    @user-ll8dr9bm5v Před 5 měsíci +4

    Can you explain why X0

    • @Samwka_
      @Samwka_ Před 2 měsíci

      8:24 He explains that the algorithm compares every possible split and finds the one with the best variance reduction. So the y in X0

  • @saigopal5086
    @saigopal5086 Před 11 měsíci +3

    brooooooo this is brilliant, I can't resist myself from pressing the like button, it's such a blessing to have people like you

  • @yashsaxena7754
    @yashsaxena7754 Před rokem +2

    Great explanation! One question though is if the prediction is based on the average value of the target variable in the leaf node, it would mean that all the observations terminating at a node will have the same prediction. Is that right? For e.g., if 10 observations are terminating at a leaf node all will have the same predictions.

  • @yuvikayadav8203
    @yuvikayadav8203 Před 10 měsíci

    Great explanation! Just one doubt that in decision tree classifier we split the nodes until we get pure leaf nodes if hyperparameters are not clearly stated but in the case of regression problems how do it decide when to stop generating the tree if no hyperparameter is defined?

  • @himtyagi9740
    @himtyagi9740 Před 2 lety +1

    What a beautiful lecture..kudos to your efforts

  • @prashantmandare2875
    @prashantmandare2875 Před rokem

    Best explanation of decision tree for regression that I have come across

  • @ckeong9012
    @ckeong9012 Před měsícem

    Awesome. May i know what kind of software you use for the visualization?

  • @akshaypr9164
    @akshaypr9164 Před 2 měsíci

    amazing man!! love your explanation and style

  • @jullienbeaufondcamacho2055
    @jullienbeaufondcamacho2055 Před 8 měsíci

    Excellent visualization, kudos!

  • @razieqilham8327
    @razieqilham8327 Před 2 lety

    So in love with your explanation sir, but im confused with the dataset, could u build a dataset in table, not graph?

  • @persevere1052
    @persevere1052 Před 2 měsíci

    Extremely helpful and easy to understand!

  • @fabianaltendorfer11
    @fabianaltendorfer11 Před 7 měsíci

    one hell of a explanation video. great!

  • @rishiksarkar62
    @rishiksarkar62 Před rokem

    Fabulous explanation sir! Thank you very much!!

  • @mindlessambient1791
    @mindlessambient1791 Před 2 lety

    In the ending example, the weighted average of variance used weights with denominators of 20 (i.e. 11/20, 9/20, etc.) . Has anyone ever thought to adjust these weights using Bessel's correction? Not sure how much of a difference that would make but just curious. I am guessing that the weights would be something like 10/19 and 8/19 with this adjustment.

  • @dgaphysics4026
    @dgaphysics4026 Před 2 měsíci

    Great explanation!

  • @HuyLe-nn5ft
    @HuyLe-nn5ft Před rokem

    You already had 1 more subsciption, Superb explanation and visualization!

  • @yuyang5575
    @yuyang5575 Před 3 lety +12

    This is awesome! Clearly we use a binary tree to do the classification first (or build a decision tree first), and then we follow the tree to reach the target leaf node. Btw, which software do you use to make the animation? very impressive

  • @pratyushrout7904
    @pratyushrout7904 Před rokem

    The nicest explanation video for DT on CZcams...

  • @Rahul.alpha.Mishra
    @Rahul.alpha.Mishra Před 2 měsíci

    Thanks a lot bro. And your viz helped me explain my Model in the presentation. Carry on foreward

  • @diabl2master
    @diabl2master Před 3 měsíci

    What a brilliant video!!

  • @senthil_the_analyst
    @senthil_the_analyst Před 2 lety

    Quality content... I never seen before 💯

  • @jamalnuman
    @jamalnuman Před 2 měsíci

    great presentation

  • @kajalmishra6895
    @kajalmishra6895 Před 2 lety

    I love all your videos.

  • @illan731
    @illan731 Před měsícem

    Great explanation. Feels too simple to have looked up on video, which means it is explained very well.

  • @itsme1674
    @itsme1674 Před rokem

    Wonderful explanation

  • @mihirsheth9918
    @mihirsheth9918 Před 2 lety

    great explaination.thanks

  • @smartshoppingapp3585
    @smartshoppingapp3585 Před 2 lety

    How do you find the best root node. ? Coz in video it's about finding the best split which really helped.
    But how to find the best root node???

  • @leolei9352
    @leolei9352 Před 2 lety

    Really good teaching.

  • @kalpanakadirvel9220
    @kalpanakadirvel9220 Před 2 lety

    Excellent video.. Thank you

  • @kellymarchisio377
    @kellymarchisio377 Před rokem

    Excellent!

  • @polishettysairam6466
    @polishettysairam6466 Před 2 lety

    Its good, can you provide the dataset used here

  • @RohitAlexKoshy
    @RohitAlexKoshy Před 2 lety

    Great video. Keep up the good work!

  • @ahmedelsabagh6990
    @ahmedelsabagh6990 Před 2 lety

    Very good visualizations

  • @osama11osama
    @osama11osama Před 2 měsíci

    I like it really, thanks

  • @soniasnia
    @soniasnia Před 2 lety

    ur video is just awesome!

  • @subarnasubedi7938
    @subarnasubedi7938 Před 8 měsíci

    I am confused why you took x2

  • @nickgeo8250
    @nickgeo8250 Před 10 měsíci

    Really good explanation well done! Only one question, how do you calculate the wi weights?

    • @AidarMHTV
      @AidarMHTV Před 9 měsíci

      The weights, I think, it's just a fraction of items for each side.
      For example, 2 items on left and 6 items on right gives .25 and 0.75 weights respectively.

  • @diegobarrientos6271
    @diegobarrientos6271 Před rokem +3

    Thanks for the explanation!, I have a question... I watched in some videos that use MSE instead of variance, so Should I use the sum of squared error or variance? It'd be great of someone could clarify this please

    • @DaaniaKhalith
      @DaaniaKhalith Před rokem +1

      MSE is used if both input and output is continuous ,variance is for discrete input n continuous output

  • @candicerusser9095
    @candicerusser9095 Před 2 lety +1

    Hi, great video! A small doubt, what does "desired depth" mean in decision tree regressor, does it mean that we reach a point where we can't split anymore, like variance becomes 0?

    • @jakeezetci
      @jakeezetci Před 2 lety

      i think that's the depth of the tree you want, that you need to find by trying out yourself. you want to stop before variance becomes 0, as then the prediction really goes wild

  • @sai_sh
    @sai_sh Před rokem

    Hi at 4:40 why did it go towards left node rather than the right coz x=16 and x

  • @estefvasqu
    @estefvasqu Před 3 lety

    Thank you for sharing your knowledge. We appreciate it
    Greetings from Argentina

  • @SachinModi9
    @SachinModi9 Před rokem

    Man... Loved it..

  • @Nirjhar85
    @Nirjhar85 Před rokem

    Awesome!

  • @samarthtandale9121
    @samarthtandale9121 Před 11 měsíci

    Incredible 🔥

  • @bhavinmoriya9216
    @bhavinmoriya9216 Před 2 lety +7

    Thanks for the video! How do you decide x0

    • @NormalizedNerd
      @NormalizedNerd  Před 2 lety +1

      Actually, we try every possible value of the threshold and find which one produces the best split. If can go through the code for a better understanding. github.com/Suji04/ML_from_Scratch/blob/master/decision%20tree%20regression.ipynb

    • @bhavinmoriya9216
      @bhavinmoriya9216 Před 2 lety

      @@NormalizedNerd Thanks buddy :)

    • @kalam_indian
      @kalam_indian Před 2 lety +1

      @@NormalizedNerd
      you have done well but plz first explain taking an example by showing every steps from first to the last with every maths used and the computation on how we get the results and why this value and not the other etc.
      plz teach like this so that every learner even the one who don't have basic can understand
      it is a request

  • @inderkaur3012
    @inderkaur3012 Před 2 lety +1

    Hi, Though Var R1>Var R2, how do we conclude that R2 is best suited for split? Graphically I understand your logic as the colors are best segregated due to R1, we must choose R1, but I was unable to conclude the same from variance perspective. Could you please explain the same?

    • @konstantinosmaravegias4198
      @konstantinosmaravegias4198 Před rokem +2

      Do not confuse the variance reduction with the variance of each split. VarR1 < VarR2, hence the VarR1 split reduces more variance from the parent node (1 - VarR1 > 1 - Var2)

  • @ckeong9012
    @ckeong9012 Před 3 lety +1

    Awesome. Great video. Much appreciated if you could put the values or labels on the cartesian. TQ~

  • @Mudiaga11
    @Mudiaga11 Před rokem

    this is excellent

  • @XuanTran-ri1hn
    @XuanTran-ri1hn Před 2 lety +1

    Hi, may I ask 1 thing in minute 4:41, because x=16, so I think that condition is not true for x1

    • @explovictinischool2234
      @explovictinischool2234 Před měsícem

      This condition is, indeed, true.
      You may have confused x0 and x1:
      x0 = 16 but x1 = -2. Here, we are talking about x1

  • @Asmallpanda1
    @Asmallpanda1 Před 2 lety

    Very Nice ty

  • @sadjiajfiarei3498
    @sadjiajfiarei3498 Před rokem

    bro you made it so easy

  • @asrjy
    @asrjy Před 3 lety

    Sick vid! Did you use manim to make this video?

  • @ismailwangde580
    @ismailwangde580 Před rokem

    Bro, you are better than krish naik lol. Thank you for the efforts. really appreciate it

  • @madhumatinarule4489
    @madhumatinarule4489 Před 2 lety

    Kindly make full course on fundamentals of machine learning as we are from not from computer science

  • @MrHardgabi
    @MrHardgabi Před 2 lety

    incredible

  • @xINeXuSlx
    @xINeXuSlx Před 3 lety

    Great video! Helping me a lot in preparing for my Data Science exam soon. One thing I did not quite understand yet is when I should use Decision Tree Classification or Regression? I understand that one uses Information Gain and the other Variance Reduction, but how do I know in the first place what to apply?

    • @NormalizedNerd
      @NormalizedNerd  Před 3 lety +1

      It depends on the problem you are trying to solve. As a thumb rule: if the target variable takes continuous values then go for regression and if it takes discrete (and few) values then go for classification.

    • @xINeXuSlx
      @xINeXuSlx Před 3 lety

      @@NormalizedNerd I understand, thanks a lot :)

  • @saqlainshaikh5483
    @saqlainshaikh5483 Před 2 lety

    Great Expectations ✌️

  • @Randomstiontastic
    @Randomstiontastic Před 3 lety +1

    How do you find the value of the inequalities for the filters?

    • @NormalizedNerd
      @NormalizedNerd  Před 3 lety

      By checking every possible value of a feature as the threshold and splitting the dataset based on that. Then taking that particular feature and the corresponding threshold that gives the maximum information gain. Please see the code provided in the next video for more clarity.

  • @akashkundu4520
    @akashkundu4520 Před rokem

    Can you add post prunning of the tree and visual representation of the tree please.I have an assignment 😭

  • @gatecseaspirant-dk9ze

    hello people from the future! you nailed it here

  • @robm838
    @robm838 Před 2 lety

    Which values are -7 and -12 cannot be found on the grid.

  • @alexandrfedorov7297
    @alexandrfedorov7297 Před 10 měsíci

    You are awesome

  • @piero8284
    @piero8284 Před rokem

    Nice explanation, i was struggling a little bit to find some detailed material about this topic. As I thought, decision Trees in general always check for the best split looking for every possible feature, that means if there are k features and n samples, at each split the tree will perform O(m*k) variance computations, right?

    • @p337maB
      @p337maB Před rokem

      It's not O(m*k) but exactly m*k computations at every split.

    • @piero8284
      @piero8284 Před rokem

      @@p337maB sure

  • @sebastiaanvanhassel4664
    @sebastiaanvanhassel4664 Před 3 lety +1

    One extra like for the classical music!!! 👏😀

  • @61_shivangbhardwaj46
    @61_shivangbhardwaj46 Před 3 lety

    Thnx sir😊

  • @tinyeinmoe5147
    @tinyeinmoe5147 Před 18 dny

    you're the best, thank you Soooo much, india is the best

  • @anuragshrivastava7855

    how did we get average

  • @kalam_indian
    @kalam_indian Před 2 lety

    you have done well but plz first explain taking an example by showing every steps from first to the last with every maths used and the computation on how we get the results and why this value and not the other etc.
    plz teach like this so that every learner even the one who don't have basic can understand
    it is a request

  • @tomgt428
    @tomgt428 Před 3 lety

    cool

  • @paultvshow
    @paultvshow Před měsícem

    At 1.28, what you mentioned was misleading and could be misinterpreted. A line is still a line in 2D, a line will never be a plane in 2D. You should have said “or a plane in 3D”, or simply call it a hyperplane instead of a line or plane.

  • @Rehul-gw3yj
    @Rehul-gw3yj Před 10 měsíci

    I actually came here to understand how we get the route note. anyone >?

  • @ronitganguly3318
    @ronitganguly3318 Před rokem

    Dada tumi bangali?😁

  • @DustinGunnells
    @DustinGunnells Před 3 lety

    How are you determining the filter splits further down from the root of the tree? I don't see the reasoning that you're using to make this useful. I see the filtering, I see data points, but what is determining the other filters from the initial filter? Why is the partitioning valuable? How would the partitioning be applied? Why would you have two of the same filter between the two x variables, x sub 0 and x sub 1? Why is x sub zero represented in the root but not x sub 1? What is the relationship/difference between the two x variables? This looks initially useful, then it looks like a bunch of snow on a cathode.

    • @NormalizedNerd
      @NormalizedNerd  Před 3 lety

      "but what is determining the other filters from the initial filter?"
      The initial filter (at root) divides the data into two sets. The left one is then again divided so is the right one. We do this process recursively. While splitting a set we choose the condition that maximizes variance reduction. Please see the implementation to get more clarity: czcams.com/video/P2ZB8c5Ha1Q/video.html

    • @DustinGunnells
      @DustinGunnells Před 3 lety

      @@NormalizedNerd So are you saying that x sub 0 and x sub 1 are two sets of decision sets? Rather, two collections of boundaries? Something still looks off. If it's an array of decision boundaries, how do you jump from 1 (of x sub 0) to -7 and -12 (of x sub 1)? I've even tried to figure out the symmetry in the tree to find logic. 4 elements of x sub 1 3 elements of x sub 0. 20 partitions in the grid for 20 elements in the set. I've watched several of your videos trying to understand your message. Explain this one where it makes sense and I'll definitely continue to watch your other content. I try to give everybody that says they're providing "knowledge" a chance. This is outstandingly bonkers to me. I'm also a programmer and MBA

  • @ccuuttww
    @ccuuttww Před 3 lety

    U spend a lot of time to make an animation

    • @ccuuttww
      @ccuuttww Před 3 lety

      I am not sure if u should use MSE for every split

  • @Gulshankumar-fg9ls
    @Gulshankumar-fg9ls Před rokem

    Bro… I would suggest you to get the proper knowledge when you start teaching any topic in machin learning, sometimes your statement is vague

  • @dnyaneshjalamkar4257
    @dnyaneshjalamkar4257 Před 2 lety

    Your so called autopilot ruined the video!