Python Manim’s Code To Animate Decision Tree Learning

from manim import *
from manim import SurroundingRectangle as sr
class DTL(Scene):
    def construct(self):
        self.camera.background_color=BLUE
        self.wait(5)
        start=Tex(r"Understand  Decison Tree Learning ").scale(1.50)
        start.move_to(1.00*UP)
        by=Tex(r"By").scale(1.50)
        by.move_to(0.00*UP)
        name=Tex(r"Bindeshwar S. Kushwaha ").scale(1.50)
        name.move_to(1.00*DOWN)
        self.play(Write(start),Write(by),Write(name))
        self.wait(15)
        self.clear()
        #################################
        i1=Text("Day").scale(0.25)
        i11=Text("Outlook").scale(0.25)
        i12=Text("Temp").scale(0.25)
        i13=Text("Humidity").scale(0.25)
        i14=Text("Windy").scale(0.25)
        l1=LabeledDot(Text("Class",weight=BOLD,font_size=10),radius=0.25,color=PINK)
        #####################################
        i2=Text("1").scale(0.25)
        i21=Text("Sunny").scale(0.25)
        i22=Text("Hot").scale(0.25)
        i23=Text("High").scale(0.25)
        i24=Text("False").scale(0.25)
        l2=LabeledDot(Text("No",weight=BOLD,font_size=10),radius=0.20,color=RED)
        #####################################
        i3=Text("2").scale(0.25)
        i31=Text("Sunny").scale(0.25)
        i32=Text("Hot").scale(0.25)
        i33=Text("High").scale(0.25)
        i34=Text("True").scale(0.25)
        l3=LabeledDot(Text("No",weight=BOLD,font_size=10),radius=0.20,color=RED)
        ####################################
        i4=Text("3").scale(0.25)
        i41=Text("Overcast").scale(0.25)
        i42=Text("Hot").scale(0.25)
        i43=Text("High").scale(0.25)
        i44=Text("False").scale(0.25)
        l4=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        ################################
        i5=Text("4").scale(0.25)
        i51=Text("Rainy").scale(0.25)
        i52=Text("Mild").scale(0.25)
        i53=Text("High").scale(0.25)
        i54=Text("False").scale(0.25)
        l5=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        #########################################
        i6=Text("5").scale(0.25)
        i61=Text("Rainy").scale(0.25)
        i62=Text("Cool").scale(0.25)
        i63=Text("Normal").scale(0.25)
        i64=Text("False").scale(0.25)
        l6=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        #########################################
        i7=Text("6").scale(0.25)
        i71=Text("Rainy").scale(0.25)
        i72=Text("Cool").scale(0.25)
        i73=Text("Normal").scale(0.25)
        i74=Text("True").scale(0.25)
        l7=LabeledDot(Text("No",weight=BOLD,font_size=10),radius=0.20,color=RED)
        #########################################
        i8=Text("7").scale(0.25)
        i81=Text("Overcast").scale(0.25)
        i82=Text("Cool").scale(0.25)
        i83=Text("Normal").scale(0.25)
        i84=Text("True").scale(0.25)
        l8=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        #########################################
        i9=Text("8").scale(0.25)
        i91=Text("Sunny").scale(0.25)
        i92=Text("Mild").scale(0.25)
        i93=Text("High").scale(0.25)
        i94=Text("False").scale(0.25)
        l9=LabeledDot(Text("No",weight=BOLD,font_size=10),radius=0.20,color=RED)
        #########################################
        i10=Text("9").scale(0.25)
        i101=Text("Sunny").scale(0.25)
        i102=Text("Cool").scale(0.25)
        i103=Text("Normal").scale(0.25)
        i104=Text("False").scale(0.25)
        l10=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        #########################################
        i1_1=Text("10").scale(0.25)
        i111=Text("Rainy").scale(0.25)
        i112=Text("Mild").scale(0.25)
        i113=Text("Normal").scale(0.25)
        i114=Text("False").scale(0.25)
        l11=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        #########################################
        i1_2=Text("11").scale(0.25)
        i121=Text("Sunny").scale(0.25)
        i122=Text("Mild").scale(0.25)
        i123=Text("Normal").scale(0.25)
        i124=Text("True").scale(0.25)
        l12=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        #########################################
        i1_3=Text("12").scale(0.25)
        i131=Text("Overcast").scale(0.25)
        i132=Text("Mild").scale(0.25)
        i133=Text("High").scale(0.25)
        i134=Text("True").scale(0.25)
        l13=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        #########################################
        i1_4=Text("13").scale(0.25)
        i141=Text("Overcast").scale(0.25)
        i142=Text("Hot").scale(0.25)
        i143=Text("Normal").scale(0.25)
        i144=Text("False").scale(0.25)
        l14=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.20,color=GREEN)
        #########################################
        i1_5=Text("14").scale(0.25)
        i151=Text("Rainy").scale(0.25)
        i152=Text("Mild").scale(0.25)
        i153=Text("High").scale(0.25)
        i154=Text("True").scale(0.25)
        l15=LabeledDot(Text("No",weight=BOLD,font_size=10),radius=0.20,color=RED)
        #########################################
        r1=VGroup(i1,i11,i12,i13,i14)
        r2=VGroup(i2,i21,i22,i23,i24)
        r3=VGroup(i3,i31,i32,i33,i34)
        r4=VGroup(i4,i41,i42,i43,i44)
        r5=VGroup(i5,i51,i52,i53,i54)
        r6=VGroup(i6,i61,i62,i63,i64)
        r7=VGroup(i7,i71,i72,i73,i74)
        r8=VGroup(i8,i81,i82,i83,i84)
        r9=VGroup(i9,i91,i92,i93,i94)
        r10=VGroup(i10,i101,i102,i103,i104)
        r11=VGroup(i1_1,i111,i112,i113,i114)
        r12=VGroup(i1_2,i121,i122,i123,i124)
        r13=VGroup(i1_3,i131,i132,i133,i134)
        r14=VGroup(i1_4,i141,i142,i143,i144)
        r15=VGroup(i1_5,i151,i152,i153,i154)
        r1c=VGroup(i11,i12,i13,i14)
        r2c=VGroup(i21,i22,i23,i24)
        r3c=VGroup(i31,i32,i33,i34)
        r4c=VGroup(i41,i42,i43,i44)
        r5c=VGroup(i51,i52,i53,i54)
        r6c=VGroup(i61,i62,i63,i64)
        r7c=VGroup(i71,i72,i73,i74)
        r8c=VGroup(i81,i82,i83,i84)
        r9c=VGroup(i91,i92,i93,i94)
        r10c=VGroup(i101,i102,i103,i104)
        r11c=VGroup(i111,i112,i113,i114)
        r12c=VGroup(i121,i122,i123,i124)
        r13c=VGroup(i131,i132,i133,i134)
        r14c=VGroup(i141,i142,i143,i144)
        r15c=VGroup(i151,i152,i153,i154)
        #########################################
        ####################
        ####################
        t=VGroup(*r1,*r2,*r3,*r4,*r5,*r6,*r7,*r8,*r9,*r10,*r11,*r12,*r13,*r14,*r15).set_x(0).arrange_in_grid(rows=16,cols=5)
        t.shift(0.05*DOWN+4.60*LEFT)
        #self.add(t)
        ###########################################################
        self.play(Write(r1,run_time=2))
        self.add(r1)
        self.play(Circumscribe(i1,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r1c,Rectangle,time_width=2),run_time=2)
        l1.next_to(i14, 2.10*RIGHT)
        self.add(l1)
        ############################################################
        self.play(Write(r2),run_time=2)
        self.add(r2)
        self.play(Circumscribe(i2,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r2c,Rectangle,time_width=2),run_time=2)
        l2.next_to(i24,2.50*RIGHT)
        self.add(l2)
        ############################################################
        self.play(Write(r3,run_time=2),time_width=2)
        self.add(r3)
        self.play(Circumscribe(i3,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r3c,Rectangle,time_width=2),run_time=2)
        l3.next_to(i34,2.50* RIGHT)
        self.add(l3)
        ##############################################################
        self.play(Write(r4,run_time=2),time_width=2)
        self.add(r4)
        self.play(Circumscribe(i4,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r4c,Rectangle,time_width=2),run_time=2)        
        self.add(l4.next_to(i44,2.50* RIGHT))
        ##############################################################
        self.play(Write(r5,run_time=2),time_width=2)
        self.add(r5)
        self.play(Circumscribe(i5,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r5c,Rectangle,time_width=2),run_time=2)        
        self.add(l5.next_to(i54,2.50* RIGHT))
         ##############################################################
        self.play(Write(r6,run_time=2),time_width=2)
        self.add(r6)
        self.play(Circumscribe(i6,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r6c,Rectangle,time_width=2),run_time=2)        
        self.add(l6.next_to(i64,2.50* RIGHT))
        ##############################################################
        self.play(Write(r7,run_time=2),time_width=2)
        self.add(r7)
        self.play(Circumscribe(i7,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r7c,Rectangle,time_width=2),run_time=2)        
        self.add(l7.next_to(i74,2.50* RIGHT))
        ##############################################################
        self.play(Write(r8,run_time=2),time_width=2)
        self.add(r8)
        self.play(Circumscribe(i8,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r8c,Rectangle,time_width=2),run_time=2)        
        self.add(l8.next_to(i84,2.50* RIGHT))
        ##############################################################
        self.play(Write(r9,run_time=2),time_width=2)
        self.add(r9)
        self.play(Circumscribe(i9,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r9c,Rectangle,time_width=2),run_time=2)       
        self.add(l9.next_to(i94,2.50* RIGHT))
        ##############################################################
        self.play(Write(r10,run_time=2),time_width=2)
        self.add(r10)
        self.play(Circumscribe(i10,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r10c,Rectangle,time_width=2),run_time=2)       
        self.add(l10.next_to(i104,2.50* RIGHT))
        ##############################################################
        self.play(Write(r11,run_time=2),time_width=2)
        self.add(r11)
        self.play(Circumscribe(i1_1,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r11c,Rectangle,time_width=2),run_time=2)
        self.add(l11.next_to(i114,2.50* RIGHT))
        ##############################################################
        self.play(Write(r12,run_time=2),time_width=2)
        self.add(r12)
        self.play(Circumscribe(i1_2,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r12c,Rectangle,time_width=2),run_time=2)
        self.add(l12.next_to(i124,2.50* RIGHT))
        ##############################################################
        self.play(Write(r13,run_time=2),time_width=2)
        self.add(r13)
        self.play(Circumscribe(i1_3,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r13c,Rectangle,time_width=2),run_time=2)
        self.add(l13.next_to(i134,2.50* RIGHT))
        ##############################################################
        self.play(Write(r14,run_time=2),time_width=2)
        self.add(r14)
        self.play(Circumscribe(i1_4,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r14c,Rectangle,time_width=2),run_time=2)
        self.add(l14.next_to(i144,2.50* RIGHT))
        ##############################################################
        self.play(Write(r15,run_time=2),time_width=2)
        self.add(r15)
        self.play(Circumscribe(i1_5,Circle,time_width=2),run_time=2)
        self.play(Circumscribe(r15c,Rectangle,time_width=2),run_time=2)
        self.add(l15.next_to(i154,2.60* RIGHT))
        #self.play(l15.copy().animate.next_to(i154,2.50* RIGHT),run_time=2)
        #self.wait(2)
        ##############################################################
        #ciryes=Circle(radius=1.5)
        gyes=Group(l4,l5,l6,l8,l10,l11,l12,l13,l14)
        gyc=gyes.copy()
        self.play(gyc.animate.move_to(2.80*UP+0.80*RIGHT).arrange_in_grid(rows=1,cols=9, buff=0.1),run_time=20)
        #self.add(gyes)
        #self.play(Circumscribe(gyes,Circle),run_time=5)
        ###################
        ###################
        #cirno=Circle(radius=1.5)
        gyn=Group(l2,l3,l7,l9,l15)
        gnc=gyn.copy()
        self.play(gnc.animate.move_to(2.80*UP+4.30*RIGHT).arrange_in_grid(rows=1,cols=5,buff=0.1),run_time=20)
        #self.add(gno)
        #self.play(Circumscribe(gno,Circle),run_time=5)
        gi=Tex(r'Gini Index=$1-\sum (P_i)^2$',font_size=25)
        gi.move_to(2.40*UP+0.70*RIGHT)
        pi=Tex(r"$P_i \Rightarrow$ is the probability of an object being classified to a particular class i.",font_size=22)
        pi.move_to(1.80*UP+2.70*RIGHT)
        gidef=Tex(r"The Gini index  measures the probability for a random instance$\newline$ being misclassified when chosen randomly.. Towards Data Science",font_size=22)
        gidef.move_to(1.00*UP+2.70*RIGHT)
        gifinal=Tex(r" Lower value of Gini index$\Rightarrow$ Better for split.",font_size=35)
        gifinal.move_to(0.100*DOWN+2.00*RIGHT)
        self.play(Write(gi))
        self.wait(5)
        self.play(Write(pi))
        self.wait(5)
        self.play(Write(gidef))
        self.wait(5)
        self.play(Write(gifinal),reverse=True)
        self.wait(10)
        self.remove(*gyc,*gnc,*gi,*pi,*gidef,*gifinal)
        ###############################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r10sunnyyes=VGroup(i10,i101,i102,i103,i104,l10)
        r12sunnyyes=VGroup(i1_2,i121,i122,i123,i124,l12)
        r2sunnyno=VGroup(i2,i21,i22,i23,i24,l2)
        r3sunnyno=VGroup(i3,i31,i32,i33,i34,l3)
        r9sunnyno=VGroup(i9,i91,i92,i93,i94,l9)
        sunnydata=VGroup(r1,r10sunnyyes,r12sunnyyes,r2sunnyno,r3sunnyno,r9sunnyno)
        sn=sunnydata.copy()
        sn_class_col=VGroup(sn[0][5],sn[1][5],sn[2][5],sn[3][5],sn[4][5],sn[5][5])
        sn_col=VGroup(sn[0][1],sn[1][1],sn[2][1],sn[3][1],sn[4][1],sn[5][1])
        self.play(sn.animate.move_to(1.60*UP+1*RIGHT).arrange_in_grid(rows=6,cols=1,buff=0.1),run_time=20)
        for i in range(20):
            self.play(Circumscribe(sn_col),Circumscribe(sn_class_col),time_width=1,run_time=2)
            self.wait(2)
        ###############################
        ol_sunny_gi1=Tex(r'Gini(Outlook,Sunny)=$1-(\frac{2}{5})^2-(\frac{3}{5})^2$',font_size=20)
        ol_sunny_gi2=Tex(r'Gini(Outlook,Sunny)=$1-(0.40)^2-(0.60)^2$',font_size=20)
        ol_sunny_gi3=Tex(r'Gini(Outlook,Sunny)=$1-(0.16)-(0.36)$',font_size=20)
        ol_sunny_gi4=Tex(r'Gini(Outlook,Sunny)=$1-0.52$',font_size=20)
        ol_sunny_gi_res=Tex(r'Gini(Outlook,Sunny)=0.48',font_size=20).move_to(1.5*UP+1.0*RIGHT)
        ol_sunny_gi=VGroup(ol_sunny_gi1,ol_sunny_gi2,ol_sunny_gi3,ol_sunny_gi4).arrange_in_grid(rows=5,cols=1,buff=0.1)
        ol_sunny_gi.move_to(1.50*UP+1.0*RIGHT)
        self.play(FadeTransform(sn,ol_sunny_gi),run_time=5)
        self.play(FadeTransform(ol_sunny_gi,ol_sunny_gi_res),run_time=5)
        self.play(ol_sunny_gi_res.animate.move_to(2.80*UP+5.50*RIGHT))
        self.wait(5)
        ###############################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r4overcastyes=VGroup(i4,i41,i42,i43,i44,l4)
        r8overcastyes=VGroup(i8,i81,i82,i83,i84,l8)
        r1_3overcastyes=VGroup(i1_3,i131,i132,i133,i134,l13)
        r1_4overcastyes=VGroup(i1_4,i141,i142,i143,i144,l14)
        overcastdata=VGroup(r1,r4overcastyes,r8overcastyes,r1_3overcastyes,r1_4overcastyes)
        ov=overcastdata.copy()
        ov_class_col=VGroup(ov[0][5],ov[1][5],ov[2][5],ov[3][5],ov[4][5])
        ov_col=VGroup(ov[0][1],ov[1][1],ov[2][1],ov[3][1],ov[4][1])
        self.play(ov.animate.move_to(1.60*UP+1*RIGHT).arrange_in_grid(rows=5,cols=1,buff=0.1),run_time=5)
        for i in range(5):
            self.play(Circumscribe(ov_col),Circumscribe(ov_class_col),time_width=1,run_time=2)
            self.wait(2)
        ###############################
        ol_overcast_gi1=Tex(r'Gini(Outlook,Overcast)=$1-(\frac{4}{4})^2-(\frac{0}{0})^2$',font_size=20)
        ol_overcast_gi2=Tex(r'Gini(Outlook,Overcast)=$1-(1)^2-(0)^2$',font_size=20)
        ol_overcast_gi3=Tex(r'Gini(Outlook,Overcast)=$1-(1)-(0)$',font_size=20)
        ol_overcast_gi_res=Tex(r'Gini(Outlook,Overcast)=0.0',font_size=20).move_to(1.5*UP+1.0*RIGHT)
        ol_overcast_gi=VGroup(ol_overcast_gi1,ol_overcast_gi2,ol_overcast_gi3).arrange_in_grid(rows=4,cols=1,buff=0.1)
        ol_overcast_gi.move_to(1.60*UP+1.0*RIGHT)
        self.play(FadeTransform(ov,ol_overcast_gi),run_time=5)
        self.play(FadeTransform(ol_overcast_gi,ol_overcast_gi_res),run_time=5)
        self.play(ol_overcast_gi_res.animate.move_to(2.50*UP+5.50*RIGHT))
        self.wait(5)
        ################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r5rainyyes=VGroup(i5,i51,i52,i53,i54,l5)
        r6rainyyes=VGroup(i6,i61,i62,i63,i64,l6)
        r7rainyno=VGroup(i7,i71,i72,i73,i74,l7)
        r1_1rainyyes=VGroup(i1_1,i111,i112,i113,i114,l11)
        r1_5rainyyes=VGroup(i1_5,i151,i152,i153,i154,l15)
        rainydata=VGroup(r1,r5rainyyes,r6rainyyes,r1_1rainyyes,r7rainyno,r1_5rainyyes)
        rn= rainydata.copy()
        rn_class_col=VGroup(rn[0][5],rn[1][5],rn[2][5],rn[3][5],rn[4][5],rn[5][5])
        rn_col=VGroup(rn[0][1],rn[1][1],rn[2][1],rn[3][1],rn[4][1],rn[5][1])
        self.play(rn.animate.move_to(1.60*UP+1*RIGHT).arrange_in_grid(rows=6,cols=1,buff=0.1),run_time=5)
        for i in range(5):
            self.play(Circumscribe(rn_col),Circumscribe(rn_class_col),time_width=1,run_time=2)
            self.wait(2)
        ###############################
        ol_rainy_gi1=Tex(r'Gini(Outlook,Rainy)=$1-(\frac{3}{5})^2-(\frac{2}{5})^2$',font_size=20)
        ol_rainy_gi2=Tex(r'Gini(Outlook,Rainy)=$1-(0.60)^2-(0.40)^2$',font_size=20)
        ol_rainy_gi3=Tex(r'Gini(Outlook,Rainy)=$1-(0.36)-(0.16)$',font_size=20)
        ol_rainy_gi4=Tex(r'Gini(Outlook,Rainy)=$1-0.52$',font_size=20)
        ol_rainy_gi_res=Tex(r'Gini(Outlook,Rainy)=0.48',font_size=20).move_to(1.80*UP+1.0*RIGHT)
        ol_rainy_gi=VGroup(ol_rainy_gi1,ol_rainy_gi2,ol_rainy_gi3,ol_rainy_gi4).arrange_in_grid(rows=5,cols=1,buff=0.1)
        ol_rainy_gi.move_to(1.50*UP+1.0*RIGHT)
        self.play(FadeTransform(rn,ol_rainy_gi),run_time=5)
        self.play(FadeTransform(ol_rainy_gi,ol_rainy_gi_res),run_time=5)
        self.play(ol_rainy_gi_res.animate.move_to(2.20*UP+5.50*RIGHT))
        self.wait(5)
        ################################
        ol_sn_ov_rn=VGroup(ol_sunny_gi_res,ol_overcast_gi_res,ol_rainy_gi_res)
        outlookgini1=Tex(r'Gini(Outlook)=$(\frac{5}{14}) * 0.48+(\frac{4}{14})*0+(\frac{5}{14})*0.48$',font_size=20)
        outlookgini2=Tex(r'Gini(Outlook)=$0.171+0+0.171$',font_size=20)
        outlookginical=VGroup(outlookgini1,outlookgini2).arrange_in_grid(rows=2,cols=1,buff=0.1).move_to(2.10*UP+4.50*RIGHT)
        outlookginires1=Tex(r'Gini(Outlook)=$0.171+0+0.171$',font_size=20).move_to(2.60*UP+5.50*RIGHT)
        outlookfinal=Tex(r'Gini(Outlook)=$0.342$',font_size=20).move_to(2.80*UP+5.10*RIGHT)
        self.play(FadeTransform(ol_sn_ov_rn,outlookginical),run_time=5)
        self.play(FadeTransform(outlookginical,outlookginires1),run_time=5)
        self.play(FadeTransform(outlookginires1,outlookfinal),run_time=5)
        self.wait(5)
        ################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r4hotyes=VGroup(i4,i41,i42,i43,i44,l4)
        r14hotyes=VGroup(i1_4,i141,i142,i143,i144,l14)
        r2hotno=VGroup(i2,i21,i22,i23,i24,l2)
        r3hotno=VGroup(i3,i31,i32,i33,i34,l3)
        hotdata=VGroup(r1,r4hotyes,r14hotyes,r2hotno,r3hotno)
        ht=hotdata.copy()
        ht_class_col=VGroup(ht[0][5],ht[1][5],ht[2][5],ht[3][5],ht[4][5])
        ht_col=VGroup(ht[0][2],ht[1][2],ht[2][2],ht[3][2],ht[4][2])
        self.play(ht.animate.move_to(1.60*UP+1*RIGHT).arrange_in_grid(rows=5,cols=1,buff=0.1),run_time=5)
        for i in range(5):
            self.play(Circumscribe(ht_col),Circumscribe(ht_class_col),time_width=1,run_time=2)
            self.wait(2)
        ################################
        temp_hot_gi1=Tex(r'Gini(Temperature,Hot)=$1-(\frac{1}{2})^2-(\frac{1}{2})^2$',font_size=20)
        temp_hot_gi2=Tex(r'GiniTemperature,Hot)=$1-(0.50)^2-(0.50)^2$',font_size=20)
        temp_hot_gi3=Tex(r'Gini(Temperature,Hot)=$1-(0.25)-(0.25)$',font_size=20)
        temp_hot_gi4=Tex(r'Gini(Temperature,Hot=$1-0.50$',font_size=20)
        temp_hot_gi_res=Tex(r'Gini(Temperature,Hot)=0.50',font_size=20).move_to(1.80*UP+1.0*RIGHT)
        temp_hot_gi=VGroup(temp_hot_gi1,temp_hot_gi2,temp_hot_gi3,temp_hot_gi4).arrange_in_grid(rows=4,cols=1,buff=0.1)
        temp_hot_gi.move_to(1.60*UP+0.80*RIGHT)
        self.play(FadeTransform(ht,temp_hot_gi),run_time=5)
        self.play(FadeTransform(temp_hot_gi,temp_hot_gi_res),run_time=5)
        self.play(temp_hot_gi_res.animate.move_to(2.50*UP+5.50*RIGHT))
        self.wait(5)
        ################################
        ################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r6coolyes=VGroup(i6,i61,i62,i63,i64,l6)
        r8coolyes=VGroup(i8,i81,i82,i83,i84,l8)
        r10coolyes=VGroup(i10,i101,i102,i103,i104,l10)
        r7coolno=VGroup(i7,i71,i72,i73,i74,l7)   
        cooldata=VGroup(r1,r6coolyes,r8coolyes,r10coolyes,r7coolno)
        cl=cooldata.copy()
        cl_class_col=VGroup(cl[0][5],cl[1][5],cl[2][5],cl[3][5],cl[4][5])
        cl_col=VGroup(cl[0][2],cl[1][2],cl[2][2],cl[3][2],cl[4][2])
        self.play(cl.animate.move_to(1.60*UP+1*RIGHT).arrange_in_grid(rows=5,cols=1,buff=0.1),run_time=5)
        for i in range(5):
            self.play(Circumscribe(cl_col),Circumscribe(cl_class_col),time_width=1,run_time=2)
            self.wait(2)
        ################################
        temp_cool_gi1=Tex(r'Gini(Temperature,Cool)=$1-(\frac{3}{4})^2-(\frac{1}{4})^2$',font_size=20)
        temp_cool_gi2=Tex(r'GiniTemperature,Cool)=$1-(0.75)^2-(0.25)^2$',font_size=20)
        temp_cool_gi3=Tex(r'GiniTemperatureCool,)=$1-(0.5625)-(0.0625)$',font_size=20)
        temp_cool_gi4=Tex(r'Gini(TemperatureCool,)=$1-(0.625)$',font_size=20)
        temp_cool_gi_res=Tex(r'Gini(Temperature,Cool)=0.375',font_size=20).move_to(1.5*UP+1.0*RIGHT)
        temp_cool_gi=VGroup(temp_cool_gi1,temp_cool_gi2,temp_cool_gi3,temp_cool_gi4).arrange_in_grid(rows=4,cols=1,buff=0.1)
        temp_cool_gi.move_to(1.60*UP+1.0*RIGHT)
        self.play(FadeTransform(cl,temp_cool_gi),run_time=5)
        self.play(FadeTransform(temp_cool_gi,temp_cool_gi_res),run_time=5)
        self.play(temp_cool_gi_res.animate.move_to(2.20*UP+5.50*RIGHT))
        self.wait(5)
        ################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r5mildyes=VGroup(i5,i51,i52,i53,i54,l5)
        r9mildno=VGroup(i9,i91,i92,i93,i94,l9)
        r11mildyes=VGroup(i1_1,i111,i112,i113,i114,l11)
        r12mildyes=VGroup(i1_2,i121,i122,i123,i124,l12)       
        r13mildyes=VGroup(i1_3,i131,i132,i133,i134,l13)
        r15mildno=VGroup(i1_5,i151,i152,i153,i154,l15)
        milddata=VGroup(r1,r5mildyes,r11mildyes,r12mildyes,r13mildyes,r9mildno,r15mildno)
        ml=milddata.copy()
        ml_class_col=VGroup(ml[0][5],ml[1][5],ml[2][5],ml[3][5],ml[4][5],ml[5][5],ml[6][5])
        ml_col=VGroup(ml[0][2],ml[1][2],ml[2][2],ml[3][2],ml[4][2],ml[5][2],ml[6][2])
        self.play(ml.animate.move_to(1.40*UP+1*RIGHT).arrange_in_grid(rows=7,cols=1,buff=0.1),run_time=5)
        self.wait(2)
        for i in range(5):
            self.play(Circumscribe(ml_col),Circumscribe(ml_class_col),time_width=1,run_time=2)
            self.wait(2)
        
        ################################
        temp_mild_gi1=Tex(r'Gini(Temperature,Mild)=$1-(\frac{4}{6})^2-(\frac{2}{6})^2$',font_size=20)
        temp_mild_gi2=Tex(r'Gini(Temperature,Mild)=$1-(0.66)^2-(0.33)^2$',font_size=20)
        temp_mild_gi3=Tex(r'Gini(Temperature,Mild)=$1-(0.4356)-(0.1089)$',font_size=20)
        temp_mild_gi4=Tex(r'Gini(Temperature,Mild)=$1-(0.5445)$',font_size=20)
        temp_mild_gi_res=Tex(r'Gini(Temperature,Mild)=0.4555',font_size=20).move_to(1.5*UP+1.0*RIGHT)
        temp_mild_gi=VGroup(temp_mild_gi1,temp_mild_gi2,temp_mild_gi3,temp_mild_gi4).arrange_in_grid(rows=4,cols=1,buff=0.1)
        temp_mild_gi.move_to(1.40*UP+1.0*RIGHT)
        self.play(FadeTransform(ml,temp_mild_gi),run_time=5)
        self.play(FadeTransform(temp_mild_gi,temp_mild_gi_res),run_time=5)
        self.play(temp_mild_gi_res.animate.move_to(1.90*UP+5.50*RIGHT))
        self.wait(5)
        ################################
        temp_ht_cl_ml=VGroup(temp_hot_gi_res,temp_cool_gi_res,temp_mild_gi_res)
        temperaturegini1=Tex(r'Gini(Temperature)=$(\frac{4}{14}) * 0.5+(\frac{4}{14})*0.375+(\frac{6}{14})*0.445$',font_size=20)
        temperaturegini2=Tex(r'Gini(Temperature)=$0.142+0.107+0.190$',font_size=20)
        temperatureginical=VGroup(temperaturegini1,temperaturegini2).arrange_in_grid(rows=2,cols=1,buff=0.1).move_to(1.85*UP+4.00*RIGHT)
        temperatureginires1=Tex(r'Gini(Temperature)=$0.142+0.107+0.190$',font_size=20).move_to(2.10*UP+5.00*RIGHT)
        temperaturefinal=Tex(r'Gini(Temperature)=$0.439$',font_size=20).move_to(2.50*UP+5.10*RIGHT)
        self.play(FadeTransform(temp_ht_cl_ml,temperatureginical),run_time=5)
        self.play(FadeTransform(temperatureginical,temperatureginires1),run_time=5)
        self.play(FadeTransform(temperatureginires1,temperaturefinal),run_time=5)
        self.wait(5)
        ################################
        ################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r4highyes=VGroup(i4,i41,i42,i43,i44,l4)
        r5highyes=VGroup(i5,i51,i52,i53,i54,l5)
        r13highyes=VGroup(i1_3,i131,i132,i133,i134,l13)
        r2highno=VGroup(i2,i21,i22,i23,i24,l2)
        r3highno=VGroup(i3,i31,i32,i33,i34,l3)
        r9highno=VGroup(i9,i91,i92,i93,i94,l9)
        r12highno=VGroup(i1_2,i121,i122,i123,i124,l12)       
        r15highno=VGroup(i1_5,i151,i152,i153,i154,l15)
        highdata=VGroup(r1,r4highyes,r5highyes,r13highyes,r2highno,r3highno,r9highno,r15highno)
        hi=highdata.copy()
        hi_class_col=VGroup(hi[0][5],hi[1][5],hi[2][5],hi[3][5],hi[4][5],hi[5][5],hi[6][5],hi[7][5])
        hi_col=VGroup(hi[0][3],hi[1][3],hi[2][3],hi[3][3],hi[4][3],hi[5][3],hi[6][3],hi[6][3],hi[7][3])
        self.play(hi.animate.move_to(1.10*UP+1*RIGHT).arrange_in_grid(rows=8,cols=1,buff=0.1),run_time=5)
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(hi_col),Circumscribe(hi_class_col),time_width=1,run_time=2)
            self.wait(2)
        ################################
        humd_high_gi1=Tex(r'Gini(Humidity,High)=$1-(\frac{3}{7})^2-(\frac{4}{7})^2$',font_size=20)
        humd_high_gi2=Tex(r'Gini(Humidity,High)=$1-(0.4285)^2-(0.5714)^2$',font_size=20)
        humd_high_gi3=Tex(r'Gini(Humidity,High)=$1-(0.1836)-(0.3264)$',font_size=20)
        humd_high_gi4=Tex(r'Gini(Humidity,High)=$1-(0.5100)$',font_size=20)
        humd_high_gi_res=Tex(r'Gini(Humidity,High)=0.490',font_size=20).move_to(1.5*UP+1.0*RIGHT)
        humd_high_gi=VGroup(humd_high_gi1,humd_high_gi2,humd_high_gi3,humd_high_gi4).arrange_in_grid(rows=4,cols=1,buff=0.1)
        humd_high_gi.move_to(1.40*UP+1.0*RIGHT)
        self.play(FadeTransform(hi,humd_high_gi),run_time=5)
        self.play(FadeTransform(humd_high_gi,humd_high_gi_res),run_time=5)
        self.play(humd_high_gi_res.animate.move_to(2.20*UP+5.50*RIGHT))
        self.wait(5)
        ################################
        ################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r6normalyes=VGroup(i6,i61,i62,i63,i64,l6)
        r8normalyes=VGroup(i8,i81,i82,i83,i84,l8)
        r10normalyes=VGroup(i10,i101,i102,i103,i104,l10)
        r1_1normalyes=VGroup(i1_1,i111,i112,i113,i114,l11)
        r1_2normalyes=VGroup(i1_2,i121,i122,i123,i124,l12)
        r1_4normalyes=VGroup(i1_4,i141,i142,i143,i144,l14)
        r7normalno=VGroup(i7,i71,i72,i73,i74,l7)       
        normaldata=VGroup(r1,r6normalyes,r8normalyes,r10normalyes,r1_1normalyes,r1_2normalyes,r1_4normalyes, r7normalno)
        nl=normaldata.copy()
        nl_class_col=VGroup(nl[0][5],nl[1][5],nl[2][5],nl[3][5],nl[4][5],nl[5][5],nl[6][5],nl[7][5])
        nl_col=VGroup(nl[0][3],nl[1][3],nl[2][3],nl[3][3],nl[4][3],nl[5][3],nl[6][3],nl[6][3],nl[7][3])
        self.play(nl.animate.move_to(1.10*UP+1*RIGHT).arrange_in_grid(rows=8,cols=1,buff=0.1),run_time=5)
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(hi_col),Circumscribe(hi_class_col),time_width=1,run_time=2)
            self.wait(2)
        ################################
        humd_norml_gi1=Tex(r'Gini(Humidity,Normal)=$1-(\frac{6}{7})^2-(\frac{1}{7})^2$',font_size=20)
        humd_normal_gi2=Tex(r'Gini(Humidity,Normal)=$1-(0.7346)^2-(0.1428)^2$',font_size=20)
        humd_normal_gi3=Tex(r'Gini(Humidity,Normal)=$1-(0.7346)-(0.0203)$',font_size=20)
        humd_normal_gi4=Tex(r'Gini(Humidity,Normal)=$1-(0.754)$',font_size=20)
        humd_normal_gi_res=Tex(r'Gini(Humidity,Normal)=0.245',font_size=20).move_to(1.80*UP+1.0*RIGHT)
        humd_normal_gi=VGroup(humd_norml_gi1,humd_normal_gi2,humd_normal_gi3,humd_normal_gi4).arrange_in_grid(rows=4,cols=1,buff=0.1)
        humd_normal_gi.move_to(1.60*UP+1.0*RIGHT)
        self.play(FadeTransform(nl,humd_normal_gi),run_time=5)
        self.play(FadeTransform(humd_normal_gi,humd_normal_gi_res),run_time=5)
        self.play(humd_normal_gi_res.animate.move_to(1.90*UP+5.50*RIGHT))
        self.wait(5)
        ################################
        humd_hi_nl=VGroup( humd_normal_gi_res,humd_high_gi_res)
        humiditygini1=Tex(r'Gini(Humidity)=$(\frac{7}{14}) * 0.490+(\frac{7}{14})*0.245$',font_size=20)
        humiditygini2=Tex(r'Gini(Humidity)=$0.245+0.122$',font_size=20)
        humidityginical=VGroup(humiditygini1,humiditygini2).arrange_in_grid(rows=2,cols=1,buff=0.1).move_to(1.60*UP+4.00*RIGHT)
        humidityginires1=Tex(r'Gini(Humidity)=$0.245+0.122$',font_size=20).move_to(1.80*UP+5.00*RIGHT)
        humidityfinal=Tex(r'Gini(Humidity)=$0.367$',font_size=20).move_to(2.20*UP+5.10*RIGHT)
        self.play(FadeTransform(humd_hi_nl,humidityginical),run_time=5)
        self.play(FadeTransform(humidityginical,humidityginires1),run_time=5)
        self.play(FadeTransform(humidityginires1,humidityfinal),run_time=5)
        self.wait(5)
        ################################
        ################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r4falseyes=VGroup(i4,i41,i42,i43,i44,l4)
        r5falseyes=VGroup(i5,i51,i52,i53,i54,l5)
        r6falseyes=VGroup(i6,i61,i62,i63,i64,l6)
        r10falseyes=VGroup(i10,i101,i102,i103,i104,l10)
        r1_1falseyes=VGroup(i1_1,i111,i112,i113,i114,l11)
        r1_4falseyes=VGroup(i1_4,i141,i142,i143,i144,l14)
        r2falseno=VGroup(i2,i21,i22,i23,i24,l2)
        r9falseno=VGroup(i9,i91,i92,i93,i94,l9)     
        falsedata=VGroup(r1,r4falseyes,r5falseyes,r6falseyes,r10falseyes,r1_1falseyes,r1_4falseyes, r2falseno,r9falseno)
        fl=falsedata.copy()
        fl_class_col=VGroup(fl[0][5],fl[1][5],fl[2][5],fl[3][5],fl[4][5],fl[5][5],fl[6][5],fl[7][5],fl[8][5])
        fl_col=VGroup(fl[0][4],fl[1][4],fl[2][4],fl[3][4],fl[4][4],fl[5][4],fl[6][4],fl[6][4],fl[7][4],fl[8][4])
        self.play(fl.animate.move_to(0.85*UP+1*RIGHT).arrange_in_grid(rows=9,cols=1,buff=0.1),run_time=5)
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(fl_col),Circumscribe(fl_class_col),time_width=1,run_time=2)
            self.wait(2)
        ################################
        wind_false_gi1=Tex(r'Gini(Windy,False)=$1-(\frac{6}{8})^2-(\frac{2}{8})^2$',font_size=20)
        wind_false_gi2=Tex(r'Gini(Windy,False)=$1-(0.75)^2-(0.25)^2$',font_size=20)
        wind_false_gi3=Tex(r'Gini(Windy,False)=$1-(0.5625)-(0.0625)$',font_size=20)
        wind_false_gi4=Tex(r'Gini(Windy,False)=$1-(0.625)$',font_size=20)
        wind_false_gi_res=Tex(r'Gini(Windy,False)=0.375',font_size=20).move_to(1.80*UP+1.0*RIGHT)
        wind_false_gi=VGroup(wind_false_gi1,wind_false_gi2,wind_false_gi3,wind_false_gi4).arrange_in_grid(rows=4,cols=1,buff=0.1)
        wind_false_gi.move_to(1.60*UP+1.0*RIGHT)
        self.play(FadeTransform(fl,wind_false_gi),run_time=5)
        self.play(FadeTransform(wind_false_gi,wind_false_gi_res),run_time=5)
        self.play(wind_false_gi_res.animate.move_to(1.90*UP+5.50*RIGHT))
        self.wait(5)
        ################################
         ################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r8trueyes=VGroup(i8,i81,i82,i83,i84,l8)
        r1_2trueyes=VGroup(i1_2,i121,i122,i123,i124,l12)
        r1_3trueyes=VGroup(i1_3,i131,i132,i133,i134,l13)
        r3trueno=VGroup(i3,i31,i32,i33,i34,l3)
        r7trueno=VGroup(i7,i71,i72,i73,i74,l7)
        r1_5trueno=VGroup(i1_5,i151,i152,i153,i154,l15)
        truedata=VGroup(r1,r8trueyes,r1_2trueyes,r1_3trueyes,r3trueno,r7trueno,r1_5trueno)      
        tr=truedata.copy()
        tr_class_col=VGroup(tr[0][5],tr[1][5],tr[2][5],tr[3][5],tr[4][5],tr[5][5],tr[6][5])
        tr_col=VGroup(tr[0][4],tr[1][4],tr[2][4],tr[3][4],tr[4][4],tr[5][4],tr[6][4])
        self.play(tr.animate.move_to(1.10*UP+1*RIGHT).arrange_in_grid(rows=7,cols=1,buff=0.1),run_time=5)
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(tr_col),Circumscribe(tr_class_col),time_width=1,run_time=2)
            self.wait(2)
        ################################
        wind_true_gi1=Tex(r'Gini(Windy,True)=$1-(\frac{3}{6})^2-(\frac{3}{6})^2$',font_size=20)
        wind_true_gi2=Tex(r'Gini(Windy,True)=$1-(0.50)^2-(0.50)^2$',font_size=20)
        wind_true_gi3=Tex(r'Gini(Windy,True)=$1-(0.25)-(0.25)$',font_size=20)
        wind_true_gi4=Tex(r'Gini(Windy,True)=$1-(0.50)$',font_size=20)
        wind_true_gi_res=Tex(r'Gini(Windy,True)=0.50',font_size=20).move_to(1.80*UP+1.0*RIGHT)
        wind_true_gi=VGroup(wind_false_gi1,wind_false_gi2,wind_false_gi3,wind_false_gi4).arrange_in_grid(rows=4,cols=1,buff=0.1)
        wind_true_gi.move_to(1.00*UP+1.0*RIGHT)
        self.play(FadeTransform(tr,wind_true_gi),run_time=5)
        self.play(FadeTransform(wind_true_gi,wind_true_gi_res),run_time=5)
        self.play(wind_true_gi_res.animate.move_to(1.60*UP+5.50*RIGHT))
        self.wait(5)
        ################################
        wind_fl_tr=VGroup(wind_true_gi_res,wind_false_gi_res)
        windgini1=Tex(r'Gini(Windy)=$(\frac{8}{14}) * 0.375+(\frac{6}{14})*0.50$',font_size=20)
        windgini2=Tex(r'Gini(Windy)=$0.2142+0.2142$',font_size=20)
        windginical=VGroup(windgini1,windgini2).arrange_in_grid(rows=2,cols=1,buff=0.1).move_to(1.60*UP+4.00*RIGHT)
        windginires1=Tex(r'Gini(Windy)=$0.2142+0.2142$',font_size=20).move_to(1.50*UP+5.00*RIGHT)
        windfinal=Tex(r'Gini(Windy)=$0.4284$',font_size=20).move_to(1.90*UP+5.10*RIGHT)
        self.play(FadeTransform(wind_fl_tr,windginical),run_time=5)
        self.play(FadeTransform(windginical,windginires1),run_time=5)
        self.play(FadeTransform(windginires1,windfinal),run_time=5)
        self.wait(5)
        ###############################
        all=VGroup(outlookfinal,temperaturefinal,humidityfinal,windfinal)
        for i in range(4):
               self.play(Circumscribe(all),time_width=20)
               self.wait(2)                                                
        ################################
        ol=LabeledDot(Text("Outlook",weight=BOLD,font_size=8),radius=0.40,color=YELLOW)
        ol.move_to(0.15*DOWN+2.50*RIGHT)
        self.play(Write(ol))
        self.wait(5)
        ################################
        hd=LabeledDot(Text("Humidity",weight=BOLD,font_size=10),radius=0.40,color=GREEN)
        hd.move_to(0.00*RIGHT+1.40*DOWN)
        sunny=Text("Sunny(2 Yes 3 No)",weight=BOLD,font_size=11,color=YELLOW,font="Georgia").scale(1.00)
        sunny.move_to(Arrow(ol.get_center(),hd.get_center()))
        ar1=[Arrow(ol.get_center(),hd.get_center(),color=RED,buff=0.40)]
        self.play(GrowArrow(ar1[0]),Write(sunny),)
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(sunny),time_width=1,run_time=2)
        ####################################
        y1=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.40,color=PINK)
        y1.move_to(2.50*RIGHT+2.00*DOWN)
        overcast=Text("Overcast(4 Yes)",weight=BOLD,font_size=11,color=YELLOW,font="Georgia").scale(1.00)
        overcast.move_to(Arrow(ol.get_center(),y1.get_center()))
        ar2=[Arrow(ol.get_center(),y1.get_center(),color=RED,buff=0.40)]       
        self.play(GrowArrow(ar2[0]),Write(overcast))
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(overcast),time_width=1,run_time=2)
        ####################################
        wn=LabeledDot(Text("Windy",weight=BOLD,font_size=10),radius=0.40,color=GREEN)
        wn.move_to(5.0*RIGHT+1.40*DOWN)
        rainy=Text("Rainy(3 Yes 2 No)",weight=BOLD,font_size=11,color=YELLOW,font="Georgia").scale(1.00)
        rainy.move_to(Arrow(ol.get_center(),wn.get_center()))
        ar3=[Arrow(ol.get_center(),wn.get_center(),color=RED,buff=0.40)]
        self.play(GrowArrow(ar3[0]),Write(rainy))
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(rainy),time_width=1,run_time=2)
        ###############################Sunny_Temp ############################### ###############################  ###############################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r2sunnyno=VGroup(i2,i21,i22,i23,i24,l2)
        r3sunnyno=VGroup(i3,i31,i32,i33,i34,l3)
        sunny_temp_ht=VGroup(r1,r2sunnyno,r3sunnyno)
        sunny_temp_ht_cp=sunny_temp_ht.copy()
        self.play(sunny_temp_ht_cp.animate.move_to(2.00*UP+1*RIGHT).arrange_in_grid(rows=3,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_temp_ht_cp_class=VGroup(sunny_temp_ht_cp[0][5],sunny_temp_ht_cp[1][5],sunny_temp_ht_cp[2][5])
        sn_cp_col=VGroup(sunny_temp_ht_cp[0][1],sunny_temp_ht_cp[1][1],sunny_temp_ht_cp[2][1])
        sn_temp_ht_cp_col=VGroup(sunny_temp_ht_cp[0][2],sunny_temp_ht_cp[1][2],sunny_temp_ht_cp[2][2])
        for i in range(5):
            self.play(Circumscribe(sn_temp_ht_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_temp_ht_cp_col),time_width=1,run_time=2)
            self.wait(2)
        ##########################################################
        sunny_temp_ht_gi1=Tex(r'Gini(Outlook=Sunny,Temp=Hot)=$1-(\frac{0}{2})^2-(\frac{2}{2})^2$',font_size=20)
        sunny_temp_ht_gi2=Tex(r'Gini(Outlook=Sunny,Temp=Hot)=$1-(0.0)^2-(1)^2$',font_size=20)
        sunny_temp_ht_gi_res=Tex(r'Gini(Outlook=Sunny,Temp=Hot)=0.00',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_temp_ht_gi=VGroup(sunny_temp_ht_gi1,sunny_temp_ht_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_temp_ht_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_temp_ht_cp,sunny_temp_ht_gi),run_time=5)
        self.play(FadeTransform(sunny_temp_ht_gi,sunny_temp_ht_gi_res),run_time=5)
        self.play(sunny_temp_ht_gi_res.animate.move_to(1.60*UP+5.50*RIGHT))
        self.wait(5)
        ######################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r10sunnyyes=VGroup(i10,i101,i102,i103,i104,l10)
        sunny_temp_cl=VGroup(r1,r10sunnyyes)
        sunny_temp_cl_cp=sunny_temp_cl.copy()
        self.play(sunny_temp_cl_cp.animate.move_to(2.10*UP+1*RIGHT).arrange_in_grid(rows=2,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_temp_cl_cp_class=VGroup(sunny_temp_cl_cp[0][5],sunny_temp_cl_cp[1][5])
        sn_cp_col=VGroup(sunny_temp_cl_cp[0][1],sunny_temp_cl_cp[1][1])
        sn_temp_cl_cp_col=VGroup(sunny_temp_cl_cp[0][2],sunny_temp_cl_cp[1][2])
        for i in range(5):
            self.play(Circumscribe(sn_temp_cl_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_temp_cl_cp_col),time_width=1,run_time=2)
            self.wait(2)
        #########################################
        sunny_temp_cl_gi1=Tex(r'Gini(Outlook=Sunny,Temp=Cool)=$1-(\frac{1}{1})^2-(\frac{0}{1})^2$',font_size=20)
        sunny_temp_cl_gi2=Tex(r'Gini(Outlook=Sunny,Temp=Cool)=$1-(1.0)^2-(0.0)^2$',font_size=20)
        sunny_temp_cl_gi_res=Tex(r'Gini(Outlook=Sunny,Temp=Cool)=0.00',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_temp_cl_gi=VGroup(sunny_temp_ht_gi1,sunny_temp_ht_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_temp_cl_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_temp_cl_cp,sunny_temp_cl_gi),run_time=5)
        self.play(FadeTransform(sunny_temp_cl_gi,sunny_temp_cl_gi_res),run_time=5)
        self.play(sunny_temp_cl_gi_res.animate.move_to(1.30*UP+5.50*RIGHT))
        self.wait(5)
        #######----#################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r12sunnyyes=VGroup(i1_2,i121,i122,i123,i124,l12)
        r9sunnyno=VGroup(i9,i91,i92,i93,i94,l9)
        sunny_temp_ml=VGroup(r1,r12sunnyyes,r9sunnyno)
        sunny_temp_ml_cp=sunny_temp_ml.copy()
        self.play(sunny_temp_ml_cp.animate.move_to(2.10*UP+1*RIGHT).arrange_in_grid(rows=3,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_temp_ml_cp_class=VGroup(sunny_temp_ml_cp[0][5],sunny_temp_ml_cp[1][5],sunny_temp_ml_cp[2][5])
        sn_cp_col=VGroup(sunny_temp_ml_cp[0][1],sunny_temp_ml_cp[1][1],sunny_temp_ml_cp[2][1])
        sn_temp_ml_cp_col=VGroup(sunny_temp_ml_cp[0][2],sunny_temp_ml_cp[1][2],sunny_temp_ml_cp[2][2])
        for i in range(5):
            self.play(Circumscribe(sn_temp_ml_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_temp_ml_cp_col),time_width=1,run_time=2)
            self.wait(2)
        ################################################
        sunny_temp_ml_gi1=Tex(r'Gini(Outlook=Sunny,Temp=Mild)=$1-(\frac{1}{2})^2-(\frac{1}{2})^2$',font_size=20)
        sunny_temp_ml_gi2=Tex(r'Gini(Outlook=Sunny,Temp=Mild)=$1-(0.50)^2-(0.50)^2$',font_size=20)
        sunny_temp_ml_gi_res=Tex(r'Gini(Outlook=Sunny,Temp=Mild)=0.50',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_temp_ml_gi=VGroup(sunny_temp_ml_gi1,sunny_temp_ml_gi2).arrange_in_grid(rows=3,cols=1,buff=0.1)
        sunny_temp_ml_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_temp_ml_cp,sunny_temp_ml_gi),run_time=5)
        self.play(FadeTransform(sunny_temp_ml_gi,sunny_temp_ml_gi_res),run_time=5)
        self.play(sunny_temp_ml_gi_res.animate.move_to(1.00*UP+5.50*RIGHT))
        self.wait(5)
        #################################
        sunny_temp_ht_cl_ml=VGroup(sunny_temp_ht_gi_res,sunny_temp_cl_gi_res,sunny_temp_ml_gi_res)
        sunny_temp_ht_cl_ml_gi1=Tex(r'Gini(Outlook=Sunny,Temp)=$(\frac{2}{5})*0+(\frac{1}{5})*0+(\frac{2}{5})*0.5$',font_size=20)
        sunny_temp_ht_cl_ml_gi2=Tex(r'Gini(Outlook=Sunny,Temp)=$0.00+0.00+0.20$',font_size=20)
        sunny_temp_ht_cl_ml_gi_res=Tex(r'Gini(Outlook=Sunny,Temp)=0.20',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_temp_ht_cl_ml_gi=VGroup(sunny_temp_ht_cl_ml_gi1,sunny_temp_ht_cl_ml_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_temp_ht_cl_ml_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_temp_ht_cl_ml,sunny_temp_ht_cl_ml_gi),run_time=5)
        self.play(FadeTransform(sunny_temp_ht_cl_ml_gi,sunny_temp_ht_cl_ml_gi_res),run_time=5)
        self.play(sunny_temp_ht_cl_ml_gi_res.animate.move_to(1.60*UP+5.50*RIGHT))
        self.wait(5)
        ###############################
        ############################### ###############################  ###############################  ###############################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r2sunnyno=VGroup(i2,i21,i22,i23,i24,l2)
        r3sunnyno=VGroup(i3,i31,i32,i33,i34,l3)
        r9sunnyno=VGroup(i9,i91,i92,i93,i94,l9)
        sunny_humd_high=VGroup(r1,r2sunnyno,r3sunnyno,r9sunnyno)
        sunny_humd_high_cp=sunny_humd_high.copy()
        self.play(sunny_humd_high_cp.animate.move_to(2.00*UP+1*RIGHT).arrange_in_grid(rows=4,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_humd_high_cp_class=VGroup(sunny_humd_high_cp[0][5],sunny_humd_high_cp[1][5],sunny_humd_high_cp[2][5],sunny_humd_high_cp[3][5])
        sn_cp_col=VGroup(sunny_humd_high_cp[0][1],sunny_humd_high_cp[1][1],sunny_humd_high_cp[2][1],sunny_humd_high_cp[3][1])
        sn_humd_high_cp_col=VGroup(sunny_humd_high_cp[0][3],sunny_humd_high_cp[1][3],sunny_humd_high_cp[2][3],sunny_humd_high_cp[3][3])
        for i in range(5):
            self.play(Circumscribe(sn_humd_high_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_humd_high_cp_col),time_width=1,run_time=2)
            self.wait(2)
        ###################################################################  #############################
        sunny_humd_high_gi1=Tex(r'Gini(Outlook=Sunny,Humidity=High)=$1-(\frac{0}{3})^2-(\frac{3}{3})^2$',font_size=20)
        sunny_humd_high_gi2=Tex(r'Gini(Outlook=Sunny,Humidity=High)=$1-(0.0)^2-(1)^2$',font_size=20)
        sunny_humd_high_gi_res=Tex(r'Gini(Outlook=Sunny,Humidity=High)=0.00',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_humd_high_gi=VGroup(sunny_humd_high_gi1,sunny_humd_high_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_humd_high_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_humd_high_cp,sunny_humd_high_gi),run_time=5)
        self.play(FadeTransform(sunny_humd_high_gi,sunny_humd_high_gi_res),run_time=5)
        self.play(sunny_humd_high_gi_res.animate.move_to(1.30*UP+5.40*RIGHT))
        self.wait(5)
        #############################################################################################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r10sunnyyes=VGroup(i10,i101,i102,i103,i104,l10)
        r12sunnyyes=VGroup(i1_2,i121,i122,i123,i124,l12)
        sunny_humd_normal=VGroup(r1,r10sunnyyes,r12sunnyyes)
        sunny_humd_normal_cp=sunny_humd_normal.copy()
        self.play(sunny_humd_normal_cp.animate.move_to(2.10*UP+1*RIGHT).arrange_in_grid(rows=3,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_humd_normal_cp_class=VGroup(sunny_humd_normal_cp[0][5],sunny_humd_normal_cp[1][5],sunny_humd_normal_cp[2][5])
        sn_cp_col=VGroup(sunny_humd_normal_cp[0][1],sunny_humd_normal_cp[1][1],sunny_humd_normal_cp[2][1])
        sn_humd_normal_cp_col=VGroup(sunny_humd_normal_cp[0][3],sunny_humd_normal_cp[1][3],sunny_humd_normal_cp[2][3])
        for i in range(5):
            self.play(Circumscribe(sn_humd_normal_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_humd_normal_cp_col),time_width=1,run_time=2)
            self.wait(1)
        #############################################################################################################
        sunny_humd_normal_gi1=Tex(r'Gini(Outlook=Sunny,Humidity=Normal)=$1-(\frac{2}{2})^2-(\frac{0}{2})^2$',font_size=20)
        sunny_humd_normal_gi2=Tex(r'Gini(Outlook=Sunny,Humidity=Normal)=$1-(1.0)^2-(0.0)^2$',font_size=20)
        sunny_humd_normal_gi_res=Tex(r'Gini(Outlook=Sunny,Humidity=Normal)=0.00',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_humd_normal_gi=VGroup(sunny_temp_ht_gi1,sunny_temp_ht_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_humd_normal_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_humd_normal_cp,sunny_humd_normal_gi),run_time=5)
        self.play(FadeTransform(sunny_humd_normal_gi,sunny_humd_normal_gi_res),run_time=5)
        self.play(sunny_humd_normal_gi_res.animate.move_to(1.00*UP+5.40*RIGHT))
        self.wait(1)
        #######----#########
        
        #################################
        sunny_humd_high_normal=VGroup(sunny_humd_high_gi_res,sunny_humd_normal_gi_res)
        sunny_humd_high_normal_gi1=Tex(r'Gini(Outlook=Sunny,Humidity)=$(\frac{3}{5})*0+(\frac{2}{5})*0$',font_size=20)
        sunny_humd_high_normal_gi2=Tex(r'Gini(Outlook=Sunny,Humidity)=$0.00+0.00$',font_size=20)
        sunny_humd_high_normal_res=Tex(r'Gini(Outlook=Sunny,Humidity)=0.00',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_humd_high_normal_gi=VGroup(sunny_humd_high_normal_gi1,sunny_humd_high_normal_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_humd_high_normal_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_humd_high_normal,sunny_humd_high_normal_gi),run_time=5)
        self.play(FadeTransform(sunny_humd_high_normal_gi,sunny_humd_high_normal_res),run_time=5)
        self.play(sunny_humd_high_normal_res.animate.move_to(1.30*UP+5.40*RIGHT))
        self.wait(5)
        ###############################
        ############################### ###############################  ###############################  ###############################       
        ############################### ###############################  ###############################  ###############################
        ###############################
        ############################### ###############################  ###############################  ###############################       
        ############################### ###############################  ###############################  ###############################
        r1=VGroup(i1,i11,i12,i13,i14,l1) 
        r3sunnyno=VGroup(i3,i31,i32,i33,i34,l3)
        r12sunnyyes=VGroup(i1_2,i121,i122,i123,i124,l12)
        sunny_windy_true=VGroup(r1,r12sunnyyes,r3sunnyno)
        sunny_windy_true_cp=sunny_windy_true.copy()
        self.play(sunny_windy_true_cp.animate.move_to(2.00*UP+1*RIGHT).arrange_in_grid(rows=3,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_windy_true_cp_class=VGroup(sunny_windy_true_cp[0][5],sunny_windy_true_cp[1][5],sunny_windy_true_cp[2][5])
        sn_cp_col=VGroup(sunny_windy_true_cp[0][1],sunny_windy_true_cp[1][1],sunny_windy_true_cp[2][1])
        sn_windy_true_cp_col=VGroup(sunny_windy_true_cp[0][4],sunny_windy_true_cp[1][4],sunny_windy_true_cp[2][4])
        for i in range(5):
            self.play(Circumscribe(sn_windy_true_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_windy_true_cp_col),time_width=1,run_time=2)
            self.wait(2)
        ############################### ###############################  ###############################  ###############################
        sunny_windy_true_gi1=Tex(r'Gini(Outlook=Sunny,Windy=True)=$1-(\frac{1}{2})^2-(\frac{1}{2})^2$',font_size=20)
        sunny_windy_true_gi2=Tex(r'Gini(Outlook=Sunny,Windy=True)=$1-(0.50)^2-(0.50)^2$',font_size=20)
        sunny_windy_true_gi_res=Tex(r'Gini(Outlook=Sunny,Windy=True)=0.50',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_windy_true_gi=VGroup(sunny_windy_true_gi1,sunny_windy_true_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_windy_true_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_windy_true_cp,sunny_windy_true_gi),run_time=5)
        self.play(FadeTransform(sunny_windy_true_gi,sunny_windy_true_gi_res),run_time=5)
        self.play(sunny_windy_true_gi_res.animate.move_to(1.00*UP+5.40*RIGHT))
        self.wait(5)
        ############################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r2sunnyno=VGroup(i2,i21,i22,i23,i24,l2)
        r9sunnyno=VGroup(i9,i91,i92,i93,i94,l9)
        r10sunnyyes=VGroup(i10,i101,i102,i103,i104,l10)
        sunny_windy_false=VGroup(r1,r10sunnyyes,r2sunnyno,r9sunnyno)
        sunny_windy_false_cp=sunny_windy_false.copy()
        self.play(sunny_windy_false_cp.animate.move_to(2.10*UP+1*RIGHT).arrange_in_grid(rows=4,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_windy_false_cp_class=VGroup(sunny_windy_false_cp[0][5],sunny_windy_false_cp[1][5],sunny_windy_false_cp[2][5],sunny_windy_false_cp[3][5])
        sn_cp_col=VGroup(sunny_windy_false_cp[0][1],sunny_windy_false_cp[1][1],sunny_windy_false_cp[2][1],sunny_windy_false_cp[3][1])
        sn_windy_false_cp_col=VGroup(sunny_windy_false_cp[0][4],sunny_windy_false_cp[1][4],sunny_windy_false_cp[2][4],sunny_windy_false_cp[3][4])
        for i in range(5):
            self.play(Circumscribe(sn_windy_false_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_windy_false_cp_col),time_width=1,run_time=2)
            self.wait(5)
        #####################################################################################################################################################
        sunny_windy_false_gi1=Tex(r'Gini(Outlook=Sunny,Windy=False)=$1-(\frac{1}{3})^2-(\frac{2}{3})^2$',font_size=20)
        sunny_windy_false_gi2=Tex(r'Gini(Outlook=Sunny,Windy=False)=$1-(0.33)^2-(0.66)^2$',font_size=20)
        sunny_windy_false_gi_res=Tex(r'Gini(Outlook=Sunny,Windy=False)=0.455',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_windy_false_gi=VGroup(sunny_windy_false_gi1,sunny_windy_false_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_windy_false_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_windy_false_cp,sunny_windy_false_gi),run_time=5)
        self.play(FadeTransform(sunny_windy_false_gi,sunny_windy_false_gi_res),run_time=5)
        self.play(sunny_windy_false_gi_res.animate.move_to(0.70*UP+5.40*RIGHT))
        self.wait(5)
        
        #################################
        sunny_windy_true_false=VGroup(sunny_windy_true_gi_res,sunny_windy_false_gi_res)
        sunny_windy_true_false_gi1=Tex(r'Gini(Outlook=Sunny,Windy)=$(\frac{2}{5})*0.5000+(\frac{3}{5})*0.4555$',font_size=20)
        sunny_windy_true_false_gi2=Tex(r'Gini(Outlook=Sunny,Windy)=$0.2000+0.2743$',font_size=20)
        sunny_windy_true_false_res=Tex(r'Gini(Outlook=Sunny,Windy)=0.474',font_size=16).move_to(1.5*UP+0.80*RIGHT)
        sunny_windy_true_false_gi=VGroup(sunny_windy_true_false_gi1,sunny_windy_true_false_gi2).arrange_in_grid(rows=2,cols=1,buff=0.1)
        sunny_windy_true_false_gi.move_to(1.80*UP+1.0*RIGHT)
        self.play(FadeTransform(sunny_windy_true_false,sunny_windy_true_false_gi),run_time=5)
        self.play(FadeTransform(sunny_windy_true_false_gi,sunny_windy_true_false_res),run_time=5)
        self.play(sunny_windy_true_false_res.animate.move_to(1.00*UP+5.40*RIGHT))
        self.wait(5)
        ###############################
        all=VGroup(sunny_temp_ht_cl_ml_gi_res,sunny_humd_high_normal_res,sunny_windy_true_false_res)
        for i in range(4):
               self.play(Circumscribe(all),time_width=20)
               self.wait(1)
        ###############################
        hd=LabeledDot(Text("Humidity",weight=BOLD,font_size=10),radius=0.40,color=GREEN)
        hd.move_to(0.00*RIGHT+1.40*DOWN)
        self.play(GrowArrow(ar1[0]),Write(hd))
        self.wait(5)
        ############################### ###############################  ###############################  ###############################       
        ############################### ######
        sunny_humd_high=VGroup(r1,r2sunnyno,r3sunnyno,r9sunnyno)
        sunny_humd_high_cp=sunny_humd_high.copy()
        self.play(sunny_humd_high_cp.animate.move_to(2.00*UP+1*RIGHT).arrange_in_grid(rows=4,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_humd_high_cp_class=VGroup(sunny_humd_high_cp[0][5],sunny_humd_high_cp[1][5],sunny_humd_high_cp[2][5],sunny_humd_high_cp[3][5])
        sn_cp_col=VGroup(sunny_humd_high_cp[0][1],sunny_humd_high_cp[1][1],sunny_humd_high_cp[2][1],sunny_humd_high_cp[3][1])
        sn_humd_high_cp_col=VGroup(sunny_humd_high_cp[0][3],sunny_humd_high_cp[1][3],sunny_humd_high_cp[2][3],sunny_humd_high_cp[3][3])
        for i in range(5):
            self.play(Circumscribe(sn_humd_high_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_humd_high_cp_col),time_width=1,run_time=2)
            self.wait(1)
        self.remove(*sunny_humd_high_cp)
        ############################### ###############################  ###############################  ###############################       
        ############################### ######
        n1=LabeledDot(Text("No",weight=BOLD,font_size=10),radius=0.40,color=PINK)
        n1.move_to(1.20*LEFT+2.65*DOWN)
        high=Text("High(3 No)",weight=BOLD,font_size=10,color=YELLOW,font="Georgia").scale(1.00)
        high.move_to(Arrow(hd.get_center(),n1.get_center()))
        ar4=[Arrow(hd.get_center(),n1.get_center(),color=RED,buff=0.40)]
        self.play(Write(n1),GrowArrow(ar4[0]),Write(high))
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(high),time_width=1,run_time=2)
        ####################################
        sunny_humd_normal=VGroup(r1,r10sunnyyes,r12sunnyyes)
        sunny_humd_normal_cp=sunny_humd_normal.copy()
        self.play(sunny_humd_normal_cp.animate.move_to(2.10*UP+1*RIGHT).arrange_in_grid(rows=3,cols=1,buff=0.1),run_time=20)
        self.wait(5)
        sn_humd_normal_cp_class=VGroup(sunny_humd_normal_cp[0][5],sunny_humd_normal_cp[1][5],sunny_humd_normal_cp[2][5])
        sn_cp_col=VGroup(sunny_humd_normal_cp[0][1],sunny_humd_normal_cp[1][1],sunny_humd_normal_cp[2][1])
        sn_humd_normal_cp_col=VGroup(sunny_humd_normal_cp[0][3],sunny_humd_normal_cp[1][3],sunny_humd_normal_cp[2][3])
        for i in range(5):
            self.play(Circumscribe(sn_humd_normal_cp_class),Circumscribe(sn_cp_col),Circumscribe(sn_humd_normal_cp_col),time_width=1,run_time=2)
            self.wait(2)
        self.remove(*sunny_humd_normal_cp)
        ############################### ###############################  ###############################  ###############################       
        ############################### ######
        y2=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.40,color=PINK)
        y2.move_to(1.20*RIGHT+2.60*DOWN)
        norml=Text("Normal(2 Yes)",weight=BOLD,font_size=10,color=YELLOW,font="Georgia").scale(1.00)
        norml.move_to(Arrow(hd.get_center(),y2.get_center()))
        ar4=[Arrow(hd.get_center(),y2.get_center(),color=RED,buff=0.40)]
        self.play(GrowArrow(ar4[0]),Write(y2),Write(norml))
        self.wait(4)
        for i in range(5):
            self.play(Circumscribe(norml),time_width=1,run_time=2)
        ########################################################################################################################################
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r4overcastyes=VGroup(i4,i41,i42,i43,i44,l4)
        r8overcastyes=VGroup(i8,i81,i82,i83,i84,l8)
        r1_3overcastyes=VGroup(i1_3,i131,i132,i133,i134,l13)
        r1_4overcastyes=VGroup(i1_4,i141,i142,i143,i144,l14)
        overcastdata=VGroup(r1,r4overcastyes,r8overcastyes,r1_3overcastyes,r1_4overcastyes)
        ov=overcastdata.copy()
        ov_class_col=VGroup(ov[0][5],ov[1][5],ov[2][5],ov[3][5],ov[4][5])
        ov_col=VGroup(ov[0][1],ov[1][1],ov[2][1],ov[3][1],ov[4][1])
        self.play(ov.animate.move_to(1.60*UP+1*RIGHT).arrange_in_grid(rows=5,cols=1,buff=0.1),run_time=5)
        self.wait(10)
        for i in range(5):
            self.play(Circumscribe(ov_col),Circumscribe(ov_class_col),time_width=1,run_time=2)
            self.wait(2)
        self.remove(*ov)
        #################################### #################################### ####################################
        self.play(GrowArrow(ar2[0]),Write(overcast),Write(y1))
        self.wait(4)
        #################################### #################################### ####################################       
        r1=VGroup(i1,i11,i12,i13,i14,l1)
        r5rainyyes=VGroup(i5,i51,i52,i53,i54,l5)
        r6rainyyes=VGroup(i6,i61,i62,i63,i64,l6)
        r7rainyno=VGroup(i7,i71,i72,i73,i74,l7)
        r1_1rainyyes=VGroup(i1_1,i111,i112,i113,i114,l11)
        r1_5rainyyes=VGroup(i1_5,i151,i152,i153,i154,l15)
        rainydata=VGroup(r1,r5rainyyes,r6rainyyes,r1_1rainyyes,r7rainyno,r1_5rainyyes)
        rn= rainydata.copy()
        self.play(rn.animate.move_to(1.60*UP+1*RIGHT).arrange_in_grid(rows=6,cols=1,buff=0.1),run_time=5)
        rn_class_col_yes=VGroup(rn[1][5],rn[2][5],rn[3][5])
        rn_class_col_no=VGroup(rn[4][5],rn[5][5])
        rn_col_yes=VGroup(rn[1][1],rn[2][1],rn[3][1])
        rn_col_no=VGroup(rn[4][1],rn[5][1])
        rn_wn_col_yes=VGroup(rn[1][4],rn[2][4],rn[3][4])
        rn_wn_col_no=VGroup(rn[4][4],rn[5][4])
        for i in range(10):
            self.play(Circumscribe(rn_col_yes),Circumscribe(rn_col_no),Circumscribe(rn_wn_col_yes),Circumscribe(rn_wn_col_no),Circumscribe(rn_class_col_yes),Circumscribe(rn_class_col_no),time_width=1,run_time=2)
            self.wait(2)
        self.remove(*rn)
        #################################### #################################### ####################################
        n2=LabeledDot(Text("No",weight=BOLD,font_size=10),radius=0.40,color=PINK)
        n2.move_to(3.70*RIGHT+2.65*DOWN)
        true=Text("True(2 No)",weight=BOLD,font_size=10,color=YELLOW,font="Georgia").scale(1.00)
        true.move_to(Arrow(wn.get_center(),n2.get_center()))
        ar4=[Arrow(wn.get_center(),n2.get_center(),color=RED,buff=0.40)]
        self.play(GrowArrow(ar4[0]),Write(wn))
        
        ####################################### ####################################  #################################### 
        self.play(Write(n2),GrowArrow(ar4[0]),Write(true))
        self.wait(4)
        for i in range(5):
            self.play(Circumscribe(true),time_width=1,run_time=2)
        ######################################################################## ####################################
        
        #################################### #################################### ####################################
        y3=LabeledDot(Text("Yes",weight=BOLD,font_size=10),radius=0.40,color=PINK)
        y3.move_to(6.30*RIGHT+2.65*DOWN)
        false=Text("False(3 Yes)",weight=BOLD,font_size=10,color=YELLOW,font="Georgia").scale(1.00)
        false.move_to(Arrow(wn.get_center(),y3.get_center()))
        ar5=[Arrow(wn.get_center(),y3.get_center(),color=RED,buff=0.40)]
        self.play(Write(y3),GrowArrow(ar5[0]),Write(false))
        self.wait(5)
        for i in range(5):
            self.play(Circumscribe(false),time_width=1,run_time=2)
        ####################################
        self.wait(20)
        self.clear()
        end=Text("Thanks for Watching").scale(1)
        self.play(Write(end))
        self.wait(15)
        

 

 

©Postnetwork-All rights reserved.