diff --git a/Module_3/Week4/exercise.ipynb b/Module_3/Week4/exercise.ipynb index 3e2b892f..c2556cfc 100644 --- a/Module_3/Week4/exercise.ipynb +++ b/Module_3/Week4/exercise.ipynb @@ -24,8 +24,7 @@ "outputs": [], "source": [ "PATH = '/Users/microwave/AIO_2024/Module_3/Week4/Housing.csv'\n", - "df = pd.read_csv(PATH)\n", - "\n" + "df = pd.read_csv(PATH)" ] }, { diff --git a/Module_3/Week5/Problem 3.csv b/Module_3/Week5/Problem 3.csv new file mode 100644 index 00000000..57e5c915 --- /dev/null +++ b/Module_3/Week5/Problem 3.csv @@ -0,0 +1,511 @@ +X,Y,month,day,FFMC,DMC,DC,ISI,temp,RH,wind,rain,area +7,5,mar,fri,4.468204331,26.2,94.3,1.808288771,8.2,51,6.7,False,0.0 +7,4,oct,tue,4.517431272,35.4,669.1,2.041220329,18.0,33,0.9,False,0.0 +7,4,oct,sat,4.517431272,43.7,686.9,2.041220329,14.6,33,1.3,False,0.0 +8,6,mar,fri,4.529368473,33.3,77.5,2.302585093,8.3,97,4.0,True,0.0 +8,6,mar,sun,4.50313746,51.3,102.2,2.360854001,11.4,99,1.8,False,0.0 +8,6,aug,sun,4.535820108,85.3,488.0,2.753660712,22.2,29,5.4,False,0.0 +8,6,aug,mon,4.535820108,88.9,495.6,2.251291799,24.1,27,3.1,False,0.0 +8,6,aug,mon,4.527208645,145.4,608.2,2.459588842,8.0,86,2.2,False,0.0 +8,6,sep,tue,4.521788577,129.5,692.6,2.079441542,13.1,63,5.4,False,0.0 +7,5,sep,sat,4.537961436,88.0,698.6,2.091864062,22.8,40,4.0,False,0.0 +7,5,sep,sat,4.537961436,88.0,698.6,2.091864062,17.8,51,7.2,False,0.0 +7,5,sep,sat,4.541164856,73.2,713.0,3.161246712,19.3,38,4.0,False,0.0 +6,5,sep,mon,4.520701029,126.5,686.5,2.079441542,21.3,42,2.2,False,0.0 +6,5,sep,wed,4.542230386,133.3,699.6,2.32238772,26.4,21,4.5,False,0.0 +6,5,sep,fri,4.54648119,141.2,713.9,2.701361213,22.9,44,5.4,False,0.0 +5,5,mar,sat,4.529368473,35.8,80.8,2.174751721,15.1,27,5.4,False,0.0 +8,5,oct,mon,4.453183829,32.8,664.2,1.386294361,16.7,47,4.9,False,0.0 +6,4,mar,wed,4.502029427,27.9,70.8,1.987874348,15.9,35,4.0,False,0.0 +6,4,apr,sat,4.469350463,27.4,97.1,1.808288771,9.3,44,4.5,False,0.0 +6,4,sep,tue,4.521788577,129.5,692.6,2.079441542,18.3,40,2.7,False,0.0 +5,4,sep,mon,4.53044664,78.5,724.3,2.32238772,19.1,38,2.7,False,0.0 +7,4,jun,sun,4.557029811,96.3,200.0,4.044804117,21.0,44,4.5,False,0.0 +7,4,aug,sat,4.513054897,110.9,537.4,1.974081026,19.5,43,5.8,False,0.0 +7,4,aug,sat,4.548599834,139.4,594.2,3.058707073,23.7,32,5.8,False,0.0 +7,4,aug,sun,4.526126979,142.4,601.4,2.451005098,16.3,60,5.4,False,0.0 +7,4,sep,fri,4.536891345,117.9,668.0,2.58021683,19.0,34,5.8,False,0.0 +7,4,sep,mon,4.520701029,126.5,686.5,2.079441542,19.4,48,1.3,False,0.0 +6,3,sep,sat,4.547541073,145.4,721.4,2.208274414,30.2,24,2.7,False,0.0 +6,3,sep,sun,4.548599834,149.3,728.6,2.208274414,22.8,39,3.6,False,0.0 +6,3,sep,fri,4.557029811,85.1,692.3,2.827313622,25.4,24,3.6,False,0.0 +6,3,sep,mon,4.49535532,91.8,709.9,2.091864062,11.2,78,7.6,False,0.0 +6,3,sep,fri,4.49535532,69.7,706.8,1.916922612,20.6,37,1.8,False,0.0 +6,3,sep,sun,4.529368473,75.6,718.3,2.174751721,17.7,39,3.6,False,0.0 +6,3,sep,mon,4.53044664,78.5,724.3,2.32238772,21.2,32,2.7,False,0.0 +6,3,sep,tue,4.514150788,80.7,730.2,1.987874348,18.2,62,4.5,False,0.0 +6,3,oct,tue,4.517431272,35.4,669.1,2.041220329,21.7,24,4.5,False,0.0 +7,4,oct,fri,4.510859507,41.5,682.6,2.272125886,11.3,60,5.4,False,0.0 +7,3,oct,sat,4.517431272,43.7,686.9,2.041220329,17.8,27,4.0,False,0.0 +4,4,mar,tue,4.489759334,25.7,67.6,1.568615918,14.1,43,2.7,False,0.0 +4,4,jul,tue,4.388257184,60.6,366.7,0.9162907319,23.3,37,3.1,False,0.0 +4,4,aug,sat,4.513054897,96.9,624.2,2.292534757,18.4,42,6.7,False,0.0 +4,4,aug,tue,4.562262685,108.3,647.1,2.890371758,16.6,54,5.4,False,0.0 +4,4,sep,sat,4.537961436,88.0,698.6,2.091864062,19.6,48,2.7,False,0.0 +4,4,sep,wed,4.511957804,82.9,735.7,1.974081026,12.9,74,4.9,False,0.0 +5,6,sep,wed,4.557029811,85.1,692.3,2.827313622,25.9,24,4.0,False,0.0 +5,6,sep,mon,4.520701029,126.5,686.5,2.079441542,14.7,70,3.6,False,0.0 +6,6,jul,mon,4.555979942,62.3,442.9,2.48490665,23.0,36,3.1,False,0.0 +4,4,mar,mon,4.479606963,23.9,64.7,1.62924054,11.8,35,1.8,False,0.0 +4,4,mar,mon,4.484131858,52.2,103.8,1.791759469,11.0,46,5.8,False,0.0 +4,4,sep,thu,4.542230386,137.0,706.4,2.32238772,20.8,17,1.3,False,0.0 +4,3,aug,sun,4.513054897,99.6,631.2,1.987874348,21.5,34,2.2,False,0.0 +4,3,aug,wed,4.533674184,111.2,654.1,2.360854001,20.4,42,4.9,False,0.0 +4,3,aug,wed,4.533674184,111.2,654.1,2.360854001,20.4,42,4.9,False,0.0 +4,3,aug,thu,4.529368473,114.3,661.3,1.987874348,17.6,45,3.6,False,0.0 +4,3,sep,thu,4.542230386,137.0,706.4,2.32238772,27.7,24,2.2,False,0.0 +4,3,sep,tue,4.514150788,80.7,730.2,1.987874348,17.8,63,4.9,False,0.0 +4,3,oct,sun,4.539030383,46.5,691.8,2.282382386,13.8,50,2.7,False,0.0 +2,2,feb,mon,4.442651256,9.3,34.0,1.131402111,13.9,40,5.4,False,0.0 +2,2,feb,fri,4.472780998,13.2,43.0,1.840549633,12.3,51,0.9,False,0.0 +2,2,mar,sun,4.50313746,51.3,102.2,2.360854001,11.5,39,5.8,False,0.0 +2,2,mar,sun,4.50313746,51.3,102.2,2.360854001,5.5,59,6.3,False,0.0 +2,2,aug,thu,4.543294782,75.3,466.6,2.163323026,18.8,35,4.9,False,0.0 +2,2,aug,sun,4.513054897,99.6,631.2,1.987874348,20.8,33,2.7,False,0.0 +2,2,aug,mon,4.522874943,103.2,638.8,1.916922612,23.1,31,3.1,False,0.0 +2,2,aug,thu,4.529368473,114.3,661.3,1.987874348,18.6,44,4.5,False,0.0 +2,2,sep,fri,4.536891345,117.9,668.0,2.58021683,23.0,37,4.5,False,0.0 +2,2,sep,fri,4.536891345,117.9,668.0,2.58021683,19.6,33,5.4,False,0.0 +2,2,sep,fri,4.536891345,117.9,668.0,2.58021683,19.6,33,6.3,False,0.0 +4,5,mar,fri,4.529368473,33.3,77.5,2.302585093,17.2,26,4.5,False,0.0 +4,5,mar,fri,4.523960131,48.3,97.8,2.602689685,15.8,27,7.6,False,0.0 +4,5,sep,fri,4.557029811,85.1,692.3,2.827313622,17.7,37,3.6,False,0.0 +5,4,mar,fri,4.529368473,33.3,77.5,2.302585093,15.6,25,6.3,False,0.0 +5,4,aug,tue,4.497584975,147.3,614.5,2.302585093,17.3,43,4.5,False,0.0 +5,4,sep,fri,4.54648119,141.2,713.9,2.701361213,27.6,30,1.3,False,0.0 +9,9,feb,thu,4.445001434,6.8,26.6,2.163323026,6.7,79,3.1,False,0.0 +9,9,feb,fri,4.472780998,13.2,43.0,1.840549633,15.7,43,3.1,False,0.0 +1,3,mar,mon,4.484131858,52.2,103.8,1.791759469,8.3,72,3.1,False,0.0 +1,2,aug,fri,4.511957804,108.0,529.8,2.602689685,14.7,66,2.7,False,0.0 +1,2,aug,tue,4.521788577,121.2,561.6,2.079441542,21.6,19,6.7,False,0.0 +1,2,aug,sun,4.526126979,142.4,601.4,2.451005098,19.5,39,6.3,False,0.0 +1,2,aug,sun,4.513054897,99.6,631.2,1.987874348,17.9,44,2.2,False,0.0 +1,2,aug,tue,4.562262685,108.3,647.1,2.890371758,18.6,51,4.5,False,0.0 +1,2,aug,wed,4.533674184,111.2,654.1,2.360854001,16.6,47,0.9,False,0.0 +1,2,aug,thu,4.529368473,114.3,661.3,1.987874348,20.2,45,3.6,False,0.0 +1,2,sep,thu,4.542230386,137.0,706.4,2.32238772,21.5,15,0.9,False,0.0 +1,2,sep,thu,4.542230386,137.0,706.4,2.32238772,25.4,27,2.2,False,0.0 +1,2,sep,thu,4.542230386,137.0,706.4,2.32238772,22.4,34,2.2,False,0.0 +1,2,sep,sun,4.548599834,149.3,728.6,2.208274414,25.3,36,3.6,False,0.0 +6,5,mar,sat,4.529368473,35.8,80.8,2.174751721,17.4,25,4.9,False,0.0 +6,5,aug,sat,4.513054897,96.9,624.2,2.292534757,14.7,59,5.8,False,0.0 +8,6,mar,fri,4.529368473,35.8,80.8,2.174751721,17.4,24,5.4,False,0.0 +8,6,aug,sun,4.535820108,85.3,488.0,2.753660712,20.8,32,6.3,False,0.0 +8,6,aug,sun,4.526126979,142.4,601.4,2.451005098,18.2,43,4.9,False,0.0 +8,6,aug,mon,4.522874943,103.2,638.8,1.916922612,23.4,22,2.7,False,0.0 +4,4,sep,sun,4.507557357,90.0,704.4,1.757857918,17.8,64,1.3,False,0.0 +3,4,feb,sat,4.441474093,8.0,30.2,1.280933845,12.7,48,1.8,False,0.0 +3,4,aug,sun,4.526126979,142.4,601.4,2.451005098,11.6,87,4.5,False,0.0 +3,4,aug,sun,4.526126979,142.4,601.4,2.451005098,19.8,39,5.4,False,0.0 +3,4,aug,sun,4.526126979,142.4,601.4,2.451005098,19.8,39,5.4,False,0.0 +3,4,aug,tue,4.497584975,147.3,614.5,2.302585093,14.4,66,5.4,False,0.0 +2,4,aug,tue,4.562262685,108.3,647.1,2.890371758,20.1,40,4.0,False,0.0 +2,4,sep,sat,4.537961436,121.1,674.4,2.261763098,24.1,29,4.5,False,0.0 +2,4,jan,sat,4.420044702,3.7,9.3,1.360976553,5.3,78,3.1,False,0.0 +4,5,mar,fri,4.464758032,19.5,57.3,1.335001067,12.7,52,6.3,False,0.0 +4,5,mar,thu,4.526126979,30.7,74.3,2.140066163,18.2,29,3.1,False,0.0 +4,5,aug,sun,4.513054897,99.6,631.2,1.987874348,21.4,33,3.1,False,0.0 +4,5,sep,sat,4.537961436,88.0,698.6,2.091864062,20.3,45,3.1,False,0.0 +4,5,sep,mon,4.49535532,91.8,709.9,2.091864062,17.4,56,5.4,False,0.0 +4,4,mar,fri,4.464758032,19.5,57.3,1.335001067,13.7,43,5.8,False,0.0 +3,4,mar,fri,4.529368473,33.3,77.5,2.302585093,18.8,18,4.5,False,0.0 +3,4,sep,sun,4.507557357,90.0,704.4,1.757857918,22.8,39,3.6,False,0.0 +3,4,sep,mon,4.53044664,78.5,724.3,2.32238772,18.9,35,2.7,False,0.0 +3,4,mar,tue,4.489759334,25.7,67.6,1.568615918,15.8,27,7.6,False,0.0 +3,5,mar,tue,4.489759334,25.7,67.6,1.568615918,15.5,27,6.3,False,0.0 +3,4,mar,sat,4.529368473,35.8,80.8,2.174751721,11.6,30,6.3,False,0.0 +3,4,mar,sat,4.529368473,35.8,80.8,2.174751721,15.2,27,4.9,False,0.0 +3,4,mar,mon,4.511957804,39.7,86.6,1.974081026,10.6,30,4.0,False,0.0 +3,4,aug,thu,4.543294782,75.3,466.6,2.163323026,19.6,36,3.1,False,0.0 +3,4,aug,mon,4.527208645,145.4,608.2,2.459588842,10.3,74,2.2,False,0.0 +3,4,aug,mon,4.527208645,145.4,608.2,2.459588842,17.1,43,5.4,False,0.0 +3,4,sep,sun,4.536891345,124.1,680.7,2.251291799,22.5,42,5.4,False,0.0 +3,4,sep,tue,4.447346101,73.4,671.9,1.435084525,17.9,45,3.1,False,0.0 +3,4,sep,fri,4.557029811,85.1,692.3,2.827313622,19.8,50,5.4,False,0.0 +3,4,oct,sun,4.539030383,46.5,691.8,2.282382386,20.6,24,5.4,False,0.0 +3,5,mar,mon,4.484131858,52.2,103.8,1.791759469,9.0,49,2.2,False,0.0 +3,5,sep,fri,4.548599834,149.3,728.6,2.208274414,17.2,43,3.1,False,0.0 +3,5,oct,wed,4.526126979,37.9,673.8,1.824549292,15.9,46,3.6,False,0.0 +2,5,oct,sun,4.539030383,46.5,691.8,2.282382386,15.4,35,0.9,False,0.0 +4,6,mar,mon,4.479606963,23.9,64.7,1.62924054,14.0,39,3.1,False,0.0 +4,6,mar,sun,4.50313746,51.3,102.2,2.360854001,10.6,46,4.9,False,0.0 +4,6,sep,thu,4.550714,80.9,685.2,2.939161922,17.6,42,3.1,False,0.0 +3,5,mar,tue,4.489759334,25.7,67.6,1.568615918,14.9,38,2.7,False,0.0 +3,5,aug,sat,4.548599834,139.4,594.2,3.058707073,17.6,52,5.8,False,0.0 +3,6,sep,sun,4.536891345,124.1,680.7,2.251291799,17.2,58,1.3,False,0.0 +3,6,sep,mon,4.520701029,126.5,686.5,2.079441542,15.6,66,3.1,False,0.0 +9,9,jul,tue,4.463606622,48.3,313.4,1.589235205,18.0,42,2.7,False,0.3074846997 +1,4,sep,tue,4.521788577,129.5,692.6,2.079441542,21.7,38,2.2,False,0.3576744443 +2,5,sep,mon,4.520701029,126.5,686.5,2.079441542,21.9,39,1.8,False,0.3852624008 +1,2,aug,wed,4.569543008,99.9,513.3,2.653241965,23.3,31,4.5,False,0.4382549309 +8,6,aug,fri,4.511957804,108.0,529.8,2.602689685,21.2,51,8.9,False,0.476234179 +1,2,jul,sat,4.510859507,51.3,296.3,2.272125886,16.6,53,5.4,False,0.5364933705 +2,5,aug,wed,4.569543008,99.9,513.3,2.653241965,23.8,32,5.4,False,0.5709795466 +6,5,aug,thu,4.566429358,131.7,578.8,2.433613355,27.4,22,4.0,False,0.6418538862 +5,4,mar,mon,4.511957804,39.7,86.6,1.974081026,13.2,40,5.4,False,0.6678293726 +8,3,sep,tue,4.447346101,73.4,671.9,1.435084525,24.2,28,3.6,False,0.6729444732 +2,2,aug,tue,4.562262685,108.3,647.1,2.890371758,17.4,43,6.7,False,0.7275486073 +8,6,sep,thu,4.550714,80.9,685.2,2.939161922,23.7,25,4.5,False,0.7514160887 +6,5,jun,fri,4.537961436,56.4,433.3,2.091864062,23.2,39,5.4,False,0.7839015438 +9,9,jul,sun,4.511957804,68.6,355.2,2.104134154,24.8,29,2.2,False,0.858661619 +3,4,jul,sat,4.511957804,51.2,424.1,1.974081026,24.6,43,1.8,False,0.8878912574 +5,4,sep,fri,4.557029811,85.1,692.3,2.827313622,20.1,47,4.9,False,0.9001613499 +1,5,sep,sat,4.547541073,145.4,721.4,2.208274414,29.6,27,2.7,False,0.9001613499 +7,4,aug,sun,4.562262685,108.3,647.1,2.890371758,16.4,47,1.3,False,0.9400072585 +2,4,sep,sat,4.547541073,145.4,721.4,2.208274414,28.6,27,2.2,False,0.9593502213 +2,2,aug,wed,4.533674184,111.2,654.1,2.360854001,18.4,45,3.6,False,0.9669838462 +2,4,aug,wed,4.533674184,111.2,654.1,2.360854001,20.5,35,4.0,False,0.9707789172 +7,4,sep,fri,4.536891345,117.9,668.0,2.58021683,19.0,34,5.8,False,0.9895411936 +7,4,mar,mon,4.511957804,39.7,86.6,1.974081026,16.1,29,3.1,False,1.011600912 +6,4,aug,thu,4.566429358,131.7,578.8,2.433613355,20.3,41,4.0,False,1.064710737 +6,3,mar,sat,4.517431272,50.1,100.4,2.174751721,15.2,31,8.5,False,1.078409581 +8,6,sep,sat,4.537961436,121.1,674.4,2.261763098,17.8,56,1.8,False,1.08180517 +8,5,sep,sun,4.507557357,90.0,704.4,1.757857918,17.8,67,2.2,False,1.101940079 +6,5,mar,thu,4.453183829,18.2,55.0,1.386294361,5.3,70,4.5,False,1.1442228 +6,5,aug,wed,4.533674184,111.2,654.1,2.360854001,16.6,47,0.9,False,1.190887565 +6,5,aug,wed,4.574710979,127.1,570.5,2.862200881,23.4,33,4.5,False,1.255616037 +6,5,mar,fri,4.523960131,48.3,97.8,2.602689685,14.6,26,9.4,False,1.261297871 +8,6,aug,thu,4.566429358,131.7,578.8,2.433613355,20.7,45,2.2,False,1.266947603 +5,4,sep,wed,4.542230386,133.3,699.6,2.32238772,21.9,35,1.8,False,1.272565596 +8,6,aug,wed,4.461299816,90.4,609.6,2.028148247,17.4,50,4.0,False,1.305626458 +7,4,aug,sun,4.526126979,142.4,601.4,2.451005098,20.1,39,5.4,False,1.319085611 +4,4,sep,mon,4.520701029,126.5,686.5,2.079441542,17.7,39,2.2,False,1.403642999 +1,4,aug,sat,4.513054897,96.9,624.2,2.292534757,14.2,53,1.8,False,1.504077397 +1,4,aug,sat,4.513054897,96.9,624.2,2.292534757,20.3,39,4.9,False,1.710187816 +6,5,apr,thu,4.412798293,9.1,55.2,1.30833282,5.8,54,5.8,False,1.72455072 +2,5,aug,sun,4.513054897,99.6,631.2,1.987874348,19.2,44,2.7,False,1.738710248 +2,5,sep,wed,4.511957804,82.9,735.7,1.974081026,18.3,45,2.2,False,1.771556762 +8,6,aug,tue,4.497584975,147.3,614.5,2.302585093,14.4,66,5.4,False,1.829376333 +1,3,sep,sun,4.536891345,124.1,680.7,2.251291799,23.9,32,6.7,False,1.845300236 +8,6,oct,mon,4.453183829,32.8,664.2,1.386294361,19.1,32,4.0,False,1.86252854 +5,4,feb,sun,4.475061501,15.6,48.3,1.589235205,12.4,53,2.2,False,1.998773639 +7,4,oct,mon,4.529368473,48.5,696.1,2.493205453,16.8,45,4.5,False,2.05796251 +8,6,aug,fri,4.552823706,135.7,586.7,2.778819272,20.8,34,4.9,False,2.074429 +2,5,sep,tue,4.521788577,129.5,692.6,2.079441542,17.6,46,3.1,False,2.084429083 +8,6,mar,sun,4.50313746,51.3,102.2,2.360854001,11.5,39,5.8,False,2.102913898 +1,5,sep,mon,4.520701029,126.5,686.5,2.079441542,21.0,42,2.2,False,2.116255515 +6,4,mar,sat,4.519612298,41.9,89.4,2.186051277,13.3,42,0.9,False,2.128231706 +7,4,mar,sun,4.518522379,44.0,92.4,1.871802177,11.5,60,4.0,False,2.223541886 +6,5,mar,fri,4.523960131,48.3,97.8,2.602689685,11.7,33,4.0,False,2.231089091 +2,5,aug,thu,4.566429358,131.7,578.8,2.433613355,24.2,28,2.7,False,2.270061901 +2,2,aug,tue,4.562262685,108.3,647.1,2.890371758,24.6,22,4.5,False,2.273156282 +4,5,sep,wed,4.542230386,133.3,699.6,2.32238772,24.3,25,4.0,False,2.342766883 +2,2,aug,tue,4.562262685,108.3,647.1,2.890371758,24.6,22,4.5,False,2.398803951 +2,5,aug,fri,4.552823706,135.7,586.7,2.778819272,23.5,36,5.4,False,2.399711804 +6,5,apr,thu,4.412798293,9.1,55.2,1.30833282,5.8,54,5.8,False,2.479056236 +4,5,sep,thu,4.542230386,137.0,706.4,2.32238772,21.5,15,0.9,False,2.489894191 +3,4,sep,tue,4.521788577,129.5,692.6,2.079441542,13.9,59,6.3,False,2.504709277 +1,5,sep,tue,4.521788577,129.5,692.6,2.079441542,21.6,33,2.2,False,2.528125769 +6,5,mar,sun,4.511957804,37.6,83.7,2.104134154,12.4,54,3.6,False,2.57261223 +7,4,feb,sun,4.441474093,8.7,32.1,1.131402111,8.8,68,2.2,False,2.642622396 +8,6,oct,wed,4.526126979,37.9,673.8,1.824549292,20.2,37,2.7,False,2.687847494 +5,6,mar,sat,4.517431272,50.1,100.4,2.174751721,15.1,64,4.0,False,2.707383312 +4,5,sep,thu,4.542230386,137.0,706.4,2.32238772,22.1,34,1.8,False,2.745345986 +2,2,aug,sat,4.548599834,139.4,594.2,3.058707073,22.9,31,7.2,False,2.800325477 +7,5,sep,tue,4.521788577,129.5,692.6,2.079441542,20.7,37,2.2,False,2.901421594 +6,5,sep,fri,4.536891345,117.9,668.0,2.58021683,19.6,33,6.3,False,3.007166651 +8,3,sep,thu,4.550714,80.9,685.2,2.939161922,23.2,26,4.9,False,3.194992884 +4,4,oct,sat,4.517431272,43.7,686.9,2.041220329,18.4,25,3.1,False,3.228033763 +7,4,aug,sat,4.548599834,139.4,594.2,3.058707073,5.1,96,5.8,False,3.295836866 +7,4,sep,fri,4.557029811,85.1,692.3,2.827313622,20.1,47,4.9,False,3.300640127 +7,3,mar,mon,4.484131858,52.2,103.8,1.791759469,11.0,46,5.8,False,3.34462703 +4,4,mar,sat,4.529368473,35.8,80.8,2.174751721,17.0,27,4.9,False,3.389799337 +4,4,mar,sat,4.529368473,35.8,80.8,2.174751721,17.0,27,4.9,False,3.389799337 +4,4,sep,sun,4.536891345,124.1,680.7,2.251291799,16.9,60,1.3,False,3.417070731 +1,3,sep,mon,4.49535532,91.8,709.9,2.091864062,12.4,73,6.3,False,3.444256871 +4,5,sep,wed,4.542230386,133.3,699.6,2.32238772,19.4,19,1.3,False,3.487986512 +6,5,mar,mon,4.511957804,39.7,86.6,1.974081026,15.2,27,3.1,False,3.492256113 +8,6,aug,sun,4.513054897,99.6,631.2,1.987874348,16.2,59,3.1,False,3.498626527 +3,4,sep,fri,4.54648119,141.2,713.9,2.701361213,18.6,49,3.6,False,3.607669399 +4,3,mar,mon,4.484131858,52.2,103.8,1.791759469,11.0,46,5.8,False,3.63363098 +2,2,jul,fri,4.492001488,150.3,309.9,2.054123734,13.4,79,3.6,False,3.638112337 +7,4,sep,wed,4.511957804,82.9,735.7,1.974081026,15.4,57,4.5,False,3.656097965 +4,4,sep,sun,4.548599834,149.3,728.6,2.208274414,22.9,39,4.9,False,3.902982261 +7,5,oct,mon,4.529368473,48.5,696.1,2.493205453,16.1,44,4.0,False,3.91939576 +8,6,aug,sat,4.534747722,81.8,480.8,2.557227311,20.1,34,4.5,False,4.082609306 +4,6,sep,sun,4.548599834,149.3,728.6,2.208274414,28.3,26,3.1,False,4.175924549 +8,6,aug,sat,4.534747722,81.8,480.8,2.557227311,16.4,43,4.0,False,4.280824129 +4,4,sep,wed,4.542230386,133.3,699.6,2.32238772,26.4,21,4.5,False,4.494126887 +1,5,sep,sun,4.548599834,149.3,728.6,2.208274414,27.8,27,3.1,False,4.566221436 +6,4,sep,tue,4.521788577,129.5,692.6,2.079441542,18.7,43,2.7,False,4.648133885 +9,4,sep,tue,4.447346101,73.4,671.9,1.435084525,24.3,36,3.1,False,4.669646205 +4,5,sep,sat,4.537961436,121.1,674.4,2.261763098,17.7,25,3.1,False,5.04908648 +8,6,aug,sun,4.526126979,142.4,601.4,2.451005098,19.6,41,5.8,False,5.285637313 +2,2,sep,sat,4.537961436,121.1,674.4,2.261763098,18.2,46,1.8,False,5.307970624 +1,2,sep,tue,4.521788577,129.5,692.6,2.079441542,18.8,40,2.2,False,5.36541511 +6,5,sep,sat,4.537961436,121.1,674.4,2.261763098,25.1,27,4.0,False,6.995619625 +7,5,apr,sun,4.417635062,3.0,7.9,1.504077397,13.4,75,1.8,False,0.0 +6,3,apr,wed,4.48863637,17.2,43.5,1.568615918,15.2,51,2.7,False,0.0 +4,4,apr,fri,4.430816799,23.3,85.3,1.193922468,16.7,20,3.1,False,0.0 +2,4,aug,sun,4.555979942,122.3,589.9,2.63188884,15.4,66,4.0,False,2.409644165 +7,4,aug,sun,4.53044664,175.1,700.7,2.694627181,21.9,73,7.6,True,0.0 +2,4,aug,sun,4.53044664,175.1,700.7,2.694627181,22.4,54,7.6,False,1.353254507 +3,4,aug,sun,4.53044664,175.1,700.7,2.694627181,26.8,38,6.3,False,0.5653138091 +5,4,aug,sun,4.53044664,175.1,700.7,2.694627181,25.7,39,5.4,False,0.08617769624 +2,4,aug,wed,4.534747722,91.6,503.6,2.360854001,20.7,70,2.2,False,0.5596157879 +8,6,aug,wed,4.544358047,157.3,666.7,2.674148649,28.7,28,2.7,False,0.0 +3,4,aug,wed,4.544358047,157.3,666.7,2.674148649,21.7,40,0.4,False,1.244154594 +8,5,aug,wed,4.544358047,157.3,666.7,2.674148649,26.8,25,3.1,False,0.5187937934 +8,5,aug,wed,4.544358047,157.3,666.7,2.674148649,24.0,36,3.1,False,0.2151113796 +6,5,aug,wed,4.544358047,157.3,666.7,2.674148649,22.1,37,3.6,False,0.1906203596 +7,4,aug,thu,4.531523646,109.2,565.5,2.197224577,21.4,38,2.7,False,0.9242589015 +6,3,aug,thu,4.528289142,138.1,621.7,1.987874348,18.9,41,3.1,False,2.428336298 +2,5,aug,thu,4.483002552,77.0,694.8,1.791759469,22.3,46,4.0,False,0.0 +8,6,aug,sat,4.555979942,117.2,581.1,2.48490665,23.9,41,2.2,False,2.199444334 +4,3,aug,sat,4.555979942,117.2,581.1,2.48490665,21.4,44,2.7,False,0.5187937934 +3,4,aug,sat,4.53044664,170.9,692.3,2.687847494,20.6,59,0.9,False,0.0 +7,4,aug,sat,4.53044664,170.9,692.3,2.687847494,23.7,40,1.8,False,0.8671004877 +2,4,aug,mon,4.549657476,97.9,542.0,2.734367509,28.3,32,4.0,False,2.287471455 +3,4,aug,fri,4.528289142,112.4,573.0,2.292534757,11.2,84,7.6,False,1.458615023 +2,4,aug,fri,4.528289142,112.4,573.0,2.292534757,21.4,42,3.1,False,1.658228077 +6,3,aug,fri,4.522874943,141.1,629.1,2.091864062,19.3,39,3.6,False,0.9400072585 +4,4,aug,fri,4.557029811,167.6,684.4,2.63905733,21.8,53,3.1,False,2.020222182 +4,4,aug,tue,4.550714,102.2,550.3,2.747270914,22.1,54,7.6,False,0.5822156199 +6,5,aug,tue,4.557029811,131.7,607.1,3.165475048,19.4,55,4.0,False,0.1570037488 +2,2,aug,tue,4.533674184,152.6,658.2,2.727852828,23.7,24,3.1,False,0.0 +3,4,aug,tue,4.533674184,152.6,658.2,2.727852828,21.0,32,3.1,False,0.0 +4,4,aug,tue,4.533674184,152.6,658.2,2.727852828,19.1,53,2.7,False,1.686398954 +2,2,aug,tue,4.533674184,152.6,658.2,2.727852828,21.8,56,3.1,False,0.4187103349 +8,6,aug,tue,4.533674184,152.6,658.2,2.727852828,20.1,58,4.5,False,2.329227024 +2,5,aug,tue,4.533674184,152.6,658.2,2.727852828,20.2,47,4.0,False,1.40854497 +4,6,dec,sun,4.447346101,27.2,353.5,2.054123734,4.8,57,8.5,False,2.30058309 +8,6,dec,wed,4.442651256,27.8,354.6,1.840549633,5.1,61,8.0,False,2.500615943 +4,6,dec,thu,4.449685283,26.4,352.0,1.098612289,5.1,61,4.9,False,1.853168097 +4,4,dec,mon,4.458987676,25.4,349.7,1.280933845,4.6,21,8.5,False,2.936512914 +3,4,dec,mon,4.458987676,25.4,349.7,1.280933845,4.6,21,8.5,False,2.462149663 +4,4,dec,mon,4.458987676,25.4,349.7,1.280933845,4.6,21,8.5,False,3.136797714 +4,4,dec,mon,4.458987676,25.4,349.7,1.280933845,4.6,21,8.5,False,2.376764491 +4,6,dec,fri,4.450852826,26.7,352.6,1.62924054,2.2,59,4.9,False,2.329227024 +6,5,dec,tue,4.458987676,25.4,349.7,1.280933845,5.1,24,8.5,False,3.249211025 +6,3,feb,sun,4.453183829,27.5,353.5,1.481604541,4.2,51,4.0,False,0.0 +3,4,feb,wed,4.476199805,6.6,18.7,1.435084525,8.8,35,3.1,False,0.7419373447 +5,4,feb,fri,4.456670178,4.9,15.8,1.987874348,7.5,46,8.0,False,3.228430038 +2,5,jul,sun,4.552823706,169.7,411.8,2.587764035,23.4,40,6.3,False,0.0 +7,6,jul,wed,4.523960131,183.1,437.7,2.602689685,12.6,90,7.6,True,0.0 +7,4,jul,sat,4.528289142,104.2,474.9,2.302585093,22.1,49,2.7,False,0.0 +7,4,jul,sat,4.528289142,104.2,474.9,2.302585093,24.2,32,1.8,False,0.0 +7,4,jul,sat,4.528289142,104.2,474.9,2.302585093,24.3,30,1.8,False,0.0 +2,5,jul,sat,4.528289142,104.2,474.9,2.302585093,18.7,53,1.8,False,0.0 +9,4,jul,sat,4.528289142,104.2,474.9,2.302585093,25.3,39,0.9,False,2.197224577 +4,5,jul,fri,4.528289142,100.2,466.3,1.987874348,22.9,40,1.3,False,1.291983682 +7,6,jul,tue,4.544358047,180.4,430.8,2.48490665,26.9,28,5.4,False,4.471067201 +8,6,jul,tue,4.535820108,88.8,440.9,2.251291799,17.1,67,3.6,False,2.024193067 +7,5,jun,sun,4.544358047,180.4,430.8,2.48490665,22.2,48,1.3,False,0.0 +6,4,jun,sun,4.515245478,89.5,290.8,2.00148,14.3,46,1.8,False,0.6418538862 +8,6,jun,sun,4.515245478,89.5,290.8,2.00148,15.4,45,2.2,False,0.0 +8,6,jun,wed,4.523960131,147.8,377.2,2.617395833,19.6,43,4.9,False,0.0 +6,5,jun,mon,4.515245478,93.3,298.1,2.140066163,20.7,25,4.9,False,0.0 +6,5,jun,mon,4.515245478,93.3,298.1,2.140066163,19.1,39,5.4,False,1.508511994 +3,6,jun,fri,4.522874943,94.1,232.1,2.091864062,19.2,38,4.5,False,0.0 +3,6,jun,fri,4.522874943,94.1,232.1,2.091864062,19.2,38,4.5,False,0.0 +6,5,may,sat,4.455509411,28.0,113.8,1.504077397,11.3,94,4.9,False,0.0 +1,4,sep,sun,4.506454213,84.1,714.3,1.902107526,19.0,52,2.2,False,0.0 +7,4,sep,sun,4.506454213,84.1,714.3,1.902107526,17.1,53,5.4,False,0.3435897044 +3,4,sep,sun,4.506454213,84.1,714.3,1.902107526,23.8,35,3.6,False,1.821318271 +2,4,sep,sun,4.536891345,105.8,758.1,2.388762789,16.0,45,1.8,False,0.0 +2,4,sep,sun,4.536891345,105.8,758.1,2.388762789,24.9,27,2.2,False,0.0 +7,4,sep,sun,4.536891345,105.8,758.1,2.388762789,25.3,27,2.7,False,0.0 +6,3,sep,sun,4.536891345,105.8,758.1,2.388762789,24.8,28,1.8,False,2.72719902 +6,5,sep,wed,4.539030383,115.4,777.1,2.282382386,24.3,27,4.9,False,0.0 +4,4,sep,wed,4.539030383,115.4,777.1,2.282382386,19.7,41,1.8,False,0.9477893989 +3,4,sep,wed,4.523960131,134.7,817.5,2.104134154,18.5,30,2.7,False,0.0 +4,5,sep,thu,4.536891345,96.2,739.4,2.261763098,18.6,24,5.8,False,0.0 +4,4,sep,thu,4.536891345,96.2,739.4,2.261763098,19.2,24,4.9,False,1.564440547 +6,5,sep,thu,4.541164856,119.0,783.5,2.140066163,21.6,27,2.2,False,0.0 +5,4,sep,thu,4.541164856,119.0,783.5,2.140066163,21.6,28,6.3,False,1.688249093 +6,3,sep,thu,4.541164856,119.0,783.5,2.140066163,18.9,34,7.2,False,3.565581238 +1,4,sep,thu,4.541164856,119.0,783.5,2.140066163,16.8,28,4.0,False,2.105352923 +6,5,sep,thu,4.541164856,119.0,783.5,2.140066163,16.8,28,4.0,False,0.6981347221 +3,5,sep,thu,4.518522379,136.9,822.8,2.054123734,12.9,39,2.7,False,1.156881197 +6,5,sep,thu,4.489759334,53.3,726.9,1.85629799,13.7,56,1.8,False,1.690095815 +1,4,sep,sat,4.534747722,102.3,751.5,2.240709689,24.2,27,3.1,False,0.0 +5,4,sep,sat,4.534747722,102.3,751.5,2.240709689,24.1,27,3.1,False,0.0 +6,5,sep,sat,4.534747722,102.3,751.5,2.240709689,21.2,32,2.2,False,0.0 +6,5,sep,sat,4.534747722,102.3,751.5,2.240709689,19.7,35,1.8,False,0.0 +4,3,sep,sat,4.534747722,102.3,751.5,2.240709689,23.5,27,4.0,False,1.465567542 +3,3,sep,sat,4.534747722,102.3,751.5,2.240709689,24.2,27,3.1,False,2.0255132 +7,4,sep,sat,4.523960131,124.4,795.3,2.251291799,21.5,28,4.5,False,2.811809435 +4,4,sep,sat,4.523960131,124.4,795.3,2.251291799,17.1,41,2.2,False,2.503073954 +1,4,sep,mon,4.533674184,87.7,721.1,2.351375257,18.1,54,3.1,False,1.141033005 +2,3,sep,mon,4.528289142,108.4,764.0,1.974081026,18.0,51,5.4,False,0.0 +4,3,sep,mon,4.528289142,108.4,764.0,1.974081026,9.8,86,1.8,False,0.0 +7,4,sep,mon,4.528289142,108.4,764.0,1.974081026,19.3,44,2.2,False,0.0 +6,3,sep,mon,4.528289142,108.4,764.0,1.974081026,23.0,34,2.2,False,4.043752776 +8,6,sep,mon,4.528289142,108.4,764.0,1.974081026,22.7,35,2.2,False,2.13771045 +2,4,sep,mon,4.528289142,108.4,764.0,1.974081026,20.4,41,1.8,False,0.9042181506 +2,5,sep,mon,4.528289142,108.4,764.0,1.974081026,19.3,44,2.2,False,1.595338988 +8,6,sep,mon,4.531523646,111.7,770.3,2.014903021,15.7,51,2.2,False,0.0 +6,3,sep,mon,4.527208645,130.1,807.1,2.140066163,20.6,37,1.8,False,0.0 +8,6,sep,mon,4.527208645,130.1,807.1,2.140066163,15.9,51,4.5,False,1.156881197 +6,3,sep,mon,4.527208645,130.1,807.1,2.140066163,12.2,66,4.9,False,1.960094784 +2,2,sep,mon,4.527208645,130.1,807.1,2.140066163,16.8,43,3.1,False,1.921324674 +1,4,sep,mon,4.527208645,130.1,807.1,2.140066163,21.3,35,2.2,False,3.373826185 +5,4,sep,fri,4.533674184,99.0,745.3,2.360854001,10.1,75,3.6,False,0.0 +3,4,sep,fri,4.533674184,99.0,745.3,2.360854001,17.4,57,4.5,False,0.0 +5,4,sep,fri,4.533674184,99.0,745.3,2.360854001,12.8,64,3.6,False,0.9707789172 +5,4,sep,fri,4.533674184,99.0,745.3,2.360854001,10.1,75,3.6,False,1.549687908 +4,4,sep,fri,4.533674184,99.0,745.3,2.360854001,15.4,53,6.3,False,2.117459609 +7,4,sep,fri,4.533674184,99.0,745.3,2.360854001,20.6,43,3.6,False,1.10856262 +7,4,sep,fri,4.533674184,99.0,745.3,2.360854001,19.8,47,2.7,False,1.00063188 +7,4,sep,fri,4.533674184,99.0,745.3,2.360854001,18.7,50,2.2,False,1.941615225 +4,4,sep,fri,4.533674184,99.0,745.3,2.360854001,20.8,35,4.9,False,2.643333886 +4,4,sep,fri,4.533674184,99.0,745.3,2.360854001,20.8,35,4.9,False,0.8153648133 +6,3,sep,fri,4.537961436,122.0,789.7,2.415913778,15.9,55,3.6,False,0.0 +6,3,sep,fri,4.537961436,122.0,789.7,2.415913778,19.7,39,2.7,False,0.0 +1,4,sep,fri,4.537961436,122.0,789.7,2.415913778,21.1,39,2.2,False,2.210469804 +6,5,sep,fri,4.537961436,122.0,789.7,2.415913778,18.4,42,2.2,False,0.737164066 +4,3,sep,fri,4.537961436,122.0,789.7,2.415913778,17.3,45,4.0,False,1.597365331 +7,4,sep,fri,4.49088104,55.2,732.3,2.533696814,15.2,64,3.1,False,0.4187103349 +4,3,sep,tue,4.531523646,111.7,770.3,2.014903021,15.9,53,2.2,False,1.368639426 +6,5,sep,tue,4.531523646,111.7,770.3,2.014903021,21.1,35,2.7,False,1.894616855 +6,5,sep,tue,4.531523646,111.7,770.3,2.014903021,19.6,45,3.1,False,3.04594999 +4,5,sep,tue,4.522874943,132.3,812.1,2.602689685,15.9,38,5.4,False,1.011600912 +4,5,sep,tue,4.522874943,132.3,812.1,2.602689685,16.4,27,3.6,False,0.0 +6,5,sep,sat,4.523960131,94.3,744.4,2.240709689,16.8,47,4.9,False,2.613006652 +4,5,sep,sun,4.521788577,276.3,825.1,2.091864062,13.8,77,7.6,False,0.0 +7,4,sep,sun,4.521788577,276.3,825.1,2.091864062,13.8,77,7.6,False,2.489894191 +3,4,jul,wed,4.531523646,133.6,520.5,2.197224577,14.2,58,4.0,False,0.0 +4,5,aug,sun,4.532599493,203.2,664.5,2.208274414,10.4,75,0.9,False,0.0 +5,4,aug,thu,4.562262685,222.4,698.6,2.701361213,20.3,42,2.7,False,0.0 +6,5,sep,fri,4.514150788,290.0,855.3,2.128231706,10.3,78,4.0,False,2.960105096 +6,5,sep,sat,4.523960131,94.3,744.4,2.240709689,15.4,57,4.9,False,3.697591395 +8,6,aug,mon,4.533674184,207.0,672.6,2.219203484,21.1,54,2.2,False,0.0 +2,2,aug,sat,4.550714,231.1,715.1,2.240709689,21.9,42,2.2,False,5.168379509 +6,5,mar,thu,4.520701029,18.9,30.6,2.197224577,8.7,51,5.8,False,0.0 +5,4,jul,wed,4.550714,101.3,458.8,2.557227311,19.3,39,7.2,False,2.16676537 +8,6,aug,thu,4.518522379,194.1,643.0,2.054123734,16.2,63,2.7,False,2.852439104 +8,6,aug,wed,4.566429358,217.7,690.0,2.944438979,28.2,29,1.8,False,1.925707442 +9,6,aug,thu,4.528289142,248.4,753.8,1.987874348,20.5,58,2.7,False,3.781230715 +8,4,aug,sat,4.528289142,273.8,819.1,2.163323026,21.3,44,4.5,False,2.578700529 +2,4,aug,sun,4.528289142,181.3,613.0,2.151762203,20.9,50,2.2,False,2.833213344 +3,4,sep,sun,4.516338972,96.7,750.5,2.517696473,20.6,55,5.4,False,3.24220165 +5,5,mar,thu,4.520701029,18.9,30.6,2.197224577,11.6,48,5.4,False,0.0 +6,4,aug,fri,4.562262685,227.0,706.7,2.564949357,23.3,34,3.1,False,3.392492941 +7,4,aug,fri,4.562262685,227.0,706.7,2.564949357,23.3,34,3.1,False,0.0 +7,4,feb,mon,4.450852826,9.5,58.3,1.62924054,7.5,71,6.3,False,2.394252282 +8,6,sep,fri,4.522874943,91.3,738.1,2.104134154,20.7,46,2.7,False,3.439776864 +1,3,sep,sun,4.521788577,276.3,825.1,2.091864062,21.9,43,4.0,False,4.273327218 +2,4,mar,tue,4.547541073,15.0,25.6,2.517696473,15.2,19,7.6,False,0.0 +6,5,feb,mon,4.443827036,4.6,46.7,1.16315081,5.3,68,1.8,False,0.0 +4,5,feb,sun,4.454347296,9.0,56.9,1.504077397,10.1,62,1.8,False,3.966132331 +4,3,sep,sun,4.516338972,96.7,750.5,2.517696473,20.4,55,4.9,False,1.534714366 +5,6,aug,sun,4.528289142,181.3,613.0,2.151762203,24.3,33,3.6,False,1.532556868 +1,2,aug,sat,4.550714,231.1,715.1,2.240709689,25.9,32,3.1,False,0.0 +9,5,jun,wed,4.54648119,49.5,297.7,2.708050201,28.0,34,4.5,False,0.0 +9,5,jun,wed,4.54648119,49.5,297.7,2.708050201,28.0,34,4.5,False,2.214846179 +3,4,sep,thu,4.522874943,88.2,731.7,2.2300144,22.8,46,4.0,False,1.78339122 +9,9,aug,fri,4.562262685,227.0,706.7,2.564949357,25.0,36,4.0,False,0.0 +8,6,aug,thu,4.518522379,194.1,643.0,2.054123734,21.3,41,3.6,False,0.0 +2,4,sep,wed,4.487512143,84.8,725.1,1.547562509,21.8,34,2.2,False,1.95160817 +2,2,aug,tue,4.56017282,212.1,680.9,2.351375257,27.9,27,2.2,False,0.0 +6,5,sep,sat,4.478472533,291.3,860.6,1.609437912,17.0,67,4.9,False,1.599387577 +4,5,feb,sat,4.450852826,8.2,55.0,1.360976553,14.2,46,4.0,False,0.0 +4,3,sep,fri,4.514150788,290.0,855.3,2.128231706,19.9,44,3.1,False,2.174751721 +1,4,jul,tue,4.535820108,96.2,450.2,2.57261223,23.4,31,5.4,False,0.0 +6,3,feb,fri,4.443827036,7.3,52.8,1.30833282,14.7,42,2.7,False,0.0 +7,4,feb,fri,4.449685283,3.2,43.6,1.458615023,8.2,53,9.4,False,1.726331664 +9,4,jul,mon,4.535820108,92.1,442.1,2.379546134,22.8,27,4.5,False,0.9669838462 +7,5,aug,sat,4.550714,231.1,715.1,2.240709689,26.4,33,3.6,False,0.0 +5,4,aug,sun,4.549657476,235.1,723.1,2.406945108,24.1,50,4.0,False,0.0 +8,6,aug,thu,4.562262685,222.4,698.6,2.701361213,27.5,27,4.9,False,6.616439948 +6,3,jul,tue,4.540098189,164.1,575.8,2.292534757,26.3,39,3.1,False,2.081938422 +6,5,mar,wed,4.547541073,17.3,28.3,2.388762789,13.8,24,5.8,False,0.0 +2,4,aug,sun,4.532599493,203.2,664.5,2.208274414,24.9,42,5.4,False,1.235471471 +2,5,aug,sun,4.528289142,181.3,613.0,2.151762203,24.8,36,4.0,False,1.398716881 +8,8,aug,wed,4.529368473,191.4,635.9,2.174751721,26.2,36,4.5,False,5.22982437 +2,4,aug,wed,4.566429358,217.7,690.0,2.944438979,30.8,19,4.5,False,0.0 +8,6,jul,sun,4.498697941,263.1,795.9,1.824549292,29.3,27,3.6,False,1.987874348 +1,3,sep,sat,4.523960131,94.3,744.4,2.240709689,22.3,48,4.0,False,0.5423242908 +8,6,aug,sat,4.550714,231.1,715.1,2.240709689,26.9,31,3.6,False,1.785070481 +2,2,aug,thu,4.528289142,248.4,753.8,1.987874348,20.4,56,2.2,False,0.0 +8,6,aug,thu,4.528289142,248.4,753.8,1.987874348,20.4,56,2.2,False,0.0 +2,4,aug,mon,4.533674184,207.0,672.6,2.219203484,27.9,33,2.2,False,1.208960346 +1,3,aug,thu,4.562262685,222.4,698.6,2.701361213,26.2,34,5.8,False,0.0 +3,4,aug,sun,4.528289142,181.3,613.0,2.151762203,24.6,44,4.0,False,1.435084525 +7,4,sep,thu,4.507557357,287.2,849.3,2.054123734,19.4,45,3.6,False,0.0 +1,3,aug,sat,4.533674184,178.0,605.3,2.360854001,23.3,40,4.0,False,1.996059933 +8,6,aug,thu,4.562262685,222.4,698.6,2.701361213,23.9,38,6.7,False,0.0 +2,4,aug,sun,4.549657476,235.1,723.1,2.406945108,20.9,66,4.9,False,2.793616089 +1,4,aug,fri,4.517431272,269.8,811.2,1.871802177,22.2,45,3.6,False,0.0 +2,5,jul,sat,4.519612298,84.7,376.6,1.887069649,23.8,51,1.8,False,0.0 +8,6,aug,mon,4.533674184,207.0,672.6,2.219203484,26.8,35,1.3,False,0.4317824164 +8,6,aug,sat,4.504244267,253.6,768.4,2.370243741,14.2,73,2.7,False,0.0 +2,5,aug,sat,4.550714,231.1,715.1,2.240709689,23.6,53,4.0,False,2.005525859 +1,3,sep,fri,4.522874943,91.3,738.1,2.104134154,19.1,46,2.2,False,0.2851789422 +5,4,sep,fri,4.514150788,290.0,855.3,2.128231706,16.2,58,3.6,False,0.0 +8,6,aug,mon,4.533674184,207.0,672.6,2.219203484,25.5,29,1.8,False,0.8020015855 +6,5,apr,mon,4.487512143,24.9,41.6,1.547562509,10.9,64,3.1,False,1.470175845 +1,2,jul,fri,4.518522379,80.9,368.3,2.879198457,14.8,78,8.0,False,0.0 +2,5,sep,fri,4.514150788,290.0,855.3,2.128231706,16.2,58,3.6,False,2.394252282 +5,5,aug,sun,4.553876892,47.9,100.7,2.459588842,17.3,80,4.5,False,0.0 +6,5,aug,sun,4.532599493,203.2,664.5,2.208274414,19.1,70,2.2,False,0.0 +3,4,mar,wed,4.547541073,17.3,28.3,2.388762789,8.9,35,8.0,False,0.0 +7,4,sep,wed,4.507557357,284.9,844.0,2.406945108,10.5,77,4.0,False,0.0 +7,4,aug,sun,4.528289142,181.3,613.0,2.151762203,19.3,61,4.9,False,0.0 +4,5,aug,wed,4.566429358,217.7,690.0,2.944438979,23.4,49,5.4,False,2.005525859 +1,4,aug,fri,4.516338972,196.8,649.9,2.850706502,11.8,88,4.9,False,2.371177884 +7,4,aug,mon,4.527208645,238.2,730.6,2.140066163,17.7,65,4.0,False,0.0 +4,5,aug,thu,4.504244267,266.2,803.3,1.887069649,17.4,54,3.1,False,0.0 +3,4,aug,thu,4.528289142,248.4,753.8,1.987874348,16.8,56,3.1,False,0.0 +3,4,jul,mon,4.56017282,160.0,567.2,2.87356464,17.9,48,2.7,False,0.0 +2,4,aug,thu,4.528289142,248.4,753.8,1.987874348,16.6,59,2.7,False,0.0 +1,4,aug,wed,4.529368473,191.4,635.9,2.174751721,19.9,50,4.0,False,4.427836171 +8,6,aug,sat,4.550714,231.1,715.1,2.240709689,18.9,64,4.9,False,1.463255402 +7,4,aug,sat,4.528289142,273.8,819.1,2.163323026,15.5,72,8.0,False,1.078409581 +2,5,aug,sat,4.550714,231.1,715.1,2.240709689,18.9,64,4.9,False,0.0 +8,6,aug,sat,4.550714,231.1,715.1,2.240709689,18.9,64,4.9,False,0.0 +1,4,sep,sun,4.521788577,276.3,825.1,2.091864062,14.5,76,7.6,False,1.549687908 +6,5,feb,tue,4.332048265,4.4,16.2,1.064710737,4.6,82,6.3,False,1.854734268 +6,4,feb,tue,4.332048265,4.4,16.2,1.064710737,5.1,77,5.4,False,1.1442228 +2,2,feb,sat,4.388257184,3.6,15.3,1.029619417,4.6,59,0.9,False,2.059238834 +6,5,mar,mon,4.479606963,15.1,36.9,2.091864062,10.2,45,5.8,False,1.430311247 +3,4,mar,wed,4.513054897,18.5,41.1,2.116255515,11.2,41,5.4,False,1.87946505 +6,5,mar,thu,4.525044142,20.6,43.5,2.251291799,13.3,27,3.6,False,2.029463172 +6,3,apr,sun,4.521788577,14.6,25.6,2.587764035,13.7,33,9.4,False,4.129228964 +5,4,apr,sun,4.521788577,14.6,25.6,2.587764035,17.6,27,5.8,False,0.0 +4,3,may,fri,4.506454213,25.4,73.7,1.902107526,18.0,40,4.0,False,3.675794215 +8,3,jun,mon,4.49088104,96.2,229.0,1.740466175,14.3,79,4.0,False,1.078409581 +9,4,jun,sat,4.516338972,61.1,252.6,2.341805806,24.5,50,3.1,False,4.267176793 +4,3,jun,thu,4.543294782,103.8,316.7,2.468099531,26.4,35,2.7,False,2.405141681 +2,5,jun,thu,4.550714,121.7,350.2,2.944438979,22.7,40,9.4,False,1.432700734 +4,3,jul,thu,4.548599834,85.3,395.0,2.388762789,27.2,28,1.3,False,1.01523068 +4,3,jul,sun,4.550714,101.3,423.4,2.753660712,26.1,45,4.0,False,2.123458427 +7,4,jul,sun,4.550714,101.3,423.4,2.753660712,18.2,82,4.5,False,1.166270937 +7,4,jul,mon,4.502029427,103.9,431.6,2.00148,22.6,57,4.9,False,5.633109621 +9,9,jul,thu,4.545420182,114.4,560.0,2.351375257,30.2,25,4.5,False,1.32175584 +4,3,jul,thu,4.545420182,114.4,560.0,2.351375257,30.2,22,4.9,False,0.0 +3,4,aug,sun,4.563305982,130.3,587.1,2.714694744,23.4,40,5.8,False,0.8285518176 +8,6,aug,sun,4.563305982,130.3,587.1,2.714694744,31.0,27,5.4,False,0.0 +2,5,aug,sun,4.563305982,130.3,587.1,2.714694744,33.1,25,4.0,False,3.311637305 +2,4,aug,mon,4.564348191,135.5,596.3,3.104586678,30.6,28,3.6,False,1.121677562 +5,4,aug,tue,4.565389316,141.3,605.8,2.928523524,24.1,43,6.3,False,1.098612289 +5,4,aug,tue,4.565389316,141.3,605.8,2.928523524,26.4,34,3.6,False,2.856470206 +4,4,aug,tue,4.565389316,141.3,605.8,2.928523524,19.4,71,7.6,False,3.864931398 +4,4,aug,wed,4.565389316,141.3,605.8,2.928523524,20.6,58,1.3,False,0.0 +4,4,aug,wed,4.565389316,141.3,605.8,2.928523524,28.7,33,4.0,False,0.0 +4,4,aug,thu,4.572646994,152.0,624.1,2.694627181,32.4,21,4.5,False,0.0 +1,3,aug,fri,4.573679519,158.0,633.6,2.509599262,32.4,27,2.2,False,0.0 +1,3,aug,fri,4.573679519,158.0,633.6,2.509599262,27.5,29,4.5,False,3.791436042 +6,6,aug,sat,4.574710979,164.0,643.0,2.708050201,30.8,30,4.9,False,2.260720889 +6,6,aug,mon,4.576770711,175.5,661.8,2.879198457,23.9,42,2.2,False,0.0 +4,5,aug,mon,4.576770711,175.5,661.8,2.879198457,32.6,26,3.1,False,1.327075001 +3,4,aug,tue,4.575741375,181.1,671.2,2.727852828,32.3,27,2.2,False,2.752386015 +6,5,aug,tue,4.575741375,181.1,671.2,2.727852828,33.3,26,2.7,False,3.726656818 +7,5,aug,tue,4.575741375,181.1,671.2,2.727852828,27.3,63,4.9,True,2.469793012 +8,6,aug,tue,4.575741375,181.1,671.2,2.727852828,21.6,65,4.9,True,0.0 +7,5,aug,tue,4.575741375,181.1,671.2,2.727852828,21.6,65,4.9,True,0.0 +4,4,aug,tue,4.575741375,181.1,671.2,2.727852828,20.7,69,4.9,True,0.0 +2,4,aug,wed,4.559126247,139.4,689.1,3.044522438,29.2,30,4.9,False,1.08180517 +4,3,aug,wed,4.559126247,139.4,689.1,3.044522438,28.9,29,4.9,False,3.923753928 +1,2,aug,thu,4.521788577,163.2,744.4,2.406945108,26.7,35,1.8,False,1.916922612 +1,2,aug,fri,4.521788577,166.9,752.6,2.091864062,18.5,73,8.5,False,0.0 +2,4,aug,fri,4.521788577,166.9,752.6,2.091864062,25.9,41,3.6,False,0.0 +1,2,aug,fri,4.521788577,166.9,752.6,2.091864062,25.9,41,3.6,False,0.0 +5,4,aug,fri,4.521788577,166.9,752.6,2.091864062,21.1,71,7.6,True,1.153731588 +6,5,aug,fri,4.521788577,166.9,752.6,2.091864062,18.2,62,5.4,False,0.3576744443 +8,6,aug,sun,4.414009681,56.7,665.6,1.064710737,27.8,35,2.7,False,0.0 +4,3,aug,sun,4.414009681,56.7,665.6,1.064710737,27.8,32,2.7,False,2.006870849 +2,4,aug,sun,4.414009681,56.7,665.6,1.064710737,21.9,71,5.8,False,4.01259206 +7,4,aug,sun,4.414009681,56.7,665.6,1.064710737,21.2,70,6.7,False,2.498151877 +1,4,aug,sat,4.558078578,146.0,614.7,2.509599262,25.6,42,4.0,False,0.0 +6,3,nov,tue,4.388257184,3.0,106.7,0.7419373447,11.8,31,4.5,False,0.0 diff --git a/Module_3/Week5/Problem 4.csv b/Module_3/Week5/Problem 4.csv new file mode 100644 index 00000000..b035bca9 --- /dev/null +++ b/Module_3/Week5/Problem 4.csv @@ -0,0 +1,179 @@ +alcohol,malic_acid,ash,alcalinity_of_ash,magnesium,total_phenols,flavanoids,nonflavanoid_phenols,proanthocyanins,color_intensity,hue,od280/od315_of_diluted_wines,proline,Target +14.23,1.71,2.43,15.6,127.0,2.8,3.06,0.28,2.29,5.64,1.04,3.92,1065.0,0 +13.2,1.78,2.14,11.2,100.0,2.65,2.76,0.26,1.28,4.38,1.05,3.4,1050.0,0 +13.16,2.36,2.67,18.6,101.0,2.8,3.24,0.3,2.81,5.68,1.03,3.17,1185.0,0 +14.37,1.95,2.5,16.8,113.0,3.85,3.49,0.24,2.18,7.8,0.86,3.45,1480.0,0 +13.24,2.59,2.87,21.0,118.0,2.8,2.69,0.39,1.82,4.32,1.04,2.93,735.0,0 +14.2,1.76,2.45,15.2,112.0,3.27,3.39,0.34,1.97,6.75,1.05,2.85,1450.0,0 +14.39,1.87,2.45,14.6,96.0,2.5,2.52,0.3,1.98,5.25,1.02,3.58,1290.0,0 +14.06,2.15,2.61,17.6,121.0,2.6,2.51,0.31,1.25,5.05,1.06,3.58,1295.0,0 +14.83,1.64,2.17,14.0,97.0,2.8,2.98,0.29,1.98,5.2,1.08,2.85,1045.0,0 +13.86,1.35,2.27,16.0,98.0,2.98,3.15,0.22,1.85,7.22,1.01,3.55,1045.0,0 +14.1,2.16,2.3,18.0,105.0,2.95,3.32,0.22,2.38,5.75,1.25,3.17,1510.0,0 +14.12,1.48,2.32,16.8,95.0,2.2,2.43,0.26,1.57,5.0,1.17,2.82,1280.0,0 +13.75,1.73,2.41,16.0,89.0,2.6,2.76,0.29,1.81,5.6,1.15,2.9,1320.0,0 +14.75,1.73,2.39,11.4,91.0,3.1,3.69,0.43,2.81,5.4,1.25,2.73,1150.0,0 +14.38,1.87,2.38,12.0,102.0,3.3,3.64,0.29,2.96,7.5,1.2,3.0,1547.0,0 +13.63,1.81,2.7,17.2,112.0,2.85,2.91,0.3,1.46,7.3,1.28,2.88,1310.0,0 +14.3,1.92,2.72,20.0,120.0,2.8,3.14,0.33,1.97,6.2,1.07,2.65,1280.0,0 +13.83,1.57,2.62,20.0,115.0,2.95,3.4,0.4,1.72,6.6,1.13,2.57,1130.0,0 +14.19,1.59,2.48,16.5,108.0,3.3,3.93,0.32,1.86,8.7,1.23,2.82,1680.0,0 +13.64,3.1,2.56,15.2,116.0,2.7,3.03,0.17,1.66,5.1,0.96,3.36,845.0,0 +14.06,1.63,2.28,16.0,126.0,3.0,3.17,0.24,2.1,5.65,1.09,3.71,780.0,0 +12.93,3.8,2.65,18.6,102.0,2.41,2.41,0.25,1.98,4.5,1.03,3.52,770.0,0 +13.71,1.86,2.36,16.6,101.0,2.61,2.88,0.27,1.69,3.8,1.11,4.0,1035.0,0 +12.85,1.6,2.52,17.8,95.0,2.48,2.37,0.26,1.46,3.93,1.09,3.63,1015.0,0 +13.5,1.81,2.61,20.0,96.0,2.53,2.61,0.28,1.66,3.52,1.12,3.82,845.0,0 +13.05,2.05,3.22,25.0,124.0,2.63,2.68,0.47,1.92,3.58,1.13,3.2,830.0,0 +13.39,1.77,2.62,16.1,93.0,2.85,2.94,0.34,1.45,4.8,0.92,3.22,1195.0,0 +13.3,1.72,2.14,17.0,94.0,2.4,2.19,0.27,1.35,3.95,1.02,2.77,1285.0,0 +13.87,1.9,2.8,19.4,107.0,2.95,2.97,0.37,1.76,4.5,1.25,3.4,915.0,0 +14.02,1.68,2.21,16.0,96.0,2.65,2.33,0.26,1.98,4.7,1.04,3.59,1035.0,0 +13.73,1.5,2.7,22.5,101.0,3.0,3.25,0.29,2.38,5.7,1.19,2.71,1285.0,0 +13.58,1.66,2.36,19.1,106.0,2.86,3.19,0.22,1.95,6.9,1.09,2.88,1515.0,0 +13.68,1.83,2.36,17.2,104.0,2.42,2.69,0.42,1.97,3.84,1.23,2.87,990.0,0 +13.76,1.53,2.7,19.5,132.0,2.95,2.74,0.5,1.35,5.4,1.25,3.0,1235.0,0 +13.51,1.8,2.65,19.0,110.0,2.35,2.53,0.29,1.54,4.2,1.1,2.87,1095.0,0 +13.48,1.81,2.41,20.5,100.0,2.7,2.98,0.26,1.86,5.1,1.04,3.47,920.0,0 +13.28,1.64,2.84,15.5,110.0,2.6,2.68,0.34,1.36,4.6,1.09,2.78,880.0,0 +13.05,1.65,2.55,18.0,98.0,2.45,2.43,0.29,1.44,4.25,1.12,2.51,1105.0,0 +13.07,1.5,2.1,15.5,98.0,2.4,2.64,0.28,1.37,3.7,1.18,2.69,1020.0,0 +14.22,3.99,2.51,13.2,128.0,3.0,3.04,0.2,2.08,5.1,0.89,3.53,760.0,0 +13.56,1.71,2.31,16.2,117.0,3.15,3.29,0.34,2.34,6.13,0.95,3.38,795.0,0 +13.41,3.84,2.12,18.8,90.0,2.45,2.68,0.27,1.48,4.28,0.91,3.0,1035.0,0 +13.88,1.89,2.59,15.0,101.0,3.25,3.56,0.17,1.7,5.43,0.88,3.56,1095.0,0 +13.24,3.98,2.29,17.5,103.0,2.64,2.63,0.32,1.66,4.36,0.82,3.0,680.0,0 +13.05,1.77,2.1,17.0,107.0,3.0,3.0,0.28,2.03,5.04,0.88,3.35,885.0,0 +14.21,4.04,2.44,18.9,111.0,2.85,2.65,0.3,1.25,5.24,0.87,3.33,1080.0,0 +14.38,3.59,2.28,16.0,102.0,3.25,3.17,0.27,2.19,4.9,1.04,3.44,1065.0,0 +13.9,1.68,2.12,16.0,101.0,3.1,3.39,0.21,2.14,6.1,0.91,3.33,985.0,0 +14.1,2.02,2.4,18.8,103.0,2.75,2.92,0.32,2.38,6.2,1.07,2.75,1060.0,0 +13.94,1.73,2.27,17.4,108.0,2.88,3.54,0.32,2.08,8.9,1.12,3.1,1260.0,0 +13.05,1.73,2.04,12.4,92.0,2.72,3.27,0.17,2.91,7.2,1.12,2.91,1150.0,0 +13.83,1.65,2.6,17.2,94.0,2.45,2.99,0.22,2.29,5.6,1.24,3.37,1265.0,0 +13.82,1.75,2.42,14.0,111.0,3.88,3.74,0.32,1.87,7.05,1.01,3.26,1190.0,0 +13.77,1.9,2.68,17.1,115.0,3.0,2.79,0.39,1.68,6.3,1.13,2.93,1375.0,0 +13.74,1.67,2.25,16.4,118.0,2.6,2.9,0.21,1.62,5.85,0.92,3.2,1060.0,0 +13.56,1.73,2.46,20.5,116.0,2.96,2.78,0.2,2.45,6.25,0.98,3.03,1120.0,0 +14.22,1.7,2.3,16.3,118.0,3.2,3.0,0.26,2.03,6.38,0.94,3.31,970.0,0 +13.29,1.97,2.68,16.8,102.0,3.0,3.23,0.31,1.66,6.0,1.07,2.84,1270.0,0 +13.72,1.43,2.5,16.7,108.0,3.4,3.67,0.19,2.04,6.8,0.89,2.87,1285.0,0 +12.37,0.94,1.36,10.6,88.0,1.98,0.57,0.28,0.42,1.95,1.05,1.82,520.0,1 +12.33,1.1,2.28,16.0,101.0,2.05,1.09,0.63,0.41,3.27,1.25,1.67,680.0,1 +12.64,1.36,2.02,16.8,100.0,2.02,1.41,0.53,0.62,5.75,0.98,1.59,450.0,1 +13.67,1.25,1.92,18.0,94.0,2.1,1.79,0.32,0.73,3.8,1.23,2.46,630.0,1 +12.37,1.13,2.16,19.0,87.0,3.5,3.1,0.19,1.87,4.45,1.22,2.87,420.0,1 +12.17,1.45,2.53,19.0,104.0,1.89,1.75,0.45,1.03,2.95,1.45,2.23,355.0,1 +12.37,1.21,2.56,18.1,98.0,2.42,2.65,0.37,2.08,4.6,1.19,2.3,678.0,1 +13.11,1.01,1.7,15.0,78.0,2.98,3.18,0.26,2.28,5.3,1.12,3.18,502.0,1 +12.37,1.17,1.92,19.6,78.0,2.11,2.0,0.27,1.04,4.68,1.12,3.48,510.0,1 +13.34,0.94,2.36,17.0,110.0,2.53,1.3,0.55,0.42,3.17,1.02,1.93,750.0,1 +12.21,1.19,1.75,16.8,151.0,1.85,1.28,0.14,2.5,2.85,1.28,3.07,718.0,1 +12.29,1.61,2.21,20.4,103.0,1.1,1.02,0.37,1.46,3.05,0.906,1.82,870.0,1 +13.86,1.51,2.67,25.0,86.0,2.95,2.86,0.21,1.87,3.38,1.36,3.16,410.0,1 +13.49,1.66,2.24,24.0,87.0,1.88,1.84,0.27,1.03,3.74,0.98,2.78,472.0,1 +12.99,1.67,2.6,30.0,139.0,3.3,2.89,0.21,1.96,3.35,1.31,3.5,985.0,1 +11.96,1.09,2.3,21.0,101.0,3.38,2.14,0.13,1.65,3.21,0.99,3.13,886.0,1 +11.66,1.88,1.92,16.0,97.0,1.61,1.57,0.34,1.15,3.8,1.23,2.14,428.0,1 +13.03,0.9,1.71,16.0,86.0,1.95,2.03,0.24,1.46,4.6,1.19,2.48,392.0,1 +11.84,2.89,2.23,18.0,112.0,1.72,1.32,0.43,0.95,2.65,0.96,2.52,500.0,1 +12.33,0.99,1.95,14.8,136.0,1.9,1.85,0.35,2.76,3.4,1.06,2.31,750.0,1 +12.7,3.87,2.4,23.0,101.0,2.83,2.55,0.43,1.95,2.57,1.19,3.13,463.0,1 +12.0,0.92,2.0,19.0,86.0,2.42,2.26,0.3,1.43,2.5,1.38,3.12,278.0,1 +12.72,1.81,2.2,18.8,86.0,2.2,2.53,0.26,1.77,3.9,1.16,3.14,714.0,1 +12.08,1.13,2.51,24.0,78.0,2.0,1.58,0.4,1.4,2.2,1.31,2.72,630.0,1 +13.05,3.86,2.32,22.5,85.0,1.65,1.59,0.61,1.62,4.8,0.84,2.01,515.0,1 +11.84,0.89,2.58,18.0,94.0,2.2,2.21,0.22,2.35,3.05,0.79,3.08,520.0,1 +12.67,0.98,2.24,18.0,99.0,2.2,1.94,0.3,1.46,2.62,1.23,3.16,450.0,1 +12.16,1.61,2.31,22.8,90.0,1.78,1.69,0.43,1.56,2.45,1.33,2.26,495.0,1 +11.65,1.67,2.62,26.0,88.0,1.92,1.61,0.4,1.34,2.6,1.36,3.21,562.0,1 +11.64,2.06,2.46,21.6,84.0,1.95,1.69,0.48,1.35,2.8,1.0,2.75,680.0,1 +12.08,1.33,2.3,23.6,70.0,2.2,1.59,0.42,1.38,1.74,1.07,3.21,625.0,1 +12.08,1.83,2.32,18.5,81.0,1.6,1.5,0.52,1.64,2.4,1.08,2.27,480.0,1 +12.0,1.51,2.42,22.0,86.0,1.45,1.25,0.5,1.63,3.6,1.05,2.65,450.0,1 +12.69,1.53,2.26,20.7,80.0,1.38,1.46,0.58,1.62,3.05,0.96,2.06,495.0,1 +12.29,2.83,2.22,18.0,88.0,2.45,2.25,0.25,1.99,2.15,1.15,3.3,290.0,1 +11.62,1.99,2.28,18.0,98.0,3.02,2.26,0.17,1.35,3.25,1.16,2.96,345.0,1 +12.47,1.52,2.2,19.0,162.0,2.5,2.27,0.32,3.28,2.6,1.16,2.63,937.0,1 +11.81,2.12,2.74,21.5,134.0,1.6,0.99,0.14,1.56,2.5,0.95,2.26,625.0,1 +12.29,1.41,1.98,16.0,85.0,2.55,2.5,0.29,1.77,2.9,1.23,2.74,428.0,1 +12.37,1.07,2.1,18.5,88.0,3.52,3.75,0.24,1.95,4.5,1.04,2.77,660.0,1 +12.29,3.17,2.21,18.0,88.0,2.85,2.99,0.45,2.81,2.3,1.42,2.83,406.0,1 +12.08,2.08,1.7,17.5,97.0,2.23,2.17,0.26,1.4,3.3,1.27,2.96,710.0,1 +12.6,1.34,1.9,18.5,88.0,1.45,1.36,0.29,1.35,2.45,1.04,2.77,562.0,1 +12.34,2.45,2.46,21.0,98.0,2.56,2.11,0.34,1.31,2.8,0.8,3.38,438.0,1 +11.82,1.72,1.88,19.5,86.0,2.5,1.64,0.37,1.42,2.06,0.94,2.44,415.0,1 +12.51,1.73,1.98,20.5,85.0,2.2,1.92,0.32,1.48,2.94,1.04,3.57,672.0,1 +12.42,2.55,2.27,22.0,90.0,1.68,1.84,0.66,1.42,2.7,0.86,3.3,315.0,1 +12.25,1.73,2.12,19.0,80.0,1.65,2.03,0.37,1.63,3.4,1.0,3.17,510.0,1 +12.72,1.75,2.28,22.5,84.0,1.38,1.76,0.48,1.63,3.3,0.88,2.42,488.0,1 +12.22,1.29,1.94,19.0,92.0,2.36,2.04,0.39,2.08,2.7,0.86,3.02,312.0,1 +11.61,1.35,2.7,20.0,94.0,2.74,2.92,0.29,2.49,2.65,0.96,3.26,680.0,1 +11.46,3.74,1.82,19.5,107.0,3.18,2.58,0.24,3.58,2.9,0.75,2.81,562.0,1 +12.52,2.43,2.17,21.0,88.0,2.55,2.27,0.26,1.22,2.0,0.9,2.78,325.0,1 +11.76,2.68,2.92,20.0,103.0,1.75,2.03,0.6,1.05,3.8,1.23,2.5,607.0,1 +11.41,0.74,2.5,21.0,88.0,2.48,2.01,0.42,1.44,3.08,1.1,2.31,434.0,1 +12.08,1.39,2.5,22.5,84.0,2.56,2.29,0.43,1.04,2.9,0.93,3.19,385.0,1 +11.03,1.51,2.2,21.5,85.0,2.46,2.17,0.52,2.01,1.9,1.71,2.87,407.0,1 +11.82,1.47,1.99,20.8,86.0,1.98,1.6,0.3,1.53,1.95,0.95,3.33,495.0,1 +12.42,1.61,2.19,22.5,108.0,2.0,2.09,0.34,1.61,2.06,1.06,2.96,345.0,1 +12.77,3.43,1.98,16.0,80.0,1.63,1.25,0.43,0.83,3.4,0.7,2.12,372.0,1 +12.0,3.43,2.0,19.0,87.0,2.0,1.64,0.37,1.87,1.28,0.93,3.05,564.0,1 +11.45,2.4,2.42,20.0,96.0,2.9,2.79,0.32,1.83,3.25,0.8,3.39,625.0,1 +11.56,2.05,3.23,28.5,119.0,3.18,5.08,0.47,1.87,6.0,0.93,3.69,465.0,1 +12.42,4.43,2.73,26.5,102.0,2.2,2.13,0.43,1.71,2.08,0.92,3.12,365.0,1 +13.05,5.8,2.13,21.5,86.0,2.62,2.65,0.3,2.01,2.6,0.73,3.1,380.0,1 +11.87,4.31,2.39,21.0,82.0,2.86,3.03,0.21,2.91,2.8,0.75,3.64,380.0,1 +12.07,2.16,2.17,21.0,85.0,2.6,2.65,0.37,1.35,2.76,0.86,3.28,378.0,1 +12.43,1.53,2.29,21.5,86.0,2.74,3.15,0.39,1.77,3.94,0.69,2.84,352.0,1 +11.79,2.13,2.78,28.5,92.0,2.13,2.24,0.58,1.76,3.0,0.97,2.44,466.0,1 +12.37,1.63,2.3,24.5,88.0,2.22,2.45,0.4,1.9,2.12,0.89,2.78,342.0,1 +12.04,4.3,2.38,22.0,80.0,2.1,1.75,0.42,1.35,2.6,0.79,2.57,580.0,1 +12.86,1.35,2.32,18.0,122.0,1.51,1.25,0.21,0.94,4.1,0.76,1.29,630.0,2 +12.88,2.99,2.4,20.0,104.0,1.3,1.22,0.24,0.83,5.4,0.74,1.42,530.0,2 +12.81,2.31,2.4,24.0,98.0,1.15,1.09,0.27,0.83,5.7,0.66,1.36,560.0,2 +12.7,3.55,2.36,21.5,106.0,1.7,1.2,0.17,0.84,5.0,0.78,1.29,600.0,2 +12.51,1.24,2.25,17.5,85.0,2.0,0.58,0.6,1.25,5.45,0.75,1.51,650.0,2 +12.6,2.46,2.2,18.5,94.0,1.62,0.66,0.63,0.94,7.1,0.73,1.58,695.0,2 +12.25,4.72,2.54,21.0,89.0,1.38,0.47,0.53,0.8,3.85,0.75,1.27,720.0,2 +12.53,5.51,2.64,25.0,96.0,1.79,0.6,0.63,1.1,5.0,0.82,1.69,515.0,2 +13.49,3.59,2.19,19.5,88.0,1.62,0.48,0.58,0.88,5.7,0.81,1.82,580.0,2 +12.84,2.96,2.61,24.0,101.0,2.32,0.6,0.53,0.81,4.92,0.89,2.15,590.0,2 +12.93,2.81,2.7,21.0,96.0,1.54,0.5,0.53,0.75,4.6,0.77,2.31,600.0,2 +13.36,2.56,2.35,20.0,89.0,1.4,0.5,0.37,0.64,5.6,0.7,2.47,780.0,2 +13.52,3.17,2.72,23.5,97.0,1.55,0.52,0.5,0.55,4.35,0.89,2.06,520.0,2 +13.62,4.95,2.35,20.0,92.0,2.0,0.8,0.47,1.02,4.4,0.91,2.05,550.0,2 +12.25,3.88,2.2,18.5,112.0,1.38,0.78,0.29,1.14,8.21,0.65,2.0,855.0,2 +13.16,3.57,2.15,21.0,102.0,1.5,0.55,0.43,1.3,4.0,0.6,1.68,830.0,2 +13.88,5.04,2.23,20.0,80.0,0.98,0.34,0.4,0.68,4.9,0.58,1.33,415.0,2 +12.87,4.61,2.48,21.5,86.0,1.7,0.65,0.47,0.86,7.65,0.54,1.86,625.0,2 +13.32,3.24,2.38,21.5,92.0,1.93,0.76,0.45,1.25,8.42,0.55,1.62,650.0,2 +13.08,3.9,2.36,21.5,113.0,1.41,1.39,0.34,1.14,9.4,0.57,1.33,550.0,2 +13.5,3.12,2.62,24.0,123.0,1.4,1.57,0.22,1.25,8.6,0.59,1.3,500.0,2 +12.79,2.67,2.48,22.0,112.0,1.48,1.36,0.24,1.26,10.8,0.48,1.47,480.0,2 +13.11,1.9,2.75,25.5,116.0,2.2,1.28,0.26,1.56,7.1,0.61,1.33,425.0,2 +13.23,3.3,2.28,18.5,98.0,1.8,0.83,0.61,1.87,10.52,0.56,1.51,675.0,2 +12.58,1.29,2.1,20.0,103.0,1.48,0.58,0.53,1.4,7.6,0.58,1.55,640.0,2 +13.17,5.19,2.32,22.0,93.0,1.74,0.63,0.61,1.55,7.9,0.6,1.48,725.0,2 +13.84,4.12,2.38,19.5,89.0,1.8,0.83,0.48,1.56,9.01,0.57,1.64,480.0,2 +12.45,3.03,2.64,27.0,97.0,1.9,0.58,0.63,1.14,7.5,0.67,1.73,880.0,2 +14.34,1.68,2.7,25.0,98.0,2.8,1.31,0.53,2.7,13.0,0.57,1.96,660.0,2 +13.48,1.67,2.64,22.5,89.0,2.6,1.1,0.52,2.29,11.75,0.57,1.78,620.0,2 +12.36,3.83,2.38,21.0,88.0,2.3,0.92,0.5,1.04,7.65,0.56,1.58,520.0,2 +13.69,3.26,2.54,20.0,107.0,1.83,0.56,0.5,0.8,5.88,0.96,1.82,680.0,2 +12.85,3.27,2.58,22.0,106.0,1.65,0.6,0.6,0.96,5.58,0.87,2.11,570.0,2 +12.96,3.45,2.35,18.5,106.0,1.39,0.7,0.4,0.94,5.28,0.68,1.75,675.0,2 +13.78,2.76,2.3,22.0,90.0,1.35,0.68,0.41,1.03,9.58,0.7,1.68,615.0,2 +13.73,4.36,2.26,22.5,88.0,1.28,0.47,0.52,1.15,6.62,0.78,1.75,520.0,2 +13.45,3.7,2.6,23.0,111.0,1.7,0.92,0.43,1.46,10.68,0.85,1.56,695.0,2 +12.82,3.37,2.3,19.5,88.0,1.48,0.66,0.4,0.97,10.26,0.72,1.75,685.0,2 +13.58,2.58,2.69,24.5,105.0,1.55,0.84,0.39,1.54,8.66,0.74,1.8,750.0,2 +13.4,4.6,2.86,25.0,112.0,1.98,0.96,0.27,1.11,8.5,0.67,1.92,630.0,2 +12.2,3.03,2.32,19.0,96.0,1.25,0.49,0.4,0.73,5.5,0.66,1.83,510.0,2 +12.77,2.39,2.28,19.5,86.0,1.39,0.51,0.48,0.64,9.899999,0.57,1.63,470.0,2 +14.16,2.51,2.48,20.0,91.0,1.68,0.7,0.44,1.24,9.7,0.62,1.71,660.0,2 +13.71,5.65,2.45,20.5,95.0,1.68,0.61,0.52,1.06,7.7,0.64,1.74,740.0,2 +13.4,3.91,2.48,23.0,102.0,1.8,0.75,0.43,1.41,7.3,0.7,1.56,750.0,2 +13.27,4.28,2.26,20.0,120.0,1.59,0.69,0.43,1.35,10.2,0.59,1.56,835.0,2 +13.17,2.59,2.37,20.0,120.0,1.65,0.68,0.53,1.46,9.3,0.6,1.62,840.0,2 +14.13,4.1,2.74,24.5,96.0,2.05,0.76,0.56,1.35,9.2,0.61,1.6,560.0,2 diff --git a/Module_3/Week5/exercise.ipynb b/Module_3/Week5/exercise.ipynb new file mode 100644 index 00000000..1ed0860a --- /dev/null +++ b/Module_3/Week5/exercise.ipynb @@ -0,0 +1,657 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "import xgboost as xgb\n", + "from sklearn.metrics import mean_absolute_error, mean_squared_error,accuracy_score\n", + "from sklearn.model_selection import train_test_split\n", + "from sklearn.preprocessing import OrdinalEncoder, LabelEncoder\n", + "import os\n", + "import warnings" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Problem 3" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
XYmonthdayFFMCDMCDCISItempRHwindrainarea
075marfri4.46820426.294.31.8082898.2516.7False0.000000
174octtue4.51743135.4669.12.04122018.0330.9False0.000000
274octsat4.51743143.7686.92.04122014.6331.3False0.000000
386marfri4.52936833.377.52.3025858.3974.0True0.000000
486marsun4.50313751.3102.22.36085411.4991.8False0.000000
..........................................
50543augsun4.41401056.7665.61.06471127.8322.7False2.006871
50624augsun4.41401056.7665.61.06471121.9715.8False4.012592
50774augsun4.41401056.7665.61.06471121.2706.7False2.498152
50814augsat4.558079146.0614.72.50959925.6424.0False0.000000
50963novtue4.3882573.0106.70.74193711.8314.5False0.000000
\n", + "

510 rows × 13 columns

\n", + "
" + ], + "text/plain": [ + " X Y month day FFMC DMC DC ISI temp RH wind rain \\\n", + "0 7 5 mar fri 4.468204 26.2 94.3 1.808289 8.2 51 6.7 False \n", + "1 7 4 oct tue 4.517431 35.4 669.1 2.041220 18.0 33 0.9 False \n", + "2 7 4 oct sat 4.517431 43.7 686.9 2.041220 14.6 33 1.3 False \n", + "3 8 6 mar fri 4.529368 33.3 77.5 2.302585 8.3 97 4.0 True \n", + "4 8 6 mar sun 4.503137 51.3 102.2 2.360854 11.4 99 1.8 False \n", + ".. .. .. ... ... ... ... ... ... ... .. ... ... \n", + "505 4 3 aug sun 4.414010 56.7 665.6 1.064711 27.8 32 2.7 False \n", + "506 2 4 aug sun 4.414010 56.7 665.6 1.064711 21.9 71 5.8 False \n", + "507 7 4 aug sun 4.414010 56.7 665.6 1.064711 21.2 70 6.7 False \n", + "508 1 4 aug sat 4.558079 146.0 614.7 2.509599 25.6 42 4.0 False \n", + "509 6 3 nov tue 4.388257 3.0 106.7 0.741937 11.8 31 4.5 False \n", + "\n", + " area \n", + "0 0.000000 \n", + "1 0.000000 \n", + "2 0.000000 \n", + "3 0.000000 \n", + "4 0.000000 \n", + ".. ... \n", + "505 2.006871 \n", + "506 4.012592 \n", + "507 2.498152 \n", + "508 0.000000 \n", + "509 0.000000 \n", + "\n", + "[510 rows x 13 columns]" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "PATH = os.chdir('/Users/microwave/AIO_2024/Module_3/Week5')\n", + "df = pd.read_csv('Problem 3.csv')\n", + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of categories in month: 12\n", + "Number of categories in day: 7\n", + "Number of categories in rain: 2\n" + ] + } + ], + "source": [ + "categorical_cols = df.select_dtypes(include = ['bool','object']).columns.to_list()\n", + "\n", + "for col_name in categorical_cols:\n", + " n_categories = df[col_name].nunique()\n", + " print(f'Number of categories in {col_name}: {n_categories}')\n", + "\n", + "ordinal_encoder = OrdinalEncoder()\n", + "encoded_categorical_cols = ordinal_encoder.fit_transform(df[categorical_cols])\n", + "\n", + "encoded_categorical_df = pd.DataFrame(encoded_categorical_cols,columns = categorical_cols)\n", + "\n", + "numerical_df = df.drop(categorical_cols,axis = 1)\n", + "encoded_df = pd.concat([numerical_df,encoded_categorical_df],axis = 1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "X = encoded_df.drop(columns = ['area'])\n", + "y = encoded_df['area']\n", + "\n", + "SEED = 7\n", + "X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.3,random_state=SEED)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Best params for XGB Regressor: {'gamma': 0, 'learning_rate': 0.01, 'max_depth': 5, 'n_estimators': 139, 'objective': 'reg:squarederror'}\n", + "Best score for XGB Regressor: -0.0061967903336567765\n" + ] + } + ], + "source": [ + "from sklearn.model_selection import GridSearchCV\n", + "\n", + "\n", + "lr = 0.01\n", + "N_ESTIMATORS = 102\n", + "MAX_DEPTH = 3 \n", + "\n", + "params = {'objective':['reg:squarederror'],\n", + " 'learning_rate' : [0.01,0.02,0.03,0.04],\n", + " 'max_depth' : range(3,7),\n", + " 'n_estimators': range(100,150,1),\n", + " 'gamma':range(0,3)}\n", + "\n", + "xgb = xgb.XGBRegressor()\n", + "xgb_grid = GridSearchCV(xgb,params,cv=2,n_jobs=3)\n", + "xgb_grid.fit(X_train,y_train)\n", + "\n", + "print(f'Best params for XGB Regressor: {xgb_grid.best_params_}')\n", + "print(f'Best score for XGB Regressor: {xgb_grid.best_score_}')\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean absolute error: 1.1593882730377256\n", + "Mean squared error: 1.951430694908722\n" + ] + } + ], + "source": [ + "y_pred = xgb_grid.predict(X_test)\n", + "mae = mean_absolute_error(y_test,y_pred)\n", + "mse = mean_squared_error(y_test,y_pred)\n", + "\n", + "print(f'Mean absolute error: {mae}')\n", + "print(f'Mean squared error: {mse}')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Problem 1" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
alcoholmalic_acidashalcalinity_of_ashmagnesiumtotal_phenolsflavanoidsnonflavanoid_phenolsproanthocyaninscolor_intensityhueod280/od315_of_diluted_winesprolineTarget
014.231.712.4315.6127.02.803.060.282.295.641.043.921065.00
113.201.782.1411.2100.02.652.760.261.284.381.053.401050.00
213.162.362.6718.6101.02.803.240.302.815.681.033.171185.00
314.371.952.5016.8113.03.853.490.242.187.800.863.451480.00
413.242.592.8721.0118.02.802.690.391.824.321.042.93735.00
\n", + "
" + ], + "text/plain": [ + " alcohol malic_acid ash alcalinity_of_ash magnesium total_phenols \\\n", + "0 14.23 1.71 2.43 15.6 127.0 2.80 \n", + "1 13.20 1.78 2.14 11.2 100.0 2.65 \n", + "2 13.16 2.36 2.67 18.6 101.0 2.80 \n", + "3 14.37 1.95 2.50 16.8 113.0 3.85 \n", + "4 13.24 2.59 2.87 21.0 118.0 2.80 \n", + "\n", + " flavanoids nonflavanoid_phenols proanthocyanins color_intensity hue \\\n", + "0 3.06 0.28 2.29 5.64 1.04 \n", + "1 2.76 0.26 1.28 4.38 1.05 \n", + "2 3.24 0.30 2.81 5.68 1.03 \n", + "3 3.49 0.24 2.18 7.80 0.86 \n", + "4 2.69 0.39 1.82 4.32 1.04 \n", + "\n", + " od280/od315_of_diluted_wines proline Target \n", + "0 3.92 1065.0 0 \n", + "1 3.40 1050.0 0 \n", + "2 3.17 1185.0 0 \n", + "3 3.45 1480.0 0 \n", + "4 2.93 735.0 0 " + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = pd.read_csv('Problem 4.csv')\n", + "df.head(5)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "X,y = df.iloc[:,:-1], df.iloc[:,-1]\n", + "\n", + "X_train,X_test,y_train, y_test = train_test_split(X,y,test_size=0.3,random_state=SEED)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "ename": "AttributeError", + "evalue": "'XGBRegressor' object has no attribute 'XGBClassifier'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "Input \u001b[0;32mIn [9]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m params \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mobjective\u001b[39m\u001b[38;5;124m'\u001b[39m: [\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbinary:logistic\u001b[39m\u001b[38;5;124m'\u001b[39m],\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mlearning_rate\u001b[39m\u001b[38;5;124m'\u001b[39m: [\u001b[38;5;241m0.01\u001b[39m, \u001b[38;5;241m0.02\u001b[39m, \u001b[38;5;241m0.03\u001b[39m, \u001b[38;5;241m0.04\u001b[39m],\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mgamma\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;28mrange\u001b[39m(\u001b[38;5;241m0\u001b[39m, \u001b[38;5;241m3\u001b[39m)\n\u001b[1;32m 7\u001b[0m }\n\u001b[0;32m----> 9\u001b[0m xgb_clf \u001b[38;5;241m=\u001b[39m \u001b[43mxgb\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mXGBClassifier\u001b[49m()\n\u001b[1;32m 10\u001b[0m xgb_grid_clf \u001b[38;5;241m=\u001b[39m GridSearchCV(xgb_clf, params, cv\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m2\u001b[39m, n_jobs\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m3\u001b[39m)\n\u001b[1;32m 11\u001b[0m xgb_grid_clf\u001b[38;5;241m.\u001b[39mfit(X_train, y_train)\n", + "\u001b[0;31mAttributeError\u001b[0m: 'XGBRegressor' object has no attribute 'XGBClassifier'" + ] + } + ], + "source": [ + "params = {\n", + " 'objective': ['binary:logistic'],\n", + " 'learning_rate': [0.01, 0.02, 0.03, 0.04],\n", + " 'max_depth': range(3, 7),\n", + " 'n_estimators': range(100, 150, 1),\n", + " 'gamma': range(0, 3)\n", + "}\n", + "\n", + "xgb_clf = xgb.XGBClassifier()\n", + "xgb_grid_clf = GridSearchCV(xgb_clf, params, cv=2, n_jobs=3)\n", + "xgb_grid_clf.fit(X_train, y_train)\n", + "\n", + "print(f'Best params for XGB Classifier: {xgb_grid_clf.best_params_}')\n", + "print(f'Best score for XGB Classifier: {xgb_grid_clf.best_score_}')\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "y_pred = xgb_grid_clf.predict(X_test)\n", + "y_train_pred = xgb_grid_clf.predict(X_train)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "train_acc = accuracy_score(y_train, y_train_pred,)\n", + "test_acc = accuracy_score(y_test,y_pred)\n", + "\n", + "print(f'Train accuracy: {train_acc}')\n", + "print(f'Test accuracy {test_acc}')\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.13" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}