Tutorial 37: Entropy In Decision Tree Intuition

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ส.ค. 2019
  • Entropy gives measure of impurity in a node. In a decision tree building process, two important decisions are to be made - what is the best split(s) and which is the best variable to split a node.
    amazon url: www.amazon.in/Hands-Python-Fi...
    Buy the Best book of Machine Learning, Deep Learning with python sklearn and tensorflow from below
    amazon url:
    www.amazon.in/Hands-Machine-L...
    Connect with me here:
    Twitter: / krishnaik06
    Facebook: / krishnaik06
    instagram: / krishnaik06
    Subscribe my unboxing Channel
    / @krishnaikhindi
    Below are the various playlist created on ML,Data Science and Deep Learning. Please subscribe and support the channel. Happy Learning!
    Deep Learning Playlist: • Tutorial 1- Introducti...
    Data Science Projects playlist: • Generative Adversarial...
    NLP playlist: • Natural Language Proce...
    Statistics Playlist: • Population vs Sample i...
    Feature Engineering playlist: • Feature Engineering in...
    Computer Vision playlist: • OpenCV Installation | ...
    Data Science Interview Question playlist: • Complete Life Cycle of...
    You can buy my book on Finance with Machine Learning and Deep Learning from the below url
    amazon url: www.amazon.in/Hands-Python-Fi...
    🙏🙏🙏🙏🙏🙏🙏🙏
    YOU JUST NEED TO DO
    3 THINGS to support my channel
    LIKE
    SHARE
    &
    SUBSCRIBE
    TO MY TH-cam CHANNEL

ความคิดเห็น • 117

  • @shivadumnawar7741
    @shivadumnawar7741 3 ปีที่แล้ว +21

    One of the great teacher in the Machine Learning field. You are my best teacher in ML.Thank you so much sir for spreading your knowledge.

  • @SALESENGLISH2020
    @SALESENGLISH2020 4 ปีที่แล้ว +86

    I checked all the codes in your book. Everything works like charm. I can guess that you have mastered Machine Learning by struggling through it. Those who are spoon-fed cannot be half as good as you. Great job! We wish you all the success.

    • @mackjagger602
      @mackjagger602 2 ปีที่แล้ว

      @Nikolas Adrien instablaster =)

    • @nikolasadrien5284
      @nikolasadrien5284 2 ปีที่แล้ว

      @Mack Jagger i really appreciate your reply. I got to the site through google and im waiting for the hacking stuff now.
      Takes quite some time so I will reply here later when my account password hopefully is recovered.

    • @nikolasadrien5284
      @nikolasadrien5284 2 ปีที่แล้ว +1

      @Mack Jagger It worked and I finally got access to my account again. Im so happy:D
      Thank you so much you really help me out !

    • @mackjagger602
      @mackjagger602 2 ปีที่แล้ว

      @Nikolas Adrien You are welcome :)

    • @AjayKumar-id7mb
      @AjayKumar-id7mb 2 ปีที่แล้ว

      @@nikolasadrien5284 gmail reset password

  • @rchilumuri
    @rchilumuri 3 ปีที่แล้ว +2

    You are doing an awesome job with our expecting returns. good job Krish, You just nail down the concepts in a line or two thats the way i like it.

  • @yamika.
    @yamika. 2 ปีที่แล้ว +2

    thank you. we all need teachers like you. god bless you. you're a blessing for us college students who are struggling with offline colleges after the reopening.

  • @ayberkctis
    @ayberkctis 3 ปีที่แล้ว +1

    You clearly explain the mathematics of machine learning algorithms! Thank you for your effort.

  • @aaroncode2634
    @aaroncode2634 4 ปีที่แล้ว +10

    This is what I was looking for. Thank you so much for making this video. Eagerly wait for video on information gain. Please keep going 🙏

  • @mdrashidansari7476
    @mdrashidansari7476 4 ปีที่แล้ว +2

    You cleared my all doubts about Entropy..... Excellent Explanation 😍😍😍😍

  • @keamogetsethaoge6688
    @keamogetsethaoge6688 4 ปีที่แล้ว +1

    Thank you Thank you Thank youuuuu!! After this I am ready for my test tomorrow.... You are boss with these concepts!!.. Please keep making more. I''ll definitely subscribe and share with friends.

  • @143balug
    @143balug 4 ปีที่แล้ว

    Thank you so much for providing the videos with detail explanations.

  • @sandipansarkar9211
    @sandipansarkar9211 3 ปีที่แล้ว +1

    Good explanation Krish.Now my misconceptions about decision trees is dwindling away.Thanks

  • @bhavikdudhrejiya4478
    @bhavikdudhrejiya4478 3 ปีที่แล้ว

    Best channel for Data Science Beginners

  • @ABINASHPANDA-be7ug
    @ABINASHPANDA-be7ug ปีที่แล้ว +4

    Hi, there might be calculation mistake in the entropy part. its not 0.78. Can you please mention that in a caption in the video or a description. So that people dont mistaken it in the future. Great video!!

  • @vishal56765
    @vishal56765 4 ปีที่แล้ว

    Very nicely explain sir. Thanks a lot. Waiting eagerly for next video on information gain.

  • @marijatosic217
    @marijatosic217 3 ปีที่แล้ว +1

    Great explanation! Thank you :)

  • @abdulkayumshaikh5411
    @abdulkayumshaikh5411 2 ปีที่แล้ว

    Explained in a great way ...Thank you krish

  • @b.f.skinner4383
    @b.f.skinner4383 3 ปีที่แล้ว

    Great introduction to the topic, thank you

  • @AromonChannel
    @AromonChannel 3 ปีที่แล้ว

    Definitely subscribe and tell my fellow other programmer to see and subscribe your channel, you are the best explainer i've ever seen!

  • @aditisrivastava7079
    @aditisrivastava7079 4 ปีที่แล้ว +2

    Nice explanation...... I am learning a lot

  • @saurav0777
    @saurav0777 4 ปีที่แล้ว

    Great bro ..thanks for uploading it.

  • @lemonoji288
    @lemonoji288 3 ปีที่แล้ว

    Thank you, this was very helpful!

  • @omerahmaad
    @omerahmaad 4 ปีที่แล้ว

    Good Video, I think you should add gini impurity in the video to explain the decision tree splits, also what is the difference between entropy and gini impurity. Good Video

  • @ahmarhussain8720
    @ahmarhussain8720 3 ปีที่แล้ว

    excellent explanation man, thanks

  • @user-uy5ls9eq7l
    @user-uy5ls9eq7l 6 หลายเดือนก่อน

    This is one of the best explanation thankyou somuch sir

  • @lekhnathojha8537
    @lekhnathojha8537 2 ปีที่แล้ว

    very well understandable your teaching curriculum.

  • @AbhishekRana-ye9uw
    @AbhishekRana-ye9uw 3 ปีที่แล้ว +1

    very much helpful sir thank you you are best :)

  • @MrBank1717
    @MrBank1717 ปีที่แล้ว

    Awesome video.

  • @cequest9456
    @cequest9456 3 ปีที่แล้ว +4

    You should start explaining from the root node.. Like take entropy of all f1, f2 ,f3 first.. then select the best one as the root node, then calculate entropy for remaining data for f2 and f3, and select next best entropy as the node... and continue the same process

  • @funwithzaeem8417
    @funwithzaeem8417 4 หลายเดือนก่อน

    bro you look like a great teacher

  • @vishaljhaveri7565
    @vishaljhaveri7565 2 ปีที่แล้ว

    Thank you, Krish sir.

  • @sohammukherjee837
    @sohammukherjee837 2 ปีที่แล้ว

    Hi Krish, can you please explain the process of calculating probability of a class in a decision tree and whether we can arrive at the probability from feature importance

  • @muhammadihsan8689
    @muhammadihsan8689 4 ปีที่แล้ว

    Great yaar!!!

  • @hemantsharma7986
    @hemantsharma7986 4 ปีที่แล้ว +5

    Hi Sir, this video is 37th in ML playlist but we don't have any decision tree video before it.

  • @VivekKumar-nf8fh
    @VivekKumar-nf8fh 4 ปีที่แล้ว +2

    Nice explanation.... But looking for deep learning video..Please don't stop DL in-between

  • @louerleseigneur4532
    @louerleseigneur4532 2 ปีที่แล้ว

    Thanks Krish

  • @reshaknarayan3944
    @reshaknarayan3944 4 ปีที่แล้ว

    Best explanation

  • @vaddadisairahul2956
    @vaddadisairahul2956 3 ปีที่แล้ว

    in my opinion, calculating entropy is sufficient and we don't require information gain, as in information gain we simply subtract from the entropy of attribute from the entropy of dataset; the entropy of dataset is always constant for a particular dataset.

  • @yogendrashinde473
    @yogendrashinde473 ปีที่แล้ว +2

    Dear Krish Naik Sir.
    Could you please recheck the calculation. As per my calculation entropy for f2 node where the split is 3|2 is 0.97 and not 0.78 ?
    Kindly correct me if I am wrong.

  • @sameerkhnl1
    @sameerkhnl1 3 ปีที่แล้ว +3

    Thank you for a great tutorial. The entropy value is actually 0.97 and not 0.78.

    • @prilippoudel8845
      @prilippoudel8845 2 ปีที่แล้ว

      Yes I was thiking the same

    • @programmer6649
      @programmer6649 2 ปีที่แล้ว

      He just gave an example but no computed the value

  • @ankitac4994
    @ankitac4994 2 ปีที่แล้ว

    good explanation

  • @GhizlaneBOUSKRI
    @GhizlaneBOUSKRI 4 ปีที่แล้ว +2

    I always think it's hard until you convice me how ridiculousely easy it is ..

  • @nirajchaudhari5974
    @nirajchaudhari5974 3 ปีที่แล้ว +1

    please upload the video for regression tree also and discuss it in detail manner

  • @RahulKumar-ec1dp
    @RahulKumar-ec1dp 2 ปีที่แล้ว

    @2:16 Entropy is "measure of impurity" thats why we tried to decease the entropy

  • @paragjp
    @paragjp 4 ปีที่แล้ว

    hi can you pl add link for Gini Index video ? Also pl let me know in which playlist these videos are ? Thanks

  • @patanjalikumar212
    @patanjalikumar212 3 ปีที่แล้ว

    Could you please create a video on decision tree random forest and other classification algorithm from very scratch which could be helpful for new learner or newbies in data science

  • @sonamkori8169
    @sonamkori8169 4 ปีที่แล้ว

    Thank you Sir 👍

  • @alastairbowie
    @alastairbowie 3 ปีที่แล้ว

    Nice explanation. Cheers =]

  • @beastjaguar7196
    @beastjaguar7196 ปีที่แล้ว

    thanku a lot🙏😊

  • @sandupaegodage8163
    @sandupaegodage8163 3 ปีที่แล้ว

    GOOD ONE

  • @vijayachokkapu724
    @vijayachokkapu724 3 ปีที่แล้ว +1

    Sir,
    To select an attribute at a node in a decision tree we calculate information Gain which ever is having highest that we select as the best attribute at that node but for an example I am getting all the 4 attribute information gain same.
    When I browsed in net it is saying that if we have all the attribute information gain as same then we have to select the best attribute according to their alphabetical order for example if we have A,B,C,D
    We have to select A first then B,C and D
    Is the procedure is correct or any other explanation can u give please

  • @anandachatterjee2976
    @anandachatterjee2976 3 ปีที่แล้ว

    I tried to purchase the going through the above pasted link but its showing unavailable now, could you please tell me how to get your book?I really need that,I follow your channel frequently whenever I face trouble in understanding any concepts of data science and after watching your videos it gets cleared so please let me know how to purchase your book.

  • @amitmodi7882
    @amitmodi7882 3 ปีที่แล้ว

    Super Awsome!

  • @deepakkota6672
    @deepakkota6672 3 ปีที่แล้ว +3

    No doubt you have wonderfully explained, What if we have multiple classes in our target variables with not only binary Yes or No? Like a boy, girl and others?

    • @sauravmukherjeecom
      @sauravmukherjeecom 3 ปีที่แล้ว

      Concept remains same, only the number of choices of split increases. So it is technically more difficult to get the optimal trees using information gain.

  • @srujanjayraj9490
    @srujanjayraj9490 4 ปีที่แล้ว +1

    waiting for the next video

  • @AmitYadav-ig8yt
    @AmitYadav-ig8yt 4 ปีที่แล้ว

    Sir, May you please make a video clip on the Decision tree?

  • @ashishkumari762
    @ashishkumari762 2 ปีที่แล้ว

    thank you

  • @pritomdas6215
    @pritomdas6215 4 ปีที่แล้ว +1

    Sir Can you also upload about "Information Gain"?

  • @deepalisharma1327
    @deepalisharma1327 2 ปีที่แล้ว

    Can we use same feature for multi level split in the decision tree?

  • @AbhishekVerma-oe8pk
    @AbhishekVerma-oe8pk 4 ปีที่แล้ว

    Brilliant

  • @maximumthefirst
    @maximumthefirst 3 ปีที่แล้ว +3

    Thanks for the video. At 05:48 , how does -3/5log2(3/5)-(2/5log2(2/5)) equal 0.78 ??? I think the correct answer ist 0.971
    Could you explain?

    • @assiaben1220
      @assiaben1220 3 ปีที่แล้ว

      you're right i calculate it in python and i found it = 0.9709505944546686

    • @rahulbagal6741
      @rahulbagal6741 2 ปีที่แล้ว

      yes you are right

    • @shrutipotdar9357
      @shrutipotdar9357 ปีที่แล้ว

      can you tell me how to calculate log of 3/5

  • @shubhamnehete8020
    @shubhamnehete8020 3 ปีที่แล้ว

    Sir, here u didn't mentioned that how f3 is in right side and how f2 is in left side node. As u said the attribute having less entropy is selected for split. This is understood but why f2 is on left and f3 os on right?

  • @PrinuTriesHerBest
    @PrinuTriesHerBest 4 ปีที่แล้ว

    I couldn't find any videos for information gain. Could you please upload

  • @subrahmanyamkv8168
    @subrahmanyamkv8168 3 ปีที่แล้ว +1

    As Entropy of pure node is zero..I think Entropy is measure of impurity..lesser the Entropy..more pure the node is

  • @digantaroy1310
    @digantaroy1310 3 ปีที่แล้ว

    Hi Krish,
    Can you please share -Decision tree for Regression?
    Having problem in understanding DT incase of regression

  • @skvali3810
    @skvali3810 2 ปีที่แล้ว

    i have one question .at root node is the gini are Entropy is high are low..

  • @spurthishetty6834
    @spurthishetty6834 3 ปีที่แล้ว

    Hi Krish,
    Have you explained how decision tree works? because im not finding it

  • @abhiramikc6883
    @abhiramikc6883 3 ปีที่แล้ว

    if we have very high dimensional data , how do we apply decision tree ?

  • @swetapatra
    @swetapatra 3 ปีที่แล้ว

    so based on entropy we select the parent node?

  • @shwetadalal1549
    @shwetadalal1549 3 ปีที่แล้ว

    Nice explanation. But actuallly we dont use this formula while modelling. We just set the parameter of decision tree to either entropy or gini. So when does this formula of entropy really help??

  • @ankursaxena4942
    @ankursaxena4942 3 ปีที่แล้ว

    Nice Video How to use#Linear_Regression in #Machine_Learning

  • @MuhammadAwais-hf7cg
    @MuhammadAwais-hf7cg ปีที่แล้ว

    why this entropy in bits? as for normal its about 0.97, and how can i convert my entropy iinto bits

  • @muhammadjunaidmajeed1211
    @muhammadjunaidmajeed1211 4 ปีที่แล้ว

    how to make fuzzy c4.5 on same data-set?

  • @vinayakrao4754
    @vinayakrao4754 ปีที่แล้ว

    What do you mean by feature?

  • @mdbelalhossainsanto6523
    @mdbelalhossainsanto6523 3 หลายเดือนก่อน

    How did you get 0.78 ?

  • @yashmehta8886
    @yashmehta8886 3 ปีที่แล้ว +2

    Can you mathematically explain how you obtained entropy=1 for a completely impure split(yes=3, no=3)?

    • @no-nonsense-here
      @no-nonsense-here 2 ปีที่แล้ว +1

      I think you would have got it by now, this is for those who are looking for the mathematical explanation.
      Entropy (3 yes and 3 no)=
      = -(3/6) log_2 (3/6) - (3/6) log_2 (3/6)
      = -(1/2)(-(1/2)) - (1/2)(-(1/2))
      = 1/2 + 1/2
      = 1

    • @harisahmad7871
      @harisahmad7871 6 หลายเดือนก่อน

      @@no-nonsense-here log_2(3/6) is -1 not -1/2

  • @arunkumars3966
    @arunkumars3966 2 ปีที่แล้ว

    how is 0.79 bits when you compute it? someone pls explain

  • @vigneshnagaraj7137
    @vigneshnagaraj7137 4 ปีที่แล้ว

    Can you please give the overview of Decision Trees as you have given for Random Forest

  • @vigneshnagaraj7137
    @vigneshnagaraj7137 4 ปีที่แล้ว

    Waiting for information gain bro

  • @sahilaseeja7686
    @sahilaseeja7686 4 ปีที่แล้ว

    Hello sir, i have a question like how does decision tree works in mixed type dataset i.e it includes bot categorical and numerical data type. Suppose its a regression problem and data set include both data type so how will algorithm deal with categorical data type in this?

    • @sauravmukherjeecom
      @sauravmukherjeecom 3 ปีที่แล้ว

      From documentation of sklearn.
      When there is no correlation between the outputs, a very simple way to solve this kind of problem is to build n independent models, i.e. one for each output, and then to use those models to independently predict each one of the n outputs. However, because it is likely that the output values related to the same input are themselves correlated, an often better way is to build a single model capable of predicting simultaneously all n outputs. First, it requires lower training time since only a single estimator is built. Second, the generalization accuracy of the resulting estimator may often be increased.
      With regard to decision trees, this strategy can readily be used to support multi-output problems. This requires the following changes:
      Store n output values in leaves, instead of 1;
      Use splitting criteria that compute the average reduction across all n outputs.
      ....................................
      If it is still not clear, ping me, I will expain.

    • @sahilaseeja7686
      @sahilaseeja7686 3 ปีที่แล้ว

      @@sauravmukherjeecom thanks for you answer. But there is no need to do these things as decision tree can handle both types of data..

  • @harivgl
    @harivgl 3 ปีที่แล้ว

    Did not say how to select the root node?

  • @ankush_in_sync5998
    @ankush_in_sync5998 4 ปีที่แล้ว

    Best

  • @swaruppanda2842
    @swaruppanda2842 4 ปีที่แล้ว

    Waiting for Information Gain video

  • @lucianoval903
    @lucianoval903 3 ปีที่แล้ว

    Yours videos are very nice, but you really need to improve the quality of your microphone

  • @AK-ws2yw
    @AK-ws2yw 3 ปีที่แล้ว

    In the formula of Entropy what is the significance of log base 2, why not simple log having base 10?

    • @satyajitpaul339
      @satyajitpaul339 2 ปีที่แล้ว

      since its binary split so base 2 is taken.

  • @loganwalker454
    @loganwalker454 2 ปีที่แล้ว

    Krish, I love you so much, more than my girlfriend, zillions like from my side. You always make knotty problems so simple

  • @karthikvinnakota1943
    @karthikvinnakota1943 4 ปีที่แล้ว

    What if the class attribute has 3 types of tuples...like Low medium and high...??

    • @rohitborra2507
      @rohitborra2507 4 ปีที่แล้ว +2

      you will split them to 3 nodes.

    • @sauravmukherjeecom
      @sauravmukherjeecom 3 ปีที่แล้ว

      @@rohitborra2507I am sorry but this is not correct. The splitting to the nodes depends on features and not on the classes.
      If there are multiple classes, the concept remains absolutely the same, but instead of 2 variables in the entropy calculation now you have 3. So, the technical difficulty of understanding the right way to form the tree becomes more difficult.

  • @murumathi4307
    @murumathi4307 2 ปีที่แล้ว

    Entropy is thermodynamics concept measure tha energy, why using mechine learning.

  • @shivamd.908
    @shivamd.908 3 ปีที่แล้ว

    lower entropy, higher information gain

  • @sakshiaggarwal3259
    @sakshiaggarwal3259 2 ปีที่แล้ว

    I think your log calculation is wrong. Calculation as shown at 5:54 in video is giving me result of 0.97 bits

  • @ambresh009
    @ambresh009 ปีที่แล้ว

    @krishNaik, I like your videos very much as they are quick reference guides for me to quickly understand something required for interview prep or for any project.
    Just noticed here that, you mentioned Entropy is a measure of purity. But, it is a measure of impurity which makes more sense. The more the value of entropy, more is heterogeneity in the variable.

  • @mehdicharife2335
    @mehdicharife2335 ปีที่แล้ว

    You don't explain the intuition though.

  • @deepaksurya776
    @deepaksurya776 4 ปีที่แล้ว +3

    Entropy value is 0.97 not 0.78

    • @vivekmh4469
      @vivekmh4469 3 ปีที่แล้ว +1

      yes you are crt the entropy value is 0.98

    • @starkmend3444
      @starkmend3444 3 ปีที่แล้ว

      Lee Jon Chapman thx 😁

  • @shrikantkulkarni5550
    @shrikantkulkarni5550 4 ปีที่แล้ว +2

    Good explaination however always I observed that you will not explain the meaning of the term on which you made the video and always you will explain things in diplomatic way, please use the simple terms to explain the concepts.

  • @ernestanonde3218
    @ernestanonde3218 2 ปีที่แล้ว

    I SAID I LOVE YOU

  • @user-cy9zf4oz2i
    @user-cy9zf4oz2i 16 วันที่ผ่านมา

    why a lot of talks tho... just show the example case

  • @memeddk
    @memeddk ปีที่แล้ว +1

    tidak membantu