diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..496ee2c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store
\ No newline at end of file
diff --git a/assets/CarPrice_Assignment.csv b/assets/CarPrice_Assignment.csv
new file mode 100644
index 0000000..b9ea8b2
--- /dev/null
+++ b/assets/CarPrice_Assignment.csv
@@ -0,0 +1,206 @@
+car_ID,symboling,CarName,fueltype,aspiration,doornumber,carbody,drivewheel,enginelocation,wheelbase,carlength,carwidth,carheight,curbweight,enginetype,cylindernumber,enginesize,fuelsystem,boreratio,stroke,compressionratio,horsepower,peakrpm,citympg,highwaympg,price
+1,3,alfa-romero giulia,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548,dohc,four,130,mpfi,3.47,2.68,9,111,5000,21,27,13495
+2,3,alfa-romero stelvio,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548,dohc,four,130,mpfi,3.47,2.68,9,111,5000,21,27,16500
+3,1,alfa-romero Quadrifoglio,gas,std,two,hatchback,rwd,front,94.5,171.2,65.5,52.4,2823,ohcv,six,152,mpfi,2.68,3.47,9,154,5000,19,26,16500
+4,2,audi 100 ls,gas,std,four,sedan,fwd,front,99.8,176.6,66.2,54.3,2337,ohc,four,109,mpfi,3.19,3.4,10,102,5500,24,30,13950
+5,2,audi 100ls,gas,std,four,sedan,4wd,front,99.4,176.6,66.4,54.3,2824,ohc,five,136,mpfi,3.19,3.4,8,115,5500,18,22,17450
+6,2,audi fox,gas,std,two,sedan,fwd,front,99.8,177.3,66.3,53.1,2507,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,19,25,15250
+7,1,audi 100ls,gas,std,four,sedan,fwd,front,105.8,192.7,71.4,55.7,2844,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,19,25,17710
+8,1,audi 5000,gas,std,four,wagon,fwd,front,105.8,192.7,71.4,55.7,2954,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,19,25,18920
+9,1,audi 4000,gas,turbo,four,sedan,fwd,front,105.8,192.7,71.4,55.9,3086,ohc,five,131,mpfi,3.13,3.4,8.3,140,5500,17,20,23875
+10,0,audi 5000s (diesel),gas,turbo,two,hatchback,4wd,front,99.5,178.2,67.9,52,3053,ohc,five,131,mpfi,3.13,3.4,7,160,5500,16,22,17859.167
+11,2,bmw 320i,gas,std,two,sedan,rwd,front,101.2,176.8,64.8,54.3,2395,ohc,four,108,mpfi,3.5,2.8,8.8,101,5800,23,29,16430
+12,0,bmw 320i,gas,std,four,sedan,rwd,front,101.2,176.8,64.8,54.3,2395,ohc,four,108,mpfi,3.5,2.8,8.8,101,5800,23,29,16925
+13,0,bmw x1,gas,std,two,sedan,rwd,front,101.2,176.8,64.8,54.3,2710,ohc,six,164,mpfi,3.31,3.19,9,121,4250,21,28,20970
+14,0,bmw x3,gas,std,four,sedan,rwd,front,101.2,176.8,64.8,54.3,2765,ohc,six,164,mpfi,3.31,3.19,9,121,4250,21,28,21105
+15,1,bmw z4,gas,std,four,sedan,rwd,front,103.5,189,66.9,55.7,3055,ohc,six,164,mpfi,3.31,3.19,9,121,4250,20,25,24565
+16,0,bmw x4,gas,std,four,sedan,rwd,front,103.5,189,66.9,55.7,3230,ohc,six,209,mpfi,3.62,3.39,8,182,5400,16,22,30760
+17,0,bmw x5,gas,std,two,sedan,rwd,front,103.5,193.8,67.9,53.7,3380,ohc,six,209,mpfi,3.62,3.39,8,182,5400,16,22,41315
+18,0,bmw x3,gas,std,four,sedan,rwd,front,110,197,70.9,56.3,3505,ohc,six,209,mpfi,3.62,3.39,8,182,5400,15,20,36880
+19,2,chevrolet impala,gas,std,two,hatchback,fwd,front,88.4,141.1,60.3,53.2,1488,l,three,61,2bbl,2.91,3.03,9.5,48,5100,47,53,5151
+20,1,chevrolet monte carlo,gas,std,two,hatchback,fwd,front,94.5,155.9,63.6,52,1874,ohc,four,90,2bbl,3.03,3.11,9.6,70,5400,38,43,6295
+21,0,chevrolet vega 2300,gas,std,four,sedan,fwd,front,94.5,158.8,63.6,52,1909,ohc,four,90,2bbl,3.03,3.11,9.6,70,5400,38,43,6575
+22,1,dodge rampage,gas,std,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,1876,ohc,four,90,2bbl,2.97,3.23,9.41,68,5500,37,41,5572
+23,1,dodge challenger se,gas,std,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,1876,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6377
+24,1,dodge d200,gas,turbo,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,2128,ohc,four,98,mpfi,3.03,3.39,7.6,102,5500,24,30,7957
+25,1,dodge monaco (sw),gas,std,four,hatchback,fwd,front,93.7,157.3,63.8,50.6,1967,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6229
+26,1,dodge colt hardtop,gas,std,four,sedan,fwd,front,93.7,157.3,63.8,50.6,1989,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6692
+27,1,dodge colt (sw),gas,std,four,sedan,fwd,front,93.7,157.3,63.8,50.6,1989,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,7609
+28,1,dodge coronet custom,gas,turbo,two,sedan,fwd,front,93.7,157.3,63.8,50.6,2191,ohc,four,98,mpfi,3.03,3.39,7.6,102,5500,24,30,8558
+29,-1,dodge dart custom,gas,std,four,wagon,fwd,front,103.3,174.6,64.6,59.8,2535,ohc,four,122,2bbl,3.34,3.46,8.5,88,5000,24,30,8921
+30,3,dodge coronet custom (sw),gas,turbo,two,hatchback,fwd,front,95.9,173.2,66.3,50.2,2811,ohc,four,156,mfi,3.6,3.9,7,145,5000,19,24,12964
+31,2,honda civic,gas,std,two,hatchback,fwd,front,86.6,144.6,63.9,50.8,1713,ohc,four,92,1bbl,2.91,3.41,9.6,58,4800,49,54,6479
+32,2,honda civic cvcc,gas,std,two,hatchback,fwd,front,86.6,144.6,63.9,50.8,1819,ohc,four,92,1bbl,2.91,3.41,9.2,76,6000,31,38,6855
+33,1,honda civic,gas,std,two,hatchback,fwd,front,93.7,150,64,52.6,1837,ohc,four,79,1bbl,2.91,3.07,10.1,60,5500,38,42,5399
+34,1,honda accord cvcc,gas,std,two,hatchback,fwd,front,93.7,150,64,52.6,1940,ohc,four,92,1bbl,2.91,3.41,9.2,76,6000,30,34,6529
+35,1,honda civic cvcc,gas,std,two,hatchback,fwd,front,93.7,150,64,52.6,1956,ohc,four,92,1bbl,2.91,3.41,9.2,76,6000,30,34,7129
+36,0,honda accord lx,gas,std,four,sedan,fwd,front,96.5,163.4,64,54.5,2010,ohc,four,92,1bbl,2.91,3.41,9.2,76,6000,30,34,7295
+37,0,honda civic 1500 gl,gas,std,four,wagon,fwd,front,96.5,157.1,63.9,58.3,2024,ohc,four,92,1bbl,2.92,3.41,9.2,76,6000,30,34,7295
+38,0,honda accord,gas,std,two,hatchback,fwd,front,96.5,167.5,65.2,53.3,2236,ohc,four,110,1bbl,3.15,3.58,9,86,5800,27,33,7895
+39,0,honda civic 1300,gas,std,two,hatchback,fwd,front,96.5,167.5,65.2,53.3,2289,ohc,four,110,1bbl,3.15,3.58,9,86,5800,27,33,9095
+40,0,honda prelude,gas,std,four,sedan,fwd,front,96.5,175.4,65.2,54.1,2304,ohc,four,110,1bbl,3.15,3.58,9,86,5800,27,33,8845
+41,0,honda accord,gas,std,four,sedan,fwd,front,96.5,175.4,62.5,54.1,2372,ohc,four,110,1bbl,3.15,3.58,9,86,5800,27,33,10295
+42,0,honda civic,gas,std,four,sedan,fwd,front,96.5,175.4,65.2,54.1,2465,ohc,four,110,mpfi,3.15,3.58,9,101,5800,24,28,12945
+43,1,honda civic (auto),gas,std,two,sedan,fwd,front,96.5,169.1,66,51,2293,ohc,four,110,2bbl,3.15,3.58,9.1,100,5500,25,31,10345
+44,0,isuzu MU-X,gas,std,four,sedan,rwd,front,94.3,170.7,61.8,53.5,2337,ohc,four,111,2bbl,3.31,3.23,8.5,78,4800,24,29,6785
+45,1,isuzu D-Max ,gas,std,two,sedan,fwd,front,94.5,155.9,63.6,52,1874,ohc,four,90,2bbl,3.03,3.11,9.6,70,5400,38,43,8916.5
+46,0,isuzu D-Max V-Cross,gas,std,four,sedan,fwd,front,94.5,155.9,63.6,52,1909,ohc,four,90,2bbl,3.03,3.11,9.6,70,5400,38,43,8916.5
+47,2,isuzu D-Max ,gas,std,two,hatchback,rwd,front,96,172.6,65.2,51.4,2734,ohc,four,119,spfi,3.43,3.23,9.2,90,5000,24,29,11048
+48,0,jaguar xj,gas,std,four,sedan,rwd,front,113,199.6,69.6,52.8,4066,dohc,six,258,mpfi,3.63,4.17,8.1,176,4750,15,19,32250
+49,0,jaguar xf,gas,std,four,sedan,rwd,front,113,199.6,69.6,52.8,4066,dohc,six,258,mpfi,3.63,4.17,8.1,176,4750,15,19,35550
+50,0,jaguar xk,gas,std,two,sedan,rwd,front,102,191.7,70.6,47.8,3950,ohcv,twelve,326,mpfi,3.54,2.76,11.5,262,5000,13,17,36000
+51,1,maxda rx3,gas,std,two,hatchback,fwd,front,93.1,159.1,64.2,54.1,1890,ohc,four,91,2bbl,3.03,3.15,9,68,5000,30,31,5195
+52,1,maxda glc deluxe,gas,std,two,hatchback,fwd,front,93.1,159.1,64.2,54.1,1900,ohc,four,91,2bbl,3.03,3.15,9,68,5000,31,38,6095
+53,1,mazda rx2 coupe,gas,std,two,hatchback,fwd,front,93.1,159.1,64.2,54.1,1905,ohc,four,91,2bbl,3.03,3.15,9,68,5000,31,38,6795
+54,1,mazda rx-4,gas,std,four,sedan,fwd,front,93.1,166.8,64.2,54.1,1945,ohc,four,91,2bbl,3.03,3.15,9,68,5000,31,38,6695
+55,1,mazda glc deluxe,gas,std,four,sedan,fwd,front,93.1,166.8,64.2,54.1,1950,ohc,four,91,2bbl,3.08,3.15,9,68,5000,31,38,7395
+56,3,mazda 626,gas,std,two,hatchback,rwd,front,95.3,169,65.7,49.6,2380,rotor,two,70,4bbl,3.33,3.255,9.4,101,6000,17,23,10945
+57,3,mazda glc,gas,std,two,hatchback,rwd,front,95.3,169,65.7,49.6,2380,rotor,two,70,4bbl,3.33,3.255,9.4,101,6000,17,23,11845
+58,3,mazda rx-7 gs,gas,std,two,hatchback,rwd,front,95.3,169,65.7,49.6,2385,rotor,two,70,4bbl,3.33,3.255,9.4,101,6000,17,23,13645
+59,3,mazda glc 4,gas,std,two,hatchback,rwd,front,95.3,169,65.7,49.6,2500,rotor,two,80,mpfi,3.33,3.255,9.4,135,6000,16,23,15645
+60,1,mazda 626,gas,std,two,hatchback,fwd,front,98.8,177.8,66.5,53.7,2385,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,8845
+61,0,mazda glc custom l,gas,std,four,sedan,fwd,front,98.8,177.8,66.5,55.5,2410,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,8495
+62,1,mazda glc custom,gas,std,two,hatchback,fwd,front,98.8,177.8,66.5,53.7,2385,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,10595
+63,0,mazda rx-4,gas,std,four,sedan,fwd,front,98.8,177.8,66.5,55.5,2410,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,10245
+64,0,mazda glc deluxe,diesel,std,four,sedan,fwd,front,98.8,177.8,66.5,55.5,2443,ohc,four,122,idi,3.39,3.39,22.7,64,4650,36,42,10795
+65,0,mazda 626,gas,std,four,hatchback,fwd,front,98.8,177.8,66.5,55.5,2425,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,11245
+66,0,mazda glc,gas,std,four,sedan,rwd,front,104.9,175,66.1,54.4,2670,ohc,four,140,mpfi,3.76,3.16,8,120,5000,19,27,18280
+67,0,mazda rx-7 gs,diesel,std,four,sedan,rwd,front,104.9,175,66.1,54.4,2700,ohc,four,134,idi,3.43,3.64,22,72,4200,31,39,18344
+68,-1,buick electra 225 custom,diesel,turbo,four,sedan,rwd,front,110,190.9,70.3,56.5,3515,ohc,five,183,idi,3.58,3.64,21.5,123,4350,22,25,25552
+69,-1,buick century luxus (sw),diesel,turbo,four,wagon,rwd,front,110,190.9,70.3,58.7,3750,ohc,five,183,idi,3.58,3.64,21.5,123,4350,22,25,28248
+70,0,buick century,diesel,turbo,two,hardtop,rwd,front,106.7,187.5,70.3,54.9,3495,ohc,five,183,idi,3.58,3.64,21.5,123,4350,22,25,28176
+71,-1,buick skyhawk,diesel,turbo,four,sedan,rwd,front,115.6,202.6,71.7,56.3,3770,ohc,five,183,idi,3.58,3.64,21.5,123,4350,22,25,31600
+72,-1,buick opel isuzu deluxe,gas,std,four,sedan,rwd,front,115.6,202.6,71.7,56.5,3740,ohcv,eight,234,mpfi,3.46,3.1,8.3,155,4750,16,18,34184
+73,3,buick skylark,gas,std,two,convertible,rwd,front,96.6,180.3,70.5,50.8,3685,ohcv,eight,234,mpfi,3.46,3.1,8.3,155,4750,16,18,35056
+74,0,buick century special,gas,std,four,sedan,rwd,front,120.9,208.1,71.7,56.7,3900,ohcv,eight,308,mpfi,3.8,3.35,8,184,4500,14,16,40960
+75,1,buick regal sport coupe (turbo),gas,std,two,hardtop,rwd,front,112,199.2,72,55.4,3715,ohcv,eight,304,mpfi,3.8,3.35,8,184,4500,14,16,45400
+76,1,mercury cougar,gas,turbo,two,hatchback,rwd,front,102.7,178.4,68,54.8,2910,ohc,four,140,mpfi,3.78,3.12,8,175,5000,19,24,16503
+77,2,mitsubishi mirage,gas,std,two,hatchback,fwd,front,93.7,157.3,64.4,50.8,1918,ohc,four,92,2bbl,2.97,3.23,9.4,68,5500,37,41,5389
+78,2,mitsubishi lancer,gas,std,two,hatchback,fwd,front,93.7,157.3,64.4,50.8,1944,ohc,four,92,2bbl,2.97,3.23,9.4,68,5500,31,38,6189
+79,2,mitsubishi outlander,gas,std,two,hatchback,fwd,front,93.7,157.3,64.4,50.8,2004,ohc,four,92,2bbl,2.97,3.23,9.4,68,5500,31,38,6669
+80,1,mitsubishi g4,gas,turbo,two,hatchback,fwd,front,93,157.3,63.8,50.8,2145,ohc,four,98,spdi,3.03,3.39,7.6,102,5500,24,30,7689
+81,3,mitsubishi mirage g4,gas,turbo,two,hatchback,fwd,front,96.3,173,65.4,49.4,2370,ohc,four,110,spdi,3.17,3.46,7.5,116,5500,23,30,9959
+82,3,mitsubishi g4,gas,std,two,hatchback,fwd,front,96.3,173,65.4,49.4,2328,ohc,four,122,2bbl,3.35,3.46,8.5,88,5000,25,32,8499
+83,3,mitsubishi outlander,gas,turbo,two,hatchback,fwd,front,95.9,173.2,66.3,50.2,2833,ohc,four,156,spdi,3.58,3.86,7,145,5000,19,24,12629
+84,3,mitsubishi g4,gas,turbo,two,hatchback,fwd,front,95.9,173.2,66.3,50.2,2921,ohc,four,156,spdi,3.59,3.86,7,145,5000,19,24,14869
+85,3,mitsubishi mirage g4,gas,turbo,two,hatchback,fwd,front,95.9,173.2,66.3,50.2,2926,ohc,four,156,spdi,3.59,3.86,7,145,5000,19,24,14489
+86,1,mitsubishi montero,gas,std,four,sedan,fwd,front,96.3,172.4,65.4,51.6,2365,ohc,four,122,2bbl,3.35,3.46,8.5,88,5000,25,32,6989
+87,1,mitsubishi pajero,gas,std,four,sedan,fwd,front,96.3,172.4,65.4,51.6,2405,ohc,four,122,2bbl,3.35,3.46,8.5,88,5000,25,32,8189
+88,1,mitsubishi outlander,gas,turbo,four,sedan,fwd,front,96.3,172.4,65.4,51.6,2403,ohc,four,110,spdi,3.17,3.46,7.5,116,5500,23,30,9279
+89,-1,mitsubishi mirage g4,gas,std,four,sedan,fwd,front,96.3,172.4,65.4,51.6,2403,ohc,four,110,spdi,3.17,3.46,7.5,116,5500,23,30,9279
+90,1,Nissan versa,gas,std,two,sedan,fwd,front,94.5,165.3,63.8,54.5,1889,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,5499
+91,1,nissan gt-r,diesel,std,two,sedan,fwd,front,94.5,165.3,63.8,54.5,2017,ohc,four,103,idi,2.99,3.47,21.9,55,4800,45,50,7099
+92,1,nissan rogue,gas,std,two,sedan,fwd,front,94.5,165.3,63.8,54.5,1918,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,6649
+93,1,nissan latio,gas,std,four,sedan,fwd,front,94.5,165.3,63.8,54.5,1938,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,6849
+94,1,nissan titan,gas,std,four,wagon,fwd,front,94.5,170.2,63.8,53.5,2024,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7349
+95,1,nissan leaf,gas,std,two,sedan,fwd,front,94.5,165.3,63.8,54.5,1951,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7299
+96,1,nissan juke,gas,std,two,hatchback,fwd,front,94.5,165.6,63.8,53.3,2028,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7799
+97,1,nissan latio,gas,std,four,sedan,fwd,front,94.5,165.3,63.8,54.5,1971,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7499
+98,1,nissan note,gas,std,four,wagon,fwd,front,94.5,170.2,63.8,53.5,2037,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7999
+99,2,nissan clipper,gas,std,two,hardtop,fwd,front,95.1,162.4,63.8,53.3,2008,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,8249
+100,0,nissan rogue,gas,std,four,hatchback,fwd,front,97.2,173.4,65.2,54.7,2324,ohc,four,120,2bbl,3.33,3.47,8.5,97,5200,27,34,8949
+101,0,nissan nv200,gas,std,four,sedan,fwd,front,97.2,173.4,65.2,54.7,2302,ohc,four,120,2bbl,3.33,3.47,8.5,97,5200,27,34,9549
+102,0,nissan dayz,gas,std,four,sedan,fwd,front,100.4,181.7,66.5,55.1,3095,ohcv,six,181,mpfi,3.43,3.27,9,152,5200,17,22,13499
+103,0,nissan fuga,gas,std,four,wagon,fwd,front,100.4,184.6,66.5,56.1,3296,ohcv,six,181,mpfi,3.43,3.27,9,152,5200,17,22,14399
+104,0,nissan otti,gas,std,four,sedan,fwd,front,100.4,184.6,66.5,55.1,3060,ohcv,six,181,mpfi,3.43,3.27,9,152,5200,19,25,13499
+105,3,nissan teana,gas,std,two,hatchback,rwd,front,91.3,170.7,67.9,49.7,3071,ohcv,six,181,mpfi,3.43,3.27,9,160,5200,19,25,17199
+106,3,nissan kicks,gas,turbo,two,hatchback,rwd,front,91.3,170.7,67.9,49.7,3139,ohcv,six,181,mpfi,3.43,3.27,7.8,200,5200,17,23,19699
+107,1,nissan clipper,gas,std,two,hatchback,rwd,front,99.2,178.5,67.9,49.7,3139,ohcv,six,181,mpfi,3.43,3.27,9,160,5200,19,25,18399
+108,0,peugeot 504,gas,std,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3020,l,four,120,mpfi,3.46,3.19,8.4,97,5000,19,24,11900
+109,0,peugeot 304,diesel,turbo,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3197,l,four,152,idi,3.7,3.52,21,95,4150,28,33,13200
+110,0,peugeot 504 (sw),gas,std,four,wagon,rwd,front,114.2,198.9,68.4,58.7,3230,l,four,120,mpfi,3.46,3.19,8.4,97,5000,19,24,12440
+111,0,peugeot 504,diesel,turbo,four,wagon,rwd,front,114.2,198.9,68.4,58.7,3430,l,four,152,idi,3.7,3.52,21,95,4150,25,25,13860
+112,0,peugeot 504,gas,std,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3075,l,four,120,mpfi,3.46,2.19,8.4,95,5000,19,24,15580
+113,0,peugeot 604sl,diesel,turbo,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3252,l,four,152,idi,3.7,3.52,21,95,4150,28,33,16900
+114,0,peugeot 504,gas,std,four,wagon,rwd,front,114.2,198.9,68.4,56.7,3285,l,four,120,mpfi,3.46,2.19,8.4,95,5000,19,24,16695
+115,0,peugeot 505s turbo diesel,diesel,turbo,four,wagon,rwd,front,114.2,198.9,68.4,58.7,3485,l,four,152,idi,3.7,3.52,21,95,4150,25,25,17075
+116,0,peugeot 504,gas,std,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3075,l,four,120,mpfi,3.46,3.19,8.4,97,5000,19,24,16630
+117,0,peugeot 504,diesel,turbo,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3252,l,four,152,idi,3.7,3.52,21,95,4150,28,33,17950
+118,0,peugeot 604sl,gas,turbo,four,sedan,rwd,front,108,186.7,68.3,56,3130,l,four,134,mpfi,3.61,3.21,7,142,5600,18,24,18150
+119,1,plymouth fury iii,gas,std,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,1918,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,37,41,5572
+120,1,plymouth cricket,gas,turbo,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,2128,ohc,four,98,spdi,3.03,3.39,7.6,102,5500,24,30,7957
+121,1,plymouth fury iii,gas,std,four,hatchback,fwd,front,93.7,157.3,63.8,50.6,1967,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6229
+122,1,plymouth satellite custom (sw),gas,std,four,sedan,fwd,front,93.7,167.3,63.8,50.8,1989,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6692
+123,1,plymouth fury gran sedan,gas,std,four,sedan,fwd,front,93.7,167.3,63.8,50.8,2191,ohc,four,98,2bbl,2.97,3.23,9.4,68,5500,31,38,7609
+124,-1,plymouth valiant,gas,std,four,wagon,fwd,front,103.3,174.6,64.6,59.8,2535,ohc,four,122,2bbl,3.35,3.46,8.5,88,5000,24,30,8921
+125,3,plymouth duster,gas,turbo,two,hatchback,rwd,front,95.9,173.2,66.3,50.2,2818,ohc,four,156,spdi,3.59,3.86,7,145,5000,19,24,12764
+126,3,porsche macan,gas,std,two,hatchback,rwd,front,94.5,168.9,68.3,50.2,2778,ohc,four,151,mpfi,3.94,3.11,9.5,143,5500,19,27,22018
+127,3,porcshce panamera,gas,std,two,hardtop,rwd,rear,89.5,168.9,65,51.6,2756,ohcf,six,194,mpfi,3.74,2.9,9.5,207,5900,17,25,32528
+128,3,porsche cayenne,gas,std,two,hardtop,rwd,rear,89.5,168.9,65,51.6,2756,ohcf,six,194,mpfi,3.74,2.9,9.5,207,5900,17,25,34028
+129,3,porsche boxter,gas,std,two,convertible,rwd,rear,89.5,168.9,65,51.6,2800,ohcf,six,194,mpfi,3.74,2.9,9.5,207,5900,17,25,37028
+130,1,porsche cayenne,gas,std,two,hatchback,rwd,front,98.4,175.7,72.3,50.5,3366,dohcv,eight,203,mpfi,3.94,3.11,10,288,5750,17,28,31400.5
+131,0,renault 12tl,gas,std,four,wagon,fwd,front,96.1,181.5,66.5,55.2,2579,ohc,four,132,mpfi,3.46,3.9,8.7,90,5100,23,31,9295
+132,2,renault 5 gtl,gas,std,two,hatchback,fwd,front,96.1,176.8,66.6,50.5,2460,ohc,four,132,mpfi,3.46,3.9,8.7,90,5100,23,31,9895
+133,3,saab 99e,gas,std,two,hatchback,fwd,front,99.1,186.6,66.5,56.1,2658,ohc,four,121,mpfi,3.54,3.07,9.31,110,5250,21,28,11850
+134,2,saab 99le,gas,std,four,sedan,fwd,front,99.1,186.6,66.5,56.1,2695,ohc,four,121,mpfi,3.54,3.07,9.3,110,5250,21,28,12170
+135,3,saab 99le,gas,std,two,hatchback,fwd,front,99.1,186.6,66.5,56.1,2707,ohc,four,121,mpfi,2.54,2.07,9.3,110,5250,21,28,15040
+136,2,saab 99gle,gas,std,four,sedan,fwd,front,99.1,186.6,66.5,56.1,2758,ohc,four,121,mpfi,3.54,3.07,9.3,110,5250,21,28,15510
+137,3,saab 99gle,gas,turbo,two,hatchback,fwd,front,99.1,186.6,66.5,56.1,2808,dohc,four,121,mpfi,3.54,3.07,9,160,5500,19,26,18150
+138,2,saab 99e,gas,turbo,four,sedan,fwd,front,99.1,186.6,66.5,56.1,2847,dohc,four,121,mpfi,3.54,3.07,9,160,5500,19,26,18620
+139,2,subaru,gas,std,two,hatchback,fwd,front,93.7,156.9,63.4,53.7,2050,ohcf,four,97,2bbl,3.62,2.36,9,69,4900,31,36,5118
+140,2,subaru dl,gas,std,two,hatchback,fwd,front,93.7,157.9,63.6,53.7,2120,ohcf,four,108,2bbl,3.62,2.64,8.7,73,4400,26,31,7053
+141,2,subaru dl,gas,std,two,hatchback,4wd,front,93.3,157.3,63.8,55.7,2240,ohcf,four,108,2bbl,3.62,2.64,8.7,73,4400,26,31,7603
+142,0,subaru,gas,std,four,sedan,fwd,front,97.2,172,65.4,52.5,2145,ohcf,four,108,2bbl,3.62,2.64,9.5,82,4800,32,37,7126
+143,0,subaru brz,gas,std,four,sedan,fwd,front,97.2,172,65.4,52.5,2190,ohcf,four,108,2bbl,3.62,2.64,9.5,82,4400,28,33,7775
+144,0,subaru baja,gas,std,four,sedan,fwd,front,97.2,172,65.4,52.5,2340,ohcf,four,108,mpfi,3.62,2.64,9,94,5200,26,32,9960
+145,0,subaru r1,gas,std,four,sedan,4wd,front,97,172,65.4,54.3,2385,ohcf,four,108,2bbl,3.62,2.64,9,82,4800,24,25,9233
+146,0,subaru r2,gas,turbo,four,sedan,4wd,front,97,172,65.4,54.3,2510,ohcf,four,108,mpfi,3.62,2.64,7.7,111,4800,24,29,11259
+147,0,subaru trezia,gas,std,four,wagon,fwd,front,97,173.5,65.4,53,2290,ohcf,four,108,2bbl,3.62,2.64,9,82,4800,28,32,7463
+148,0,subaru tribeca,gas,std,four,wagon,fwd,front,97,173.5,65.4,53,2455,ohcf,four,108,mpfi,3.62,2.64,9,94,5200,25,31,10198
+149,0,subaru dl,gas,std,four,wagon,4wd,front,96.9,173.6,65.4,54.9,2420,ohcf,four,108,2bbl,3.62,2.64,9,82,4800,23,29,8013
+150,0,subaru dl,gas,turbo,four,wagon,4wd,front,96.9,173.6,65.4,54.9,2650,ohcf,four,108,mpfi,3.62,2.64,7.7,111,4800,23,23,11694
+151,1,toyota corona mark ii,gas,std,two,hatchback,fwd,front,95.7,158.7,63.6,54.5,1985,ohc,four,92,2bbl,3.05,3.03,9,62,4800,35,39,5348
+152,1,toyota corona,gas,std,two,hatchback,fwd,front,95.7,158.7,63.6,54.5,2040,ohc,four,92,2bbl,3.05,3.03,9,62,4800,31,38,6338
+153,1,toyota corolla 1200,gas,std,four,hatchback,fwd,front,95.7,158.7,63.6,54.5,2015,ohc,four,92,2bbl,3.05,3.03,9,62,4800,31,38,6488
+154,0,toyota corona hardtop,gas,std,four,wagon,fwd,front,95.7,169.7,63.6,59.1,2280,ohc,four,92,2bbl,3.05,3.03,9,62,4800,31,37,6918
+155,0,toyota corolla 1600 (sw),gas,std,four,wagon,4wd,front,95.7,169.7,63.6,59.1,2290,ohc,four,92,2bbl,3.05,3.03,9,62,4800,27,32,7898
+156,0,toyota carina,gas,std,four,wagon,4wd,front,95.7,169.7,63.6,59.1,3110,ohc,four,92,2bbl,3.05,3.03,9,62,4800,27,32,8778
+157,0,toyota mark ii,gas,std,four,sedan,fwd,front,95.7,166.3,64.4,53,2081,ohc,four,98,2bbl,3.19,3.03,9,70,4800,30,37,6938
+158,0,toyota corolla 1200,gas,std,four,hatchback,fwd,front,95.7,166.3,64.4,52.8,2109,ohc,four,98,2bbl,3.19,3.03,9,70,4800,30,37,7198
+159,0,toyota corona,diesel,std,four,sedan,fwd,front,95.7,166.3,64.4,53,2275,ohc,four,110,idi,3.27,3.35,22.5,56,4500,34,36,7898
+160,0,toyota corolla,diesel,std,four,hatchback,fwd,front,95.7,166.3,64.4,52.8,2275,ohc,four,110,idi,3.27,3.35,22.5,56,4500,38,47,7788
+161,0,toyota corona,gas,std,four,sedan,fwd,front,95.7,166.3,64.4,53,2094,ohc,four,98,2bbl,3.19,3.03,9,70,4800,38,47,7738
+162,0,toyota corolla,gas,std,four,hatchback,fwd,front,95.7,166.3,64.4,52.8,2122,ohc,four,98,2bbl,3.19,3.03,9,70,4800,28,34,8358
+163,0,toyota mark ii,gas,std,four,sedan,fwd,front,95.7,166.3,64.4,52.8,2140,ohc,four,98,2bbl,3.19,3.03,9,70,4800,28,34,9258
+164,1,toyota corolla liftback,gas,std,two,sedan,rwd,front,94.5,168.7,64,52.6,2169,ohc,four,98,2bbl,3.19,3.03,9,70,4800,29,34,8058
+165,1,toyota corona,gas,std,two,hatchback,rwd,front,94.5,168.7,64,52.6,2204,ohc,four,98,2bbl,3.19,3.03,9,70,4800,29,34,8238
+166,1,toyota celica gt liftback,gas,std,two,sedan,rwd,front,94.5,168.7,64,52.6,2265,dohc,four,98,mpfi,3.24,3.08,9.4,112,6600,26,29,9298
+167,1,toyota corolla tercel,gas,std,two,hatchback,rwd,front,94.5,168.7,64,52.6,2300,dohc,four,98,mpfi,3.24,3.08,9.4,112,6600,26,29,9538
+168,2,toyota corona liftback,gas,std,two,hardtop,rwd,front,98.4,176.2,65.6,52,2540,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,8449
+169,2,toyota corolla,gas,std,two,hardtop,rwd,front,98.4,176.2,65.6,52,2536,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,9639
+170,2,toyota starlet,gas,std,two,hatchback,rwd,front,98.4,176.2,65.6,52,2551,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,9989
+171,2,toyota tercel,gas,std,two,hardtop,rwd,front,98.4,176.2,65.6,52,2679,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,11199
+172,2,toyota corolla,gas,std,two,hatchback,rwd,front,98.4,176.2,65.6,52,2714,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,11549
+173,2,toyota cressida,gas,std,two,convertible,rwd,front,98.4,176.2,65.6,53,2975,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,17669
+174,-1,toyota corolla,gas,std,four,sedan,fwd,front,102.4,175.6,66.5,54.9,2326,ohc,four,122,mpfi,3.31,3.54,8.7,92,4200,29,34,8948
+175,-1,toyota celica gt,diesel,turbo,four,sedan,fwd,front,102.4,175.6,66.5,54.9,2480,ohc,four,110,idi,3.27,3.35,22.5,73,4500,30,33,10698
+176,-1,toyota corona,gas,std,four,hatchback,fwd,front,102.4,175.6,66.5,53.9,2414,ohc,four,122,mpfi,3.31,3.54,8.7,92,4200,27,32,9988
+177,-1,toyota corolla,gas,std,four,sedan,fwd,front,102.4,175.6,66.5,54.9,2414,ohc,four,122,mpfi,3.31,3.54,8.7,92,4200,27,32,10898
+178,-1,toyota mark ii,gas,std,four,hatchback,fwd,front,102.4,175.6,66.5,53.9,2458,ohc,four,122,mpfi,3.31,3.54,8.7,92,4200,27,32,11248
+179,3,toyota corolla liftback,gas,std,two,hatchback,rwd,front,102.9,183.5,67.7,52,2976,dohc,six,171,mpfi,3.27,3.35,9.3,161,5200,20,24,16558
+180,3,toyota corona,gas,std,two,hatchback,rwd,front,102.9,183.5,67.7,52,3016,dohc,six,171,mpfi,3.27,3.35,9.3,161,5200,19,24,15998
+181,-1,toyota starlet,gas,std,four,sedan,rwd,front,104.5,187.8,66.5,54.1,3131,dohc,six,171,mpfi,3.27,3.35,9.2,156,5200,20,24,15690
+182,-1,toyouta tercel,gas,std,four,wagon,rwd,front,104.5,187.8,66.5,54.1,3151,dohc,six,161,mpfi,3.27,3.35,9.2,156,5200,19,24,15750
+183,2,vokswagen rabbit,diesel,std,two,sedan,fwd,front,97.3,171.7,65.5,55.7,2261,ohc,four,97,idi,3.01,3.4,23,52,4800,37,46,7775
+184,2,volkswagen 1131 deluxe sedan,gas,std,two,sedan,fwd,front,97.3,171.7,65.5,55.7,2209,ohc,four,109,mpfi,3.19,3.4,9,85,5250,27,34,7975
+185,2,volkswagen model 111,diesel,std,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2264,ohc,four,97,idi,3.01,3.4,23,52,4800,37,46,7995
+186,2,volkswagen type 3,gas,std,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2212,ohc,four,109,mpfi,3.19,3.4,9,85,5250,27,34,8195
+187,2,volkswagen 411 (sw),gas,std,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2275,ohc,four,109,mpfi,3.19,3.4,9,85,5250,27,34,8495
+188,2,volkswagen super beetle,diesel,turbo,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2319,ohc,four,97,idi,3.01,3.4,23,68,4500,37,42,9495
+189,2,volkswagen dasher,gas,std,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2300,ohc,four,109,mpfi,3.19,3.4,10,100,5500,26,32,9995
+190,3,vw dasher,gas,std,two,convertible,fwd,front,94.5,159.3,64.2,55.6,2254,ohc,four,109,mpfi,3.19,3.4,8.5,90,5500,24,29,11595
+191,3,vw rabbit,gas,std,two,hatchback,fwd,front,94.5,165.7,64,51.4,2221,ohc,four,109,mpfi,3.19,3.4,8.5,90,5500,24,29,9980
+192,0,volkswagen rabbit,gas,std,four,sedan,fwd,front,100.4,180.2,66.9,55.1,2661,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,19,24,13295
+193,0,volkswagen rabbit custom,diesel,turbo,four,sedan,fwd,front,100.4,180.2,66.9,55.1,2579,ohc,four,97,idi,3.01,3.4,23,68,4500,33,38,13845
+194,0,volkswagen dasher,gas,std,four,wagon,fwd,front,100.4,183.1,66.9,55.1,2563,ohc,four,109,mpfi,3.19,3.4,9,88,5500,25,31,12290
+195,-2,volvo 145e (sw),gas,std,four,sedan,rwd,front,104.3,188.8,67.2,56.2,2912,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,23,28,12940
+196,-1,volvo 144ea,gas,std,four,wagon,rwd,front,104.3,188.8,67.2,57.5,3034,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,23,28,13415
+197,-2,volvo 244dl,gas,std,four,sedan,rwd,front,104.3,188.8,67.2,56.2,2935,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,24,28,15985
+198,-1,volvo 245,gas,std,four,wagon,rwd,front,104.3,188.8,67.2,57.5,3042,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,24,28,16515
+199,-2,volvo 264gl,gas,turbo,four,sedan,rwd,front,104.3,188.8,67.2,56.2,3045,ohc,four,130,mpfi,3.62,3.15,7.5,162,5100,17,22,18420
+200,-1,volvo diesel,gas,turbo,four,wagon,rwd,front,104.3,188.8,67.2,57.5,3157,ohc,four,130,mpfi,3.62,3.15,7.5,162,5100,17,22,18950
+201,-1,volvo 145e (sw),gas,std,four,sedan,rwd,front,109.1,188.8,68.9,55.5,2952,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,23,28,16845
+202,-1,volvo 144ea,gas,turbo,four,sedan,rwd,front,109.1,188.8,68.8,55.5,3049,ohc,four,141,mpfi,3.78,3.15,8.7,160,5300,19,25,19045
+203,-1,volvo 244dl,gas,std,four,sedan,rwd,front,109.1,188.8,68.9,55.5,3012,ohcv,six,173,mpfi,3.58,2.87,8.8,134,5500,18,23,21485
+204,-1,volvo 246,diesel,turbo,four,sedan,rwd,front,109.1,188.8,68.9,55.5,3217,ohc,six,145,idi,3.01,3.4,23,106,4800,26,27,22470
+205,-1,volvo 264gl,gas,turbo,four,sedan,rwd,front,109.1,188.8,68.9,55.5,3062,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,19,25,22625
diff --git a/assets/cleaned_car_prices.csv b/assets/cleaned_car_prices.csv
new file mode 100644
index 0000000..07002d9
--- /dev/null
+++ b/assets/cleaned_car_prices.csv
@@ -0,0 +1,206 @@
+brand_category,brand,fueltype,aspiration,doornumber,carbody,drivewheel,enginelocation,wheelbase,carlength,carwidth,carheight,curbweight,enginetype,cylindernumber,enginesize,fuelsystem,boreratio,stroke,compressionratio,horsepower,peakrpm,citympg,highwaympg,price
+Mid_Range,alfa-romero,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548,dohc,four,130,mpfi,3.47,2.68,9.0,111,5000,21,27,13495.0
+Mid_Range,alfa-romero,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548,dohc,four,130,mpfi,3.47,2.68,9.0,111,5000,21,27,16500.0
+Mid_Range,alfa-romero,gas,std,two,hatchback,rwd,front,94.5,171.2,65.5,52.4,2823,ohcv,six,152,mpfi,2.68,3.47,9.0,154,5000,19,26,16500.0
+Mid_Range,audi,gas,std,four,sedan,fwd,front,99.8,176.6,66.2,54.3,2337,ohc,four,109,mpfi,3.19,3.4,10.0,102,5500,24,30,13950.0
+Mid_Range,audi,gas,std,four,sedan,4wd,front,99.4,176.6,66.4,54.3,2824,ohc,five,136,mpfi,3.19,3.4,8.0,115,5500,18,22,17450.0
+Mid_Range,audi,gas,std,two,sedan,fwd,front,99.8,177.3,66.3,53.1,2507,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,19,25,15250.0
+Mid_Range,audi,gas,std,four,sedan,fwd,front,105.8,192.7,71.4,55.7,2844,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,19,25,17710.0
+Mid_Range,audi,gas,std,four,wagon,fwd,front,105.8,192.7,71.4,55.7,2954,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,19,25,18920.0
+Mid_Range,audi,gas,turbo,four,sedan,fwd,front,105.8,192.7,71.4,55.9,3086,ohc,five,131,mpfi,3.13,3.4,8.3,140,5500,17,20,23875.0
+Mid_Range,audi,gas,turbo,two,hatchback,4wd,front,99.5,178.2,67.9,52.0,3053,ohc,five,131,mpfi,3.13,3.4,7.0,160,5500,16,22,17859.167
+Luxury,bmw,gas,std,two,sedan,rwd,front,101.2,176.8,64.8,54.3,2395,ohc,four,108,mpfi,3.5,2.8,8.8,101,5800,23,29,16430.0
+Luxury,bmw,gas,std,four,sedan,rwd,front,101.2,176.8,64.8,54.3,2395,ohc,four,108,mpfi,3.5,2.8,8.8,101,5800,23,29,16925.0
+Luxury,bmw,gas,std,two,sedan,rwd,front,101.2,176.8,64.8,54.3,2710,ohc,six,164,mpfi,3.31,3.19,9.0,121,4250,21,28,20970.0
+Luxury,bmw,gas,std,four,sedan,rwd,front,101.2,176.8,64.8,54.3,2765,ohc,six,164,mpfi,3.31,3.19,9.0,121,4250,21,28,21105.0
+Luxury,bmw,gas,std,four,sedan,rwd,front,103.5,189.0,66.9,55.7,3055,ohc,six,164,mpfi,3.31,3.19,9.0,121,4250,20,25,24565.0
+Luxury,bmw,gas,std,four,sedan,rwd,front,103.5,189.0,66.9,55.7,3230,ohc,six,209,mpfi,3.62,3.39,8.0,182,5400,16,22,30760.0
+Luxury,bmw,gas,std,two,sedan,rwd,front,103.5,193.8,67.9,53.7,3380,ohc,six,209,mpfi,3.62,3.39,8.0,182,5400,16,22,41315.0
+Luxury,bmw,gas,std,four,sedan,rwd,front,110.0,197.0,70.9,56.3,3505,ohc,six,209,mpfi,3.62,3.39,8.0,182,5400,15,20,36880.0
+Budget,chevrolet,gas,std,two,hatchback,fwd,front,88.4,141.1,60.3,53.2,1488,l,three,61,2bbl,2.91,3.03,9.5,48,5100,47,53,5151.0
+Budget,chevrolet,gas,std,two,hatchback,fwd,front,94.5,155.9,63.6,52.0,1874,ohc,four,90,2bbl,3.03,3.11,9.6,70,5400,38,43,6295.0
+Budget,chevrolet,gas,std,four,sedan,fwd,front,94.5,158.8,63.6,52.0,1909,ohc,four,90,2bbl,3.03,3.11,9.6,70,5400,38,43,6575.0
+Budget,dodge,gas,std,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,1876,ohc,four,90,2bbl,2.97,3.23,9.41,68,5500,37,41,5572.0
+Budget,dodge,gas,std,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,1876,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6377.0
+Budget,dodge,gas,turbo,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,2128,ohc,four,98,mpfi,3.03,3.39,7.6,102,5500,24,30,7957.0
+Budget,dodge,gas,std,four,hatchback,fwd,front,93.7,157.3,63.8,50.6,1967,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6229.0
+Budget,dodge,gas,std,four,sedan,fwd,front,93.7,157.3,63.8,50.6,1989,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6692.0
+Budget,dodge,gas,std,four,sedan,fwd,front,93.7,157.3,63.8,50.6,1989,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,7609.0
+Budget,dodge,gas,turbo,two,sedan,fwd,front,93.7,157.3,63.8,50.6,2191,ohc,four,98,mpfi,3.03,3.39,7.6,102,5500,24,30,8558.0
+Budget,dodge,gas,std,four,wagon,fwd,front,103.3,174.6,64.6,59.8,2535,ohc,four,122,2bbl,3.34,3.46,8.5,88,5000,24,30,8921.0
+Budget,dodge,gas,turbo,two,hatchback,fwd,front,95.9,173.2,66.3,50.2,2811,ohc,four,156,mfi,3.6,3.9,7.0,145,5000,19,24,12964.0
+Budget,honda,gas,std,two,hatchback,fwd,front,86.6,144.6,63.9,50.8,1713,ohc,four,92,1bbl,2.91,3.41,9.6,58,4800,49,54,6479.0
+Budget,honda,gas,std,two,hatchback,fwd,front,86.6,144.6,63.9,50.8,1819,ohc,four,92,1bbl,2.91,3.41,9.2,76,6000,31,38,6855.0
+Budget,honda,gas,std,two,hatchback,fwd,front,93.7,150.0,64.0,52.6,1837,ohc,four,79,1bbl,2.91,3.07,10.1,60,5500,38,42,5399.0
+Budget,honda,gas,std,two,hatchback,fwd,front,93.7,150.0,64.0,52.6,1940,ohc,four,92,1bbl,2.91,3.41,9.2,76,6000,30,34,6529.0
+Budget,honda,gas,std,two,hatchback,fwd,front,93.7,150.0,64.0,52.6,1956,ohc,four,92,1bbl,2.91,3.41,9.2,76,6000,30,34,7129.0
+Budget,honda,gas,std,four,sedan,fwd,front,96.5,163.4,64.0,54.5,2010,ohc,four,92,1bbl,2.91,3.41,9.2,76,6000,30,34,7295.0
+Budget,honda,gas,std,four,wagon,fwd,front,96.5,157.1,63.9,58.3,2024,ohc,four,92,1bbl,2.92,3.41,9.2,76,6000,30,34,7295.0
+Budget,honda,gas,std,two,hatchback,fwd,front,96.5,167.5,65.2,53.3,2236,ohc,four,110,1bbl,3.15,3.58,9.0,86,5800,27,33,7895.0
+Budget,honda,gas,std,two,hatchback,fwd,front,96.5,167.5,65.2,53.3,2289,ohc,four,110,1bbl,3.15,3.58,9.0,86,5800,27,33,9095.0
+Budget,honda,gas,std,four,sedan,fwd,front,96.5,175.4,65.2,54.1,2304,ohc,four,110,1bbl,3.15,3.58,9.0,86,5800,27,33,8845.0
+Budget,honda,gas,std,four,sedan,fwd,front,96.5,175.4,62.5,54.1,2372,ohc,four,110,1bbl,3.15,3.58,9.0,86,5800,27,33,10295.0
+Budget,honda,gas,std,four,sedan,fwd,front,96.5,175.4,65.2,54.1,2465,ohc,four,110,mpfi,3.15,3.58,9.0,101,5800,24,28,12945.0
+Budget,honda,gas,std,two,sedan,fwd,front,96.5,169.1,66.0,51.0,2293,ohc,four,110,2bbl,3.15,3.58,9.1,100,5500,25,31,10345.0
+Budget,isuzu,gas,std,four,sedan,rwd,front,94.3,170.7,61.8,53.5,2337,ohc,four,111,2bbl,3.31,3.23,8.5,78,4800,24,29,6785.0
+Budget,isuzu,gas,std,two,sedan,fwd,front,94.5,155.9,63.6,52.0,1874,ohc,four,90,2bbl,3.03,3.11,9.6,70,5400,38,43,8916.5
+Budget,isuzu,gas,std,four,sedan,fwd,front,94.5,155.9,63.6,52.0,1909,ohc,four,90,2bbl,3.03,3.11,9.6,70,5400,38,43,8916.5
+Budget,isuzu,gas,std,two,hatchback,rwd,front,96.0,172.6,65.2,51.4,2734,ohc,four,119,spfi,3.43,3.23,9.2,90,5000,24,29,11048.0
+Luxury,jaguar,gas,std,four,sedan,rwd,front,113.0,199.6,69.6,52.8,4066,dohc,six,258,mpfi,3.63,4.17,8.1,176,4750,15,19,32250.0
+Luxury,jaguar,gas,std,four,sedan,rwd,front,113.0,199.6,69.6,52.8,4066,dohc,six,258,mpfi,3.63,4.17,8.1,176,4750,15,19,35550.0
+Luxury,jaguar,gas,std,two,sedan,rwd,front,102.0,191.7,70.6,47.8,3950,ohcv,twelve,326,mpfi,3.54,2.76,11.5,262,5000,13,17,36000.0
+Mid_Range,mazda,gas,std,two,hatchback,fwd,front,93.1,159.1,64.2,54.1,1890,ohc,four,91,2bbl,3.03,3.15,9.0,68,5000,30,31,5195.0
+Mid_Range,mazda,gas,std,two,hatchback,fwd,front,93.1,159.1,64.2,54.1,1900,ohc,four,91,2bbl,3.03,3.15,9.0,68,5000,31,38,6095.0
+Mid_Range,mazda,gas,std,two,hatchback,fwd,front,93.1,159.1,64.2,54.1,1905,ohc,four,91,2bbl,3.03,3.15,9.0,68,5000,31,38,6795.0
+Mid_Range,mazda,gas,std,four,sedan,fwd,front,93.1,166.8,64.2,54.1,1945,ohc,four,91,2bbl,3.03,3.15,9.0,68,5000,31,38,6695.0
+Mid_Range,mazda,gas,std,four,sedan,fwd,front,93.1,166.8,64.2,54.1,1950,ohc,four,91,2bbl,3.08,3.15,9.0,68,5000,31,38,7395.0
+Mid_Range,mazda,gas,std,two,hatchback,rwd,front,95.3,169.0,65.7,49.6,2380,rotor,two,70,4bbl,3.33,3.255,9.4,101,6000,17,23,10945.0
+Mid_Range,mazda,gas,std,two,hatchback,rwd,front,95.3,169.0,65.7,49.6,2380,rotor,two,70,4bbl,3.33,3.255,9.4,101,6000,17,23,11845.0
+Mid_Range,mazda,gas,std,two,hatchback,rwd,front,95.3,169.0,65.7,49.6,2385,rotor,two,70,4bbl,3.33,3.255,9.4,101,6000,17,23,13645.0
+Mid_Range,mazda,gas,std,two,hatchback,rwd,front,95.3,169.0,65.7,49.6,2500,rotor,two,80,mpfi,3.33,3.255,9.4,135,6000,16,23,15645.0
+Mid_Range,mazda,gas,std,two,hatchback,fwd,front,98.8,177.8,66.5,53.7,2385,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,8845.0
+Mid_Range,mazda,gas,std,four,sedan,fwd,front,98.8,177.8,66.5,55.5,2410,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,8495.0
+Mid_Range,mazda,gas,std,two,hatchback,fwd,front,98.8,177.8,66.5,53.7,2385,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,10595.0
+Mid_Range,mazda,gas,std,four,sedan,fwd,front,98.8,177.8,66.5,55.5,2410,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,10245.0
+Mid_Range,mazda,diesel,std,four,sedan,fwd,front,98.8,177.8,66.5,55.5,2443,ohc,four,122,idi,3.39,3.39,22.7,64,4650,36,42,10795.0
+Mid_Range,mazda,gas,std,four,hatchback,fwd,front,98.8,177.8,66.5,55.5,2425,ohc,four,122,2bbl,3.39,3.39,8.6,84,4800,26,32,11245.0
+Mid_Range,mazda,gas,std,four,sedan,rwd,front,104.9,175.0,66.1,54.4,2670,ohc,four,140,mpfi,3.76,3.16,8.0,120,5000,19,27,18280.0
+Mid_Range,mazda,diesel,std,four,sedan,rwd,front,104.9,175.0,66.1,54.4,2700,ohc,four,134,idi,3.43,3.64,22.0,72,4200,31,39,18344.0
+Luxury,buick,diesel,turbo,four,sedan,rwd,front,110.0,190.9,70.3,56.5,3515,ohc,five,183,idi,3.58,3.64,21.5,123,4350,22,25,25552.0
+Luxury,buick,diesel,turbo,four,wagon,rwd,front,110.0,190.9,70.3,58.7,3750,ohc,five,183,idi,3.58,3.64,21.5,123,4350,22,25,28248.0
+Luxury,buick,diesel,turbo,two,hardtop,rwd,front,106.7,187.5,70.3,54.9,3495,ohc,five,183,idi,3.58,3.64,21.5,123,4350,22,25,28176.0
+Luxury,buick,diesel,turbo,four,sedan,rwd,front,115.6,202.6,71.7,56.3,3770,ohc,five,183,idi,3.58,3.64,21.5,123,4350,22,25,31600.0
+Luxury,buick,gas,std,four,sedan,rwd,front,115.6,202.6,71.7,56.5,3740,ohcv,eight,234,mpfi,3.46,3.1,8.3,155,4750,16,18,34184.0
+Luxury,buick,gas,std,two,convertible,rwd,front,96.6,180.3,70.5,50.8,3685,ohcv,eight,234,mpfi,3.46,3.1,8.3,155,4750,16,18,35056.0
+Luxury,buick,gas,std,four,sedan,rwd,front,120.9,208.1,71.7,56.7,3900,ohcv,eight,308,mpfi,3.8,3.35,8.0,184,4500,14,16,40960.0
+Luxury,buick,gas,std,two,hardtop,rwd,front,112.0,199.2,72.0,55.4,3715,ohcv,eight,304,mpfi,3.8,3.35,8.0,184,4500,14,16,45400.0
+Mid_Range,mercury,gas,turbo,two,hatchback,rwd,front,102.7,178.4,68.0,54.8,2910,ohc,four,140,mpfi,3.78,3.12,8.0,175,5000,19,24,16503.0
+Budget,mitsubishi,gas,std,two,hatchback,fwd,front,93.7,157.3,64.4,50.8,1918,ohc,four,92,2bbl,2.97,3.23,9.4,68,5500,37,41,5389.0
+Budget,mitsubishi,gas,std,two,hatchback,fwd,front,93.7,157.3,64.4,50.8,1944,ohc,four,92,2bbl,2.97,3.23,9.4,68,5500,31,38,6189.0
+Budget,mitsubishi,gas,std,two,hatchback,fwd,front,93.7,157.3,64.4,50.8,2004,ohc,four,92,2bbl,2.97,3.23,9.4,68,5500,31,38,6669.0
+Budget,mitsubishi,gas,turbo,two,hatchback,fwd,front,93.0,157.3,63.8,50.8,2145,ohc,four,98,spdi,3.03,3.39,7.6,102,5500,24,30,7689.0
+Budget,mitsubishi,gas,turbo,two,hatchback,fwd,front,96.3,173.0,65.4,49.4,2370,ohc,four,110,spdi,3.17,3.46,7.5,116,5500,23,30,9959.0
+Budget,mitsubishi,gas,std,two,hatchback,fwd,front,96.3,173.0,65.4,49.4,2328,ohc,four,122,2bbl,3.35,3.46,8.5,88,5000,25,32,8499.0
+Budget,mitsubishi,gas,turbo,two,hatchback,fwd,front,95.9,173.2,66.3,50.2,2833,ohc,four,156,spdi,3.58,3.86,7.0,145,5000,19,24,12629.0
+Budget,mitsubishi,gas,turbo,two,hatchback,fwd,front,95.9,173.2,66.3,50.2,2921,ohc,four,156,spdi,3.59,3.86,7.0,145,5000,19,24,14869.0
+Budget,mitsubishi,gas,turbo,two,hatchback,fwd,front,95.9,173.2,66.3,50.2,2926,ohc,four,156,spdi,3.59,3.86,7.0,145,5000,19,24,14489.0
+Budget,mitsubishi,gas,std,four,sedan,fwd,front,96.3,172.4,65.4,51.6,2365,ohc,four,122,2bbl,3.35,3.46,8.5,88,5000,25,32,6989.0
+Budget,mitsubishi,gas,std,four,sedan,fwd,front,96.3,172.4,65.4,51.6,2405,ohc,four,122,2bbl,3.35,3.46,8.5,88,5000,25,32,8189.0
+Budget,mitsubishi,gas,turbo,four,sedan,fwd,front,96.3,172.4,65.4,51.6,2403,ohc,four,110,spdi,3.17,3.46,7.5,116,5500,23,30,9279.0
+Budget,mitsubishi,gas,std,four,sedan,fwd,front,96.3,172.4,65.4,51.6,2403,ohc,four,110,spdi,3.17,3.46,7.5,116,5500,23,30,9279.0
+Mid_Range,nissan,gas,std,two,sedan,fwd,front,94.5,165.3,63.8,54.5,1889,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,5499.0
+Mid_Range,nissan,diesel,std,two,sedan,fwd,front,94.5,165.3,63.8,54.5,2017,ohc,four,103,idi,2.99,3.47,21.9,55,4800,45,50,7099.0
+Mid_Range,nissan,gas,std,two,sedan,fwd,front,94.5,165.3,63.8,54.5,1918,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,6649.0
+Mid_Range,nissan,gas,std,four,sedan,fwd,front,94.5,165.3,63.8,54.5,1938,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,6849.0
+Mid_Range,nissan,gas,std,four,wagon,fwd,front,94.5,170.2,63.8,53.5,2024,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7349.0
+Mid_Range,nissan,gas,std,two,sedan,fwd,front,94.5,165.3,63.8,54.5,1951,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7299.0
+Mid_Range,nissan,gas,std,two,hatchback,fwd,front,94.5,165.6,63.8,53.3,2028,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7799.0
+Mid_Range,nissan,gas,std,four,sedan,fwd,front,94.5,165.3,63.8,54.5,1971,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7499.0
+Mid_Range,nissan,gas,std,four,wagon,fwd,front,94.5,170.2,63.8,53.5,2037,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,7999.0
+Mid_Range,nissan,gas,std,two,hardtop,fwd,front,95.1,162.4,63.8,53.3,2008,ohc,four,97,2bbl,3.15,3.29,9.4,69,5200,31,37,8249.0
+Mid_Range,nissan,gas,std,four,hatchback,fwd,front,97.2,173.4,65.2,54.7,2324,ohc,four,120,2bbl,3.33,3.47,8.5,97,5200,27,34,8949.0
+Mid_Range,nissan,gas,std,four,sedan,fwd,front,97.2,173.4,65.2,54.7,2302,ohc,four,120,2bbl,3.33,3.47,8.5,97,5200,27,34,9549.0
+Mid_Range,nissan,gas,std,four,sedan,fwd,front,100.4,181.7,66.5,55.1,3095,ohcv,six,181,mpfi,3.43,3.27,9.0,152,5200,17,22,13499.0
+Mid_Range,nissan,gas,std,four,wagon,fwd,front,100.4,184.6,66.5,56.1,3296,ohcv,six,181,mpfi,3.43,3.27,9.0,152,5200,17,22,14399.0
+Mid_Range,nissan,gas,std,four,sedan,fwd,front,100.4,184.6,66.5,55.1,3060,ohcv,six,181,mpfi,3.43,3.27,9.0,152,5200,19,25,13499.0
+Mid_Range,nissan,gas,std,two,hatchback,rwd,front,91.3,170.7,67.9,49.7,3071,ohcv,six,181,mpfi,3.43,3.27,9.0,160,5200,19,25,17199.0
+Mid_Range,nissan,gas,turbo,two,hatchback,rwd,front,91.3,170.7,67.9,49.7,3139,ohcv,six,181,mpfi,3.43,3.27,7.8,200,5200,17,23,19699.0
+Mid_Range,nissan,gas,std,two,hatchback,rwd,front,99.2,178.5,67.9,49.7,3139,ohcv,six,181,mpfi,3.43,3.27,9.0,160,5200,19,25,18399.0
+Mid_Range,peugeot,gas,std,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3020,l,four,120,mpfi,3.46,3.19,8.4,97,5000,19,24,11900.0
+Mid_Range,peugeot,diesel,turbo,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3197,l,four,152,idi,3.7,3.52,21.0,95,4150,28,33,13200.0
+Mid_Range,peugeot,gas,std,four,wagon,rwd,front,114.2,198.9,68.4,58.7,3230,l,four,120,mpfi,3.46,3.19,8.4,97,5000,19,24,12440.0
+Mid_Range,peugeot,diesel,turbo,four,wagon,rwd,front,114.2,198.9,68.4,58.7,3430,l,four,152,idi,3.7,3.52,21.0,95,4150,25,25,13860.0
+Mid_Range,peugeot,gas,std,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3075,l,four,120,mpfi,3.46,2.19,8.4,95,5000,19,24,15580.0
+Mid_Range,peugeot,diesel,turbo,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3252,l,four,152,idi,3.7,3.52,21.0,95,4150,28,33,16900.0
+Mid_Range,peugeot,gas,std,four,wagon,rwd,front,114.2,198.9,68.4,56.7,3285,l,four,120,mpfi,3.46,2.19,8.4,95,5000,19,24,16695.0
+Mid_Range,peugeot,diesel,turbo,four,wagon,rwd,front,114.2,198.9,68.4,58.7,3485,l,four,152,idi,3.7,3.52,21.0,95,4150,25,25,17075.0
+Mid_Range,peugeot,gas,std,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3075,l,four,120,mpfi,3.46,3.19,8.4,97,5000,19,24,16630.0
+Mid_Range,peugeot,diesel,turbo,four,sedan,rwd,front,107.9,186.7,68.4,56.7,3252,l,four,152,idi,3.7,3.52,21.0,95,4150,28,33,17950.0
+Mid_Range,peugeot,gas,turbo,four,sedan,rwd,front,108.0,186.7,68.3,56.0,3130,l,four,134,mpfi,3.61,3.21,7.0,142,5600,18,24,18150.0
+Budget,plymouth,gas,std,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,1918,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,37,41,5572.0
+Budget,plymouth,gas,turbo,two,hatchback,fwd,front,93.7,157.3,63.8,50.8,2128,ohc,four,98,spdi,3.03,3.39,7.6,102,5500,24,30,7957.0
+Budget,plymouth,gas,std,four,hatchback,fwd,front,93.7,157.3,63.8,50.6,1967,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6229.0
+Budget,plymouth,gas,std,four,sedan,fwd,front,93.7,167.3,63.8,50.8,1989,ohc,four,90,2bbl,2.97,3.23,9.4,68,5500,31,38,6692.0
+Budget,plymouth,gas,std,four,sedan,fwd,front,93.7,167.3,63.8,50.8,2191,ohc,four,98,2bbl,2.97,3.23,9.4,68,5500,31,38,7609.0
+Budget,plymouth,gas,std,four,wagon,fwd,front,103.3,174.6,64.6,59.8,2535,ohc,four,122,2bbl,3.35,3.46,8.5,88,5000,24,30,8921.0
+Budget,plymouth,gas,turbo,two,hatchback,rwd,front,95.9,173.2,66.3,50.2,2818,ohc,four,156,spdi,3.59,3.86,7.0,145,5000,19,24,12764.0
+Luxury,porsche,gas,std,two,hatchback,rwd,front,94.5,168.9,68.3,50.2,2778,ohc,four,151,mpfi,3.94,3.11,9.5,143,5500,19,27,22018.0
+Luxury,porsche,gas,std,two,hardtop,rwd,rear,89.5,168.9,65.0,51.6,2756,ohcf,six,194,mpfi,3.74,2.9,9.5,207,5900,17,25,32528.0
+Luxury,porsche,gas,std,two,hardtop,rwd,rear,89.5,168.9,65.0,51.6,2756,ohcf,six,194,mpfi,3.74,2.9,9.5,207,5900,17,25,34028.0
+Luxury,porsche,gas,std,two,convertible,rwd,rear,89.5,168.9,65.0,51.6,2800,ohcf,six,194,mpfi,3.74,2.9,9.5,207,5900,17,25,37028.0
+Luxury,porsche,gas,std,two,hatchback,rwd,front,98.4,175.7,72.3,50.5,3366,dohcv,eight,203,mpfi,3.94,3.11,10.0,288,5750,17,28,31400.5
+Budget,renault,gas,std,four,wagon,fwd,front,96.1,181.5,66.5,55.2,2579,ohc,four,132,mpfi,3.46,3.9,8.7,90,5100,23,31,9295.0
+Budget,renault,gas,std,two,hatchback,fwd,front,96.1,176.8,66.6,50.5,2460,ohc,four,132,mpfi,3.46,3.9,8.7,90,5100,23,31,9895.0
+Mid_Range,saab,gas,std,two,hatchback,fwd,front,99.1,186.6,66.5,56.1,2658,ohc,four,121,mpfi,3.54,3.07,9.31,110,5250,21,28,11850.0
+Mid_Range,saab,gas,std,four,sedan,fwd,front,99.1,186.6,66.5,56.1,2695,ohc,four,121,mpfi,3.54,3.07,9.3,110,5250,21,28,12170.0
+Mid_Range,saab,gas,std,two,hatchback,fwd,front,99.1,186.6,66.5,56.1,2707,ohc,four,121,mpfi,2.54,2.07,9.3,110,5250,21,28,15040.0
+Mid_Range,saab,gas,std,four,sedan,fwd,front,99.1,186.6,66.5,56.1,2758,ohc,four,121,mpfi,3.54,3.07,9.3,110,5250,21,28,15510.0
+Mid_Range,saab,gas,turbo,two,hatchback,fwd,front,99.1,186.6,66.5,56.1,2808,dohc,four,121,mpfi,3.54,3.07,9.0,160,5500,19,26,18150.0
+Mid_Range,saab,gas,turbo,four,sedan,fwd,front,99.1,186.6,66.5,56.1,2847,dohc,four,121,mpfi,3.54,3.07,9.0,160,5500,19,26,18620.0
+Budget,subaru,gas,std,two,hatchback,fwd,front,93.7,156.9,63.4,53.7,2050,ohcf,four,97,2bbl,3.62,2.36,9.0,69,4900,31,36,5118.0
+Budget,subaru,gas,std,two,hatchback,fwd,front,93.7,157.9,63.6,53.7,2120,ohcf,four,108,2bbl,3.62,2.64,8.7,73,4400,26,31,7053.0
+Budget,subaru,gas,std,two,hatchback,4wd,front,93.3,157.3,63.8,55.7,2240,ohcf,four,108,2bbl,3.62,2.64,8.7,73,4400,26,31,7603.0
+Budget,subaru,gas,std,four,sedan,fwd,front,97.2,172.0,65.4,52.5,2145,ohcf,four,108,2bbl,3.62,2.64,9.5,82,4800,32,37,7126.0
+Budget,subaru,gas,std,four,sedan,fwd,front,97.2,172.0,65.4,52.5,2190,ohcf,four,108,2bbl,3.62,2.64,9.5,82,4400,28,33,7775.0
+Budget,subaru,gas,std,four,sedan,fwd,front,97.2,172.0,65.4,52.5,2340,ohcf,four,108,mpfi,3.62,2.64,9.0,94,5200,26,32,9960.0
+Budget,subaru,gas,std,four,sedan,4wd,front,97.0,172.0,65.4,54.3,2385,ohcf,four,108,2bbl,3.62,2.64,9.0,82,4800,24,25,9233.0
+Budget,subaru,gas,turbo,four,sedan,4wd,front,97.0,172.0,65.4,54.3,2510,ohcf,four,108,mpfi,3.62,2.64,7.7,111,4800,24,29,11259.0
+Budget,subaru,gas,std,four,wagon,fwd,front,97.0,173.5,65.4,53.0,2290,ohcf,four,108,2bbl,3.62,2.64,9.0,82,4800,28,32,7463.0
+Budget,subaru,gas,std,four,wagon,fwd,front,97.0,173.5,65.4,53.0,2455,ohcf,four,108,mpfi,3.62,2.64,9.0,94,5200,25,31,10198.0
+Budget,subaru,gas,std,four,wagon,4wd,front,96.9,173.6,65.4,54.9,2420,ohcf,four,108,2bbl,3.62,2.64,9.0,82,4800,23,29,8013.0
+Budget,subaru,gas,turbo,four,wagon,4wd,front,96.9,173.6,65.4,54.9,2650,ohcf,four,108,mpfi,3.62,2.64,7.7,111,4800,23,23,11694.0
+Budget,toyota,gas,std,two,hatchback,fwd,front,95.7,158.7,63.6,54.5,1985,ohc,four,92,2bbl,3.05,3.03,9.0,62,4800,35,39,5348.0
+Budget,toyota,gas,std,two,hatchback,fwd,front,95.7,158.7,63.6,54.5,2040,ohc,four,92,2bbl,3.05,3.03,9.0,62,4800,31,38,6338.0
+Budget,toyota,gas,std,four,hatchback,fwd,front,95.7,158.7,63.6,54.5,2015,ohc,four,92,2bbl,3.05,3.03,9.0,62,4800,31,38,6488.0
+Budget,toyota,gas,std,four,wagon,fwd,front,95.7,169.7,63.6,59.1,2280,ohc,four,92,2bbl,3.05,3.03,9.0,62,4800,31,37,6918.0
+Budget,toyota,gas,std,four,wagon,4wd,front,95.7,169.7,63.6,59.1,2290,ohc,four,92,2bbl,3.05,3.03,9.0,62,4800,27,32,7898.0
+Budget,toyota,gas,std,four,wagon,4wd,front,95.7,169.7,63.6,59.1,3110,ohc,four,92,2bbl,3.05,3.03,9.0,62,4800,27,32,8778.0
+Budget,toyota,gas,std,four,sedan,fwd,front,95.7,166.3,64.4,53.0,2081,ohc,four,98,2bbl,3.19,3.03,9.0,70,4800,30,37,6938.0
+Budget,toyota,gas,std,four,hatchback,fwd,front,95.7,166.3,64.4,52.8,2109,ohc,four,98,2bbl,3.19,3.03,9.0,70,4800,30,37,7198.0
+Budget,toyota,diesel,std,four,sedan,fwd,front,95.7,166.3,64.4,53.0,2275,ohc,four,110,idi,3.27,3.35,22.5,56,4500,34,36,7898.0
+Budget,toyota,diesel,std,four,hatchback,fwd,front,95.7,166.3,64.4,52.8,2275,ohc,four,110,idi,3.27,3.35,22.5,56,4500,38,47,7788.0
+Budget,toyota,gas,std,four,sedan,fwd,front,95.7,166.3,64.4,53.0,2094,ohc,four,98,2bbl,3.19,3.03,9.0,70,4800,38,47,7738.0
+Budget,toyota,gas,std,four,hatchback,fwd,front,95.7,166.3,64.4,52.8,2122,ohc,four,98,2bbl,3.19,3.03,9.0,70,4800,28,34,8358.0
+Budget,toyota,gas,std,four,sedan,fwd,front,95.7,166.3,64.4,52.8,2140,ohc,four,98,2bbl,3.19,3.03,9.0,70,4800,28,34,9258.0
+Budget,toyota,gas,std,two,sedan,rwd,front,94.5,168.7,64.0,52.6,2169,ohc,four,98,2bbl,3.19,3.03,9.0,70,4800,29,34,8058.0
+Budget,toyota,gas,std,two,hatchback,rwd,front,94.5,168.7,64.0,52.6,2204,ohc,four,98,2bbl,3.19,3.03,9.0,70,4800,29,34,8238.0
+Budget,toyota,gas,std,two,sedan,rwd,front,94.5,168.7,64.0,52.6,2265,dohc,four,98,mpfi,3.24,3.08,9.4,112,6600,26,29,9298.0
+Budget,toyota,gas,std,two,hatchback,rwd,front,94.5,168.7,64.0,52.6,2300,dohc,four,98,mpfi,3.24,3.08,9.4,112,6600,26,29,9538.0
+Budget,toyota,gas,std,two,hardtop,rwd,front,98.4,176.2,65.6,52.0,2540,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,8449.0
+Budget,toyota,gas,std,two,hardtop,rwd,front,98.4,176.2,65.6,52.0,2536,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,9639.0
+Budget,toyota,gas,std,two,hatchback,rwd,front,98.4,176.2,65.6,52.0,2551,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,9989.0
+Budget,toyota,gas,std,two,hardtop,rwd,front,98.4,176.2,65.6,52.0,2679,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,11199.0
+Budget,toyota,gas,std,two,hatchback,rwd,front,98.4,176.2,65.6,52.0,2714,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,11549.0
+Budget,toyota,gas,std,two,convertible,rwd,front,98.4,176.2,65.6,53.0,2975,ohc,four,146,mpfi,3.62,3.5,9.3,116,4800,24,30,17669.0
+Budget,toyota,gas,std,four,sedan,fwd,front,102.4,175.6,66.5,54.9,2326,ohc,four,122,mpfi,3.31,3.54,8.7,92,4200,29,34,8948.0
+Budget,toyota,diesel,turbo,four,sedan,fwd,front,102.4,175.6,66.5,54.9,2480,ohc,four,110,idi,3.27,3.35,22.5,73,4500,30,33,10698.0
+Budget,toyota,gas,std,four,hatchback,fwd,front,102.4,175.6,66.5,53.9,2414,ohc,four,122,mpfi,3.31,3.54,8.7,92,4200,27,32,9988.0
+Budget,toyota,gas,std,four,sedan,fwd,front,102.4,175.6,66.5,54.9,2414,ohc,four,122,mpfi,3.31,3.54,8.7,92,4200,27,32,10898.0
+Budget,toyota,gas,std,four,hatchback,fwd,front,102.4,175.6,66.5,53.9,2458,ohc,four,122,mpfi,3.31,3.54,8.7,92,4200,27,32,11248.0
+Budget,toyota,gas,std,two,hatchback,rwd,front,102.9,183.5,67.7,52.0,2976,dohc,six,171,mpfi,3.27,3.35,9.3,161,5200,20,24,16558.0
+Budget,toyota,gas,std,two,hatchback,rwd,front,102.9,183.5,67.7,52.0,3016,dohc,six,171,mpfi,3.27,3.35,9.3,161,5200,19,24,15998.0
+Budget,toyota,gas,std,four,sedan,rwd,front,104.5,187.8,66.5,54.1,3131,dohc,six,171,mpfi,3.27,3.35,9.2,156,5200,20,24,15690.0
+Budget,toyota,gas,std,four,wagon,rwd,front,104.5,187.8,66.5,54.1,3151,dohc,six,161,mpfi,3.27,3.35,9.2,156,5200,19,24,15750.0
+Mid_Range,volkswagen,diesel,std,two,sedan,fwd,front,97.3,171.7,65.5,55.7,2261,ohc,four,97,idi,3.01,3.4,23.0,52,4800,37,46,7775.0
+Mid_Range,volkswagen,gas,std,two,sedan,fwd,front,97.3,171.7,65.5,55.7,2209,ohc,four,109,mpfi,3.19,3.4,9.0,85,5250,27,34,7975.0
+Mid_Range,volkswagen,diesel,std,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2264,ohc,four,97,idi,3.01,3.4,23.0,52,4800,37,46,7995.0
+Mid_Range,volkswagen,gas,std,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2212,ohc,four,109,mpfi,3.19,3.4,9.0,85,5250,27,34,8195.0
+Mid_Range,volkswagen,gas,std,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2275,ohc,four,109,mpfi,3.19,3.4,9.0,85,5250,27,34,8495.0
+Mid_Range,volkswagen,diesel,turbo,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2319,ohc,four,97,idi,3.01,3.4,23.0,68,4500,37,42,9495.0
+Mid_Range,volkswagen,gas,std,four,sedan,fwd,front,97.3,171.7,65.5,55.7,2300,ohc,four,109,mpfi,3.19,3.4,10.0,100,5500,26,32,9995.0
+Mid_Range,volkswagen,gas,std,two,convertible,fwd,front,94.5,159.3,64.2,55.6,2254,ohc,four,109,mpfi,3.19,3.4,8.5,90,5500,24,29,11595.0
+Mid_Range,volkswagen,gas,std,two,hatchback,fwd,front,94.5,165.7,64.0,51.4,2221,ohc,four,109,mpfi,3.19,3.4,8.5,90,5500,24,29,9980.0
+Mid_Range,volkswagen,gas,std,four,sedan,fwd,front,100.4,180.2,66.9,55.1,2661,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,19,24,13295.0
+Mid_Range,volkswagen,diesel,turbo,four,sedan,fwd,front,100.4,180.2,66.9,55.1,2579,ohc,four,97,idi,3.01,3.4,23.0,68,4500,33,38,13845.0
+Mid_Range,volkswagen,gas,std,four,wagon,fwd,front,100.4,183.1,66.9,55.1,2563,ohc,four,109,mpfi,3.19,3.4,9.0,88,5500,25,31,12290.0
+Mid_Range,volvo,gas,std,four,sedan,rwd,front,104.3,188.8,67.2,56.2,2912,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,23,28,12940.0
+Mid_Range,volvo,gas,std,four,wagon,rwd,front,104.3,188.8,67.2,57.5,3034,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,23,28,13415.0
+Mid_Range,volvo,gas,std,four,sedan,rwd,front,104.3,188.8,67.2,56.2,2935,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,24,28,15985.0
+Mid_Range,volvo,gas,std,four,wagon,rwd,front,104.3,188.8,67.2,57.5,3042,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,24,28,16515.0
+Mid_Range,volvo,gas,turbo,four,sedan,rwd,front,104.3,188.8,67.2,56.2,3045,ohc,four,130,mpfi,3.62,3.15,7.5,162,5100,17,22,18420.0
+Mid_Range,volvo,gas,turbo,four,wagon,rwd,front,104.3,188.8,67.2,57.5,3157,ohc,four,130,mpfi,3.62,3.15,7.5,162,5100,17,22,18950.0
+Mid_Range,volvo,gas,std,four,sedan,rwd,front,109.1,188.8,68.9,55.5,2952,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,23,28,16845.0
+Mid_Range,volvo,gas,turbo,four,sedan,rwd,front,109.1,188.8,68.8,55.5,3049,ohc,four,141,mpfi,3.78,3.15,8.7,160,5300,19,25,19045.0
+Mid_Range,volvo,gas,std,four,sedan,rwd,front,109.1,188.8,68.9,55.5,3012,ohcv,six,173,mpfi,3.58,2.87,8.8,134,5500,18,23,21485.0
+Mid_Range,volvo,diesel,turbo,four,sedan,rwd,front,109.1,188.8,68.9,55.5,3217,ohc,six,145,idi,3.01,3.4,23.0,106,4800,26,27,22470.0
+Mid_Range,volvo,gas,turbo,four,sedan,rwd,front,109.1,188.8,68.9,55.5,3062,ohc,four,141,mpfi,3.78,3.15,9.5,114,5400,19,25,22625.0
diff --git a/assets/encoded_car_data.csv b/assets/encoded_car_data.csv
new file mode 100644
index 0000000..cf4a9ac
--- /dev/null
+++ b/assets/encoded_car_data.csv
@@ -0,0 +1,206 @@
+brand_category_Budget,brand_category_Luxury,brand_category_Mid_Range,fueltype_diesel,fueltype_gas,aspiration_std,aspiration_turbo,doornumber_four,doornumber_two,drivewheel_4wd,drivewheel_fwd,drivewheel_rwd,wheelbase,carlength,carwidth,carheight,curbweight,enginetype_dohc,enginetype_dohcv,enginetype_l,enginetype_ohc,enginetype_ohcf,enginetype_ohcv,enginetype_rotor,cylindernumber_eight,cylindernumber_five,cylindernumber_four,cylindernumber_six,cylindernumber_three,cylindernumber_twelve,cylindernumber_two,enginesize,fuelsystem_1bbl,fuelsystem_2bbl,fuelsystem_4bbl,fuelsystem_idi,fuelsystem_mfi,fuelsystem_mpfi,fuelsystem_spdi,fuelsystem_spfi,boreratio,horsepower,citympg,highwaympg,price
+0,0,1,0,1,1,0,0,1,0,0,1,88.6,168.8,64.1,48.8,2548,1,0,0,0,0,0,0,0,0,1,0,0,0,0,130,0,0,0,0,0,1,0,0,3.47,111,21,27,13495.0
+0,0,1,0,1,1,0,0,1,0,0,1,88.6,168.8,64.1,48.8,2548,1,0,0,0,0,0,0,0,0,1,0,0,0,0,130,0,0,0,0,0,1,0,0,3.47,111,21,27,16500.0
+0,0,1,0,1,1,0,0,1,0,0,1,94.5,171.2,65.5,52.4,2823,0,0,0,0,0,1,0,0,0,0,1,0,0,0,152,0,0,0,0,0,1,0,0,2.68,154,19,26,16500.0
+0,0,1,0,1,1,0,1,0,0,1,0,99.8,176.6,66.2,54.3,2337,0,0,0,1,0,0,0,0,0,1,0,0,0,0,109,0,0,0,0,0,1,0,0,3.19,102,24,30,13950.0
+0,0,1,0,1,1,0,1,0,1,0,0,99.4,176.6,66.4,54.3,2824,0,0,0,1,0,0,0,0,1,0,0,0,0,0,136,0,0,0,0,0,1,0,0,3.19,115,18,22,17450.0
+0,0,1,0,1,1,0,0,1,0,1,0,99.8,177.3,66.3,53.1,2507,0,0,0,1,0,0,0,0,1,0,0,0,0,0,136,0,0,0,0,0,1,0,0,3.19,110,19,25,15250.0
+0,0,1,0,1,1,0,1,0,0,1,0,105.8,192.7,71.4,55.7,2844,0,0,0,1,0,0,0,0,1,0,0,0,0,0,136,0,0,0,0,0,1,0,0,3.19,110,19,25,17710.0
+0,0,1,0,1,1,0,1,0,0,1,0,105.8,192.7,71.4,55.7,2954,0,0,0,1,0,0,0,0,1,0,0,0,0,0,136,0,0,0,0,0,1,0,0,3.19,110,19,25,18920.0
+0,0,1,0,1,0,1,1,0,0,1,0,105.8,192.7,71.4,55.9,3086,0,0,0,1,0,0,0,0,1,0,0,0,0,0,131,0,0,0,0,0,1,0,0,3.13,140,17,20,23875.0
+0,0,1,0,1,0,1,0,1,1,0,0,99.5,178.2,67.9,52.0,3053,0,0,0,1,0,0,0,0,1,0,0,0,0,0,131,0,0,0,0,0,1,0,0,3.13,160,16,22,17859.167
+0,1,0,0,1,1,0,0,1,0,0,1,101.2,176.8,64.8,54.3,2395,0,0,0,1,0,0,0,0,0,1,0,0,0,0,108,0,0,0,0,0,1,0,0,3.5,101,23,29,16430.0
+0,1,0,0,1,1,0,1,0,0,0,1,101.2,176.8,64.8,54.3,2395,0,0,0,1,0,0,0,0,0,1,0,0,0,0,108,0,0,0,0,0,1,0,0,3.5,101,23,29,16925.0
+0,1,0,0,1,1,0,0,1,0,0,1,101.2,176.8,64.8,54.3,2710,0,0,0,1,0,0,0,0,0,0,1,0,0,0,164,0,0,0,0,0,1,0,0,3.31,121,21,28,20970.0
+0,1,0,0,1,1,0,1,0,0,0,1,101.2,176.8,64.8,54.3,2765,0,0,0,1,0,0,0,0,0,0,1,0,0,0,164,0,0,0,0,0,1,0,0,3.31,121,21,28,21105.0
+0,1,0,0,1,1,0,1,0,0,0,1,103.5,189.0,66.9,55.7,3055,0,0,0,1,0,0,0,0,0,0,1,0,0,0,164,0,0,0,0,0,1,0,0,3.31,121,20,25,24565.0
+0,1,0,0,1,1,0,1,0,0,0,1,103.5,189.0,66.9,55.7,3230,0,0,0,1,0,0,0,0,0,0,1,0,0,0,209,0,0,0,0,0,1,0,0,3.62,182,16,22,30760.0
+0,1,0,0,1,1,0,0,1,0,0,1,103.5,193.8,67.9,53.7,3380,0,0,0,1,0,0,0,0,0,0,1,0,0,0,209,0,0,0,0,0,1,0,0,3.62,182,16,22,41315.0
+0,1,0,0,1,1,0,1,0,0,0,1,110.0,197.0,70.9,56.3,3505,0,0,0,1,0,0,0,0,0,0,1,0,0,0,209,0,0,0,0,0,1,0,0,3.62,182,15,20,36880.0
+1,0,0,0,1,1,0,0,1,0,1,0,88.4,141.1,60.3,53.2,1488,0,0,1,0,0,0,0,0,0,0,0,1,0,0,61,0,1,0,0,0,0,0,0,2.91,48,47,53,5151.0
+1,0,0,0,1,1,0,0,1,0,1,0,94.5,155.9,63.6,52.0,1874,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,3.03,70,38,43,6295.0
+1,0,0,0,1,1,0,1,0,0,1,0,94.5,158.8,63.6,52.0,1909,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,3.03,70,38,43,6575.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,157.3,63.8,50.8,1876,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,2.97,68,37,41,5572.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,157.3,63.8,50.8,1876,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,2.97,68,31,38,6377.0
+1,0,0,0,1,0,1,0,1,0,1,0,93.7,157.3,63.8,50.8,2128,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,0,0,0,0,1,0,0,3.03,102,24,30,7957.0
+1,0,0,0,1,1,0,1,0,0,1,0,93.7,157.3,63.8,50.6,1967,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,2.97,68,31,38,6229.0
+1,0,0,0,1,1,0,1,0,0,1,0,93.7,157.3,63.8,50.6,1989,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,2.97,68,31,38,6692.0
+1,0,0,0,1,1,0,1,0,0,1,0,93.7,157.3,63.8,50.6,1989,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,2.97,68,31,38,7609.0
+1,0,0,0,1,0,1,0,1,0,1,0,93.7,157.3,63.8,50.6,2191,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,0,0,0,0,1,0,0,3.03,102,24,30,8558.0
+1,0,0,0,1,1,0,1,0,0,1,0,103.3,174.6,64.6,59.8,2535,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.34,88,24,30,8921.0
+1,0,0,0,1,0,1,0,1,0,1,0,95.9,173.2,66.3,50.2,2811,0,0,0,1,0,0,0,0,0,1,0,0,0,0,156,0,0,0,0,1,0,0,0,3.6,145,19,24,12964.0
+1,0,0,0,1,1,0,0,1,0,1,0,86.6,144.6,63.9,50.8,1713,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,1,0,0,0,0,0,0,0,2.91,58,49,54,6479.0
+1,0,0,0,1,1,0,0,1,0,1,0,86.6,144.6,63.9,50.8,1819,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,1,0,0,0,0,0,0,0,2.91,76,31,38,6855.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,150.0,64.0,52.6,1837,0,0,0,1,0,0,0,0,0,1,0,0,0,0,79,1,0,0,0,0,0,0,0,2.91,60,38,42,5399.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,150.0,64.0,52.6,1940,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,1,0,0,0,0,0,0,0,2.91,76,30,34,6529.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,150.0,64.0,52.6,1956,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,1,0,0,0,0,0,0,0,2.91,76,30,34,7129.0
+1,0,0,0,1,1,0,1,0,0,1,0,96.5,163.4,64.0,54.5,2010,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,1,0,0,0,0,0,0,0,2.91,76,30,34,7295.0
+1,0,0,0,1,1,0,1,0,0,1,0,96.5,157.1,63.9,58.3,2024,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,1,0,0,0,0,0,0,0,2.92,76,30,34,7295.0
+1,0,0,0,1,1,0,0,1,0,1,0,96.5,167.5,65.2,53.3,2236,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,1,0,0,0,0,0,0,0,3.15,86,27,33,7895.0
+1,0,0,0,1,1,0,0,1,0,1,0,96.5,167.5,65.2,53.3,2289,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,1,0,0,0,0,0,0,0,3.15,86,27,33,9095.0
+1,0,0,0,1,1,0,1,0,0,1,0,96.5,175.4,65.2,54.1,2304,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,1,0,0,0,0,0,0,0,3.15,86,27,33,8845.0
+1,0,0,0,1,1,0,1,0,0,1,0,96.5,175.4,62.5,54.1,2372,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,1,0,0,0,0,0,0,0,3.15,86,27,33,10295.0
+1,0,0,0,1,1,0,1,0,0,1,0,96.5,175.4,65.2,54.1,2465,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,0,0,0,0,0,1,0,0,3.15,101,24,28,12945.0
+1,0,0,0,1,1,0,0,1,0,1,0,96.5,169.1,66.0,51.0,2293,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,0,1,0,0,0,0,0,0,3.15,100,25,31,10345.0
+1,0,0,0,1,1,0,1,0,0,0,1,94.3,170.7,61.8,53.5,2337,0,0,0,1,0,0,0,0,0,1,0,0,0,0,111,0,1,0,0,0,0,0,0,3.31,78,24,29,6785.0
+1,0,0,0,1,1,0,0,1,0,1,0,94.5,155.9,63.6,52.0,1874,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,3.03,70,38,43,8916.5
+1,0,0,0,1,1,0,1,0,0,1,0,94.5,155.9,63.6,52.0,1909,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,3.03,70,38,43,8916.5
+1,0,0,0,1,1,0,0,1,0,0,1,96.0,172.6,65.2,51.4,2734,0,0,0,1,0,0,0,0,0,1,0,0,0,0,119,0,0,0,0,0,0,0,1,3.43,90,24,29,11048.0
+0,1,0,0,1,1,0,1,0,0,0,1,113.0,199.6,69.6,52.8,4066,1,0,0,0,0,0,0,0,0,0,1,0,0,0,258,0,0,0,0,0,1,0,0,3.63,176,15,19,32250.0
+0,1,0,0,1,1,0,1,0,0,0,1,113.0,199.6,69.6,52.8,4066,1,0,0,0,0,0,0,0,0,0,1,0,0,0,258,0,0,0,0,0,1,0,0,3.63,176,15,19,35550.0
+0,1,0,0,1,1,0,0,1,0,0,1,102.0,191.7,70.6,47.8,3950,0,0,0,0,0,1,0,0,0,0,0,0,1,0,326,0,0,0,0,0,1,0,0,3.54,262,13,17,36000.0
+0,0,1,0,1,1,0,0,1,0,1,0,93.1,159.1,64.2,54.1,1890,0,0,0,1,0,0,0,0,0,1,0,0,0,0,91,0,1,0,0,0,0,0,0,3.03,68,30,31,5195.0
+0,0,1,0,1,1,0,0,1,0,1,0,93.1,159.1,64.2,54.1,1900,0,0,0,1,0,0,0,0,0,1,0,0,0,0,91,0,1,0,0,0,0,0,0,3.03,68,31,38,6095.0
+0,0,1,0,1,1,0,0,1,0,1,0,93.1,159.1,64.2,54.1,1905,0,0,0,1,0,0,0,0,0,1,0,0,0,0,91,0,1,0,0,0,0,0,0,3.03,68,31,38,6795.0
+0,0,1,0,1,1,0,1,0,0,1,0,93.1,166.8,64.2,54.1,1945,0,0,0,1,0,0,0,0,0,1,0,0,0,0,91,0,1,0,0,0,0,0,0,3.03,68,31,38,6695.0
+0,0,1,0,1,1,0,1,0,0,1,0,93.1,166.8,64.2,54.1,1950,0,0,0,1,0,0,0,0,0,1,0,0,0,0,91,0,1,0,0,0,0,0,0,3.08,68,31,38,7395.0
+0,0,1,0,1,1,0,0,1,0,0,1,95.3,169.0,65.7,49.6,2380,0,0,0,0,0,0,1,0,0,0,0,0,0,1,70,0,0,1,0,0,0,0,0,3.33,101,17,23,10945.0
+0,0,1,0,1,1,0,0,1,0,0,1,95.3,169.0,65.7,49.6,2380,0,0,0,0,0,0,1,0,0,0,0,0,0,1,70,0,0,1,0,0,0,0,0,3.33,101,17,23,11845.0
+0,0,1,0,1,1,0,0,1,0,0,1,95.3,169.0,65.7,49.6,2385,0,0,0,0,0,0,1,0,0,0,0,0,0,1,70,0,0,1,0,0,0,0,0,3.33,101,17,23,13645.0
+0,0,1,0,1,1,0,0,1,0,0,1,95.3,169.0,65.7,49.6,2500,0,0,0,0,0,0,1,0,0,0,0,0,0,1,80,0,0,0,0,0,1,0,0,3.33,135,16,23,15645.0
+0,0,1,0,1,1,0,0,1,0,1,0,98.8,177.8,66.5,53.7,2385,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.39,84,26,32,8845.0
+0,0,1,0,1,1,0,1,0,0,1,0,98.8,177.8,66.5,55.5,2410,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.39,84,26,32,8495.0
+0,0,1,0,1,1,0,0,1,0,1,0,98.8,177.8,66.5,53.7,2385,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.39,84,26,32,10595.0
+0,0,1,0,1,1,0,1,0,0,1,0,98.8,177.8,66.5,55.5,2410,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.39,84,26,32,10245.0
+0,0,1,1,0,1,0,1,0,0,1,0,98.8,177.8,66.5,55.5,2443,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,0,0,1,0,0,0,0,3.39,64,36,42,10795.0
+0,0,1,0,1,1,0,1,0,0,1,0,98.8,177.8,66.5,55.5,2425,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.39,84,26,32,11245.0
+0,0,1,0,1,1,0,1,0,0,0,1,104.9,175.0,66.1,54.4,2670,0,0,0,1,0,0,0,0,0,1,0,0,0,0,140,0,0,0,0,0,1,0,0,3.76,120,19,27,18280.0
+0,0,1,1,0,1,0,1,0,0,0,1,104.9,175.0,66.1,54.4,2700,0,0,0,1,0,0,0,0,0,1,0,0,0,0,134,0,0,0,1,0,0,0,0,3.43,72,31,39,18344.0
+0,1,0,1,0,0,1,1,0,0,0,1,110.0,190.9,70.3,56.5,3515,0,0,0,1,0,0,0,0,1,0,0,0,0,0,183,0,0,0,1,0,0,0,0,3.58,123,22,25,25552.0
+0,1,0,1,0,0,1,1,0,0,0,1,110.0,190.9,70.3,58.7,3750,0,0,0,1,0,0,0,0,1,0,0,0,0,0,183,0,0,0,1,0,0,0,0,3.58,123,22,25,28248.0
+0,1,0,1,0,0,1,0,1,0,0,1,106.7,187.5,70.3,54.9,3495,0,0,0,1,0,0,0,0,1,0,0,0,0,0,183,0,0,0,1,0,0,0,0,3.58,123,22,25,28176.0
+0,1,0,1,0,0,1,1,0,0,0,1,115.6,202.6,71.7,56.3,3770,0,0,0,1,0,0,0,0,1,0,0,0,0,0,183,0,0,0,1,0,0,0,0,3.58,123,22,25,31600.0
+0,1,0,0,1,1,0,1,0,0,0,1,115.6,202.6,71.7,56.5,3740,0,0,0,0,0,1,0,1,0,0,0,0,0,0,234,0,0,0,0,0,1,0,0,3.46,155,16,18,34184.0
+0,1,0,0,1,1,0,0,1,0,0,1,96.6,180.3,70.5,50.8,3685,0,0,0,0,0,1,0,1,0,0,0,0,0,0,234,0,0,0,0,0,1,0,0,3.46,155,16,18,35056.0
+0,1,0,0,1,1,0,1,0,0,0,1,120.9,208.1,71.7,56.7,3900,0,0,0,0,0,1,0,1,0,0,0,0,0,0,308,0,0,0,0,0,1,0,0,3.8,184,14,16,40960.0
+0,1,0,0,1,1,0,0,1,0,0,1,112.0,199.2,72.0,55.4,3715,0,0,0,0,0,1,0,1,0,0,0,0,0,0,304,0,0,0,0,0,1,0,0,3.8,184,14,16,45400.0
+0,0,1,0,1,0,1,0,1,0,0,1,102.7,178.4,68.0,54.8,2910,0,0,0,1,0,0,0,0,0,1,0,0,0,0,140,0,0,0,0,0,1,0,0,3.78,175,19,24,16503.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,157.3,64.4,50.8,1918,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,2.97,68,37,41,5389.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,157.3,64.4,50.8,1944,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,2.97,68,31,38,6189.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,157.3,64.4,50.8,2004,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,2.97,68,31,38,6669.0
+1,0,0,0,1,0,1,0,1,0,1,0,93.0,157.3,63.8,50.8,2145,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,0,0,0,0,0,1,0,3.03,102,24,30,7689.0
+1,0,0,0,1,0,1,0,1,0,1,0,96.3,173.0,65.4,49.4,2370,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,0,0,0,0,0,0,1,0,3.17,116,23,30,9959.0
+1,0,0,0,1,1,0,0,1,0,1,0,96.3,173.0,65.4,49.4,2328,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.35,88,25,32,8499.0
+1,0,0,0,1,0,1,0,1,0,1,0,95.9,173.2,66.3,50.2,2833,0,0,0,1,0,0,0,0,0,1,0,0,0,0,156,0,0,0,0,0,0,1,0,3.58,145,19,24,12629.0
+1,0,0,0,1,0,1,0,1,0,1,0,95.9,173.2,66.3,50.2,2921,0,0,0,1,0,0,0,0,0,1,0,0,0,0,156,0,0,0,0,0,0,1,0,3.59,145,19,24,14869.0
+1,0,0,0,1,0,1,0,1,0,1,0,95.9,173.2,66.3,50.2,2926,0,0,0,1,0,0,0,0,0,1,0,0,0,0,156,0,0,0,0,0,0,1,0,3.59,145,19,24,14489.0
+1,0,0,0,1,1,0,1,0,0,1,0,96.3,172.4,65.4,51.6,2365,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.35,88,25,32,6989.0
+1,0,0,0,1,1,0,1,0,0,1,0,96.3,172.4,65.4,51.6,2405,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.35,88,25,32,8189.0
+1,0,0,0,1,0,1,1,0,0,1,0,96.3,172.4,65.4,51.6,2403,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,0,0,0,0,0,0,1,0,3.17,116,23,30,9279.0
+1,0,0,0,1,1,0,1,0,0,1,0,96.3,172.4,65.4,51.6,2403,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,0,0,0,0,0,0,1,0,3.17,116,23,30,9279.0
+0,0,1,0,1,1,0,0,1,0,1,0,94.5,165.3,63.8,54.5,1889,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,5499.0
+0,0,1,1,0,1,0,0,1,0,1,0,94.5,165.3,63.8,54.5,2017,0,0,0,1,0,0,0,0,0,1,0,0,0,0,103,0,0,0,1,0,0,0,0,2.99,55,45,50,7099.0
+0,0,1,0,1,1,0,0,1,0,1,0,94.5,165.3,63.8,54.5,1918,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,6649.0
+0,0,1,0,1,1,0,1,0,0,1,0,94.5,165.3,63.8,54.5,1938,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,6849.0
+0,0,1,0,1,1,0,1,0,0,1,0,94.5,170.2,63.8,53.5,2024,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,7349.0
+0,0,1,0,1,1,0,0,1,0,1,0,94.5,165.3,63.8,54.5,1951,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,7299.0
+0,0,1,0,1,1,0,0,1,0,1,0,94.5,165.6,63.8,53.3,2028,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,7799.0
+0,0,1,0,1,1,0,1,0,0,1,0,94.5,165.3,63.8,54.5,1971,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,7499.0
+0,0,1,0,1,1,0,1,0,0,1,0,94.5,170.2,63.8,53.5,2037,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,7999.0
+0,0,1,0,1,1,0,0,1,0,1,0,95.1,162.4,63.8,53.3,2008,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.15,69,31,37,8249.0
+0,0,1,0,1,1,0,1,0,0,1,0,97.2,173.4,65.2,54.7,2324,0,0,0,1,0,0,0,0,0,1,0,0,0,0,120,0,1,0,0,0,0,0,0,3.33,97,27,34,8949.0
+0,0,1,0,1,1,0,1,0,0,1,0,97.2,173.4,65.2,54.7,2302,0,0,0,1,0,0,0,0,0,1,0,0,0,0,120,0,1,0,0,0,0,0,0,3.33,97,27,34,9549.0
+0,0,1,0,1,1,0,1,0,0,1,0,100.4,181.7,66.5,55.1,3095,0,0,0,0,0,1,0,0,0,0,1,0,0,0,181,0,0,0,0,0,1,0,0,3.43,152,17,22,13499.0
+0,0,1,0,1,1,0,1,0,0,1,0,100.4,184.6,66.5,56.1,3296,0,0,0,0,0,1,0,0,0,0,1,0,0,0,181,0,0,0,0,0,1,0,0,3.43,152,17,22,14399.0
+0,0,1,0,1,1,0,1,0,0,1,0,100.4,184.6,66.5,55.1,3060,0,0,0,0,0,1,0,0,0,0,1,0,0,0,181,0,0,0,0,0,1,0,0,3.43,152,19,25,13499.0
+0,0,1,0,1,1,0,0,1,0,0,1,91.3,170.7,67.9,49.7,3071,0,0,0,0,0,1,0,0,0,0,1,0,0,0,181,0,0,0,0,0,1,0,0,3.43,160,19,25,17199.0
+0,0,1,0,1,0,1,0,1,0,0,1,91.3,170.7,67.9,49.7,3139,0,0,0,0,0,1,0,0,0,0,1,0,0,0,181,0,0,0,0,0,1,0,0,3.43,200,17,23,19699.0
+0,0,1,0,1,1,0,0,1,0,0,1,99.2,178.5,67.9,49.7,3139,0,0,0,0,0,1,0,0,0,0,1,0,0,0,181,0,0,0,0,0,1,0,0,3.43,160,19,25,18399.0
+0,0,1,0,1,1,0,1,0,0,0,1,107.9,186.7,68.4,56.7,3020,0,0,1,0,0,0,0,0,0,1,0,0,0,0,120,0,0,0,0,0,1,0,0,3.46,97,19,24,11900.0
+0,0,1,1,0,0,1,1,0,0,0,1,107.9,186.7,68.4,56.7,3197,0,0,1,0,0,0,0,0,0,1,0,0,0,0,152,0,0,0,1,0,0,0,0,3.7,95,28,33,13200.0
+0,0,1,0,1,1,0,1,0,0,0,1,114.2,198.9,68.4,58.7,3230,0,0,1,0,0,0,0,0,0,1,0,0,0,0,120,0,0,0,0,0,1,0,0,3.46,97,19,24,12440.0
+0,0,1,1,0,0,1,1,0,0,0,1,114.2,198.9,68.4,58.7,3430,0,0,1,0,0,0,0,0,0,1,0,0,0,0,152,0,0,0,1,0,0,0,0,3.7,95,25,25,13860.0
+0,0,1,0,1,1,0,1,0,0,0,1,107.9,186.7,68.4,56.7,3075,0,0,1,0,0,0,0,0,0,1,0,0,0,0,120,0,0,0,0,0,1,0,0,3.46,95,19,24,15580.0
+0,0,1,1,0,0,1,1,0,0,0,1,107.9,186.7,68.4,56.7,3252,0,0,1,0,0,0,0,0,0,1,0,0,0,0,152,0,0,0,1,0,0,0,0,3.7,95,28,33,16900.0
+0,0,1,0,1,1,0,1,0,0,0,1,114.2,198.9,68.4,56.7,3285,0,0,1,0,0,0,0,0,0,1,0,0,0,0,120,0,0,0,0,0,1,0,0,3.46,95,19,24,16695.0
+0,0,1,1,0,0,1,1,0,0,0,1,114.2,198.9,68.4,58.7,3485,0,0,1,0,0,0,0,0,0,1,0,0,0,0,152,0,0,0,1,0,0,0,0,3.7,95,25,25,17075.0
+0,0,1,0,1,1,0,1,0,0,0,1,107.9,186.7,68.4,56.7,3075,0,0,1,0,0,0,0,0,0,1,0,0,0,0,120,0,0,0,0,0,1,0,0,3.46,97,19,24,16630.0
+0,0,1,1,0,0,1,1,0,0,0,1,107.9,186.7,68.4,56.7,3252,0,0,1,0,0,0,0,0,0,1,0,0,0,0,152,0,0,0,1,0,0,0,0,3.7,95,28,33,17950.0
+0,0,1,0,1,0,1,1,0,0,0,1,108.0,186.7,68.3,56.0,3130,0,0,1,0,0,0,0,0,0,1,0,0,0,0,134,0,0,0,0,0,1,0,0,3.61,142,18,24,18150.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,157.3,63.8,50.8,1918,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,2.97,68,37,41,5572.0
+1,0,0,0,1,0,1,0,1,0,1,0,93.7,157.3,63.8,50.8,2128,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,0,0,0,0,0,1,0,3.03,102,24,30,7957.0
+1,0,0,0,1,1,0,1,0,0,1,0,93.7,157.3,63.8,50.6,1967,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,2.97,68,31,38,6229.0
+1,0,0,0,1,1,0,1,0,0,1,0,93.7,167.3,63.8,50.8,1989,0,0,0,1,0,0,0,0,0,1,0,0,0,0,90,0,1,0,0,0,0,0,0,2.97,68,31,38,6692.0
+1,0,0,0,1,1,0,1,0,0,1,0,93.7,167.3,63.8,50.8,2191,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,1,0,0,0,0,0,0,2.97,68,31,38,7609.0
+1,0,0,0,1,1,0,1,0,0,1,0,103.3,174.6,64.6,59.8,2535,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,1,0,0,0,0,0,0,3.35,88,24,30,8921.0
+1,0,0,0,1,0,1,0,1,0,0,1,95.9,173.2,66.3,50.2,2818,0,0,0,1,0,0,0,0,0,1,0,0,0,0,156,0,0,0,0,0,0,1,0,3.59,145,19,24,12764.0
+0,1,0,0,1,1,0,0,1,0,0,1,94.5,168.9,68.3,50.2,2778,0,0,0,1,0,0,0,0,0,1,0,0,0,0,151,0,0,0,0,0,1,0,0,3.94,143,19,27,22018.0
+0,1,0,0,1,1,0,0,1,0,0,1,89.5,168.9,65.0,51.6,2756,0,0,0,0,1,0,0,0,0,0,1,0,0,0,194,0,0,0,0,0,1,0,0,3.74,207,17,25,32528.0
+0,1,0,0,1,1,0,0,1,0,0,1,89.5,168.9,65.0,51.6,2756,0,0,0,0,1,0,0,0,0,0,1,0,0,0,194,0,0,0,0,0,1,0,0,3.74,207,17,25,34028.0
+0,1,0,0,1,1,0,0,1,0,0,1,89.5,168.9,65.0,51.6,2800,0,0,0,0,1,0,0,0,0,0,1,0,0,0,194,0,0,0,0,0,1,0,0,3.74,207,17,25,37028.0
+0,1,0,0,1,1,0,0,1,0,0,1,98.4,175.7,72.3,50.5,3366,0,1,0,0,0,0,0,1,0,0,0,0,0,0,203,0,0,0,0,0,1,0,0,3.94,288,17,28,31400.5
+1,0,0,0,1,1,0,1,0,0,1,0,96.1,181.5,66.5,55.2,2579,0,0,0,1,0,0,0,0,0,1,0,0,0,0,132,0,0,0,0,0,1,0,0,3.46,90,23,31,9295.0
+1,0,0,0,1,1,0,0,1,0,1,0,96.1,176.8,66.6,50.5,2460,0,0,0,1,0,0,0,0,0,1,0,0,0,0,132,0,0,0,0,0,1,0,0,3.46,90,23,31,9895.0
+0,0,1,0,1,1,0,0,1,0,1,0,99.1,186.6,66.5,56.1,2658,0,0,0,1,0,0,0,0,0,1,0,0,0,0,121,0,0,0,0,0,1,0,0,3.54,110,21,28,11850.0
+0,0,1,0,1,1,0,1,0,0,1,0,99.1,186.6,66.5,56.1,2695,0,0,0,1,0,0,0,0,0,1,0,0,0,0,121,0,0,0,0,0,1,0,0,3.54,110,21,28,12170.0
+0,0,1,0,1,1,0,0,1,0,1,0,99.1,186.6,66.5,56.1,2707,0,0,0,1,0,0,0,0,0,1,0,0,0,0,121,0,0,0,0,0,1,0,0,2.54,110,21,28,15040.0
+0,0,1,0,1,1,0,1,0,0,1,0,99.1,186.6,66.5,56.1,2758,0,0,0,1,0,0,0,0,0,1,0,0,0,0,121,0,0,0,0,0,1,0,0,3.54,110,21,28,15510.0
+0,0,1,0,1,0,1,0,1,0,1,0,99.1,186.6,66.5,56.1,2808,1,0,0,0,0,0,0,0,0,1,0,0,0,0,121,0,0,0,0,0,1,0,0,3.54,160,19,26,18150.0
+0,0,1,0,1,0,1,1,0,0,1,0,99.1,186.6,66.5,56.1,2847,1,0,0,0,0,0,0,0,0,1,0,0,0,0,121,0,0,0,0,0,1,0,0,3.54,160,19,26,18620.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,156.9,63.4,53.7,2050,0,0,0,0,1,0,0,0,0,1,0,0,0,0,97,0,1,0,0,0,0,0,0,3.62,69,31,36,5118.0
+1,0,0,0,1,1,0,0,1,0,1,0,93.7,157.9,63.6,53.7,2120,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,1,0,0,0,0,0,0,3.62,73,26,31,7053.0
+1,0,0,0,1,1,0,0,1,1,0,0,93.3,157.3,63.8,55.7,2240,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,1,0,0,0,0,0,0,3.62,73,26,31,7603.0
+1,0,0,0,1,1,0,1,0,0,1,0,97.2,172.0,65.4,52.5,2145,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,1,0,0,0,0,0,0,3.62,82,32,37,7126.0
+1,0,0,0,1,1,0,1,0,0,1,0,97.2,172.0,65.4,52.5,2190,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,1,0,0,0,0,0,0,3.62,82,28,33,7775.0
+1,0,0,0,1,1,0,1,0,0,1,0,97.2,172.0,65.4,52.5,2340,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,0,0,0,0,1,0,0,3.62,94,26,32,9960.0
+1,0,0,0,1,1,0,1,0,1,0,0,97.0,172.0,65.4,54.3,2385,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,1,0,0,0,0,0,0,3.62,82,24,25,9233.0
+1,0,0,0,1,0,1,1,0,1,0,0,97.0,172.0,65.4,54.3,2510,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,0,0,0,0,1,0,0,3.62,111,24,29,11259.0
+1,0,0,0,1,1,0,1,0,0,1,0,97.0,173.5,65.4,53.0,2290,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,1,0,0,0,0,0,0,3.62,82,28,32,7463.0
+1,0,0,0,1,1,0,1,0,0,1,0,97.0,173.5,65.4,53.0,2455,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,0,0,0,0,1,0,0,3.62,94,25,31,10198.0
+1,0,0,0,1,1,0,1,0,1,0,0,96.9,173.6,65.4,54.9,2420,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,1,0,0,0,0,0,0,3.62,82,23,29,8013.0
+1,0,0,0,1,0,1,1,0,1,0,0,96.9,173.6,65.4,54.9,2650,0,0,0,0,1,0,0,0,0,1,0,0,0,0,108,0,0,0,0,0,1,0,0,3.62,111,23,23,11694.0
+1,0,0,0,1,1,0,0,1,0,1,0,95.7,158.7,63.6,54.5,1985,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,3.05,62,35,39,5348.0
+1,0,0,0,1,1,0,0,1,0,1,0,95.7,158.7,63.6,54.5,2040,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,3.05,62,31,38,6338.0
+1,0,0,0,1,1,0,1,0,0,1,0,95.7,158.7,63.6,54.5,2015,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,3.05,62,31,38,6488.0
+1,0,0,0,1,1,0,1,0,0,1,0,95.7,169.7,63.6,59.1,2280,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,3.05,62,31,37,6918.0
+1,0,0,0,1,1,0,1,0,1,0,0,95.7,169.7,63.6,59.1,2290,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,3.05,62,27,32,7898.0
+1,0,0,0,1,1,0,1,0,1,0,0,95.7,169.7,63.6,59.1,3110,0,0,0,1,0,0,0,0,0,1,0,0,0,0,92,0,1,0,0,0,0,0,0,3.05,62,27,32,8778.0
+1,0,0,0,1,1,0,1,0,0,1,0,95.7,166.3,64.4,53.0,2081,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,1,0,0,0,0,0,0,3.19,70,30,37,6938.0
+1,0,0,0,1,1,0,1,0,0,1,0,95.7,166.3,64.4,52.8,2109,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,1,0,0,0,0,0,0,3.19,70,30,37,7198.0
+1,0,0,1,0,1,0,1,0,0,1,0,95.7,166.3,64.4,53.0,2275,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,0,0,0,1,0,0,0,0,3.27,56,34,36,7898.0
+1,0,0,1,0,1,0,1,0,0,1,0,95.7,166.3,64.4,52.8,2275,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,0,0,0,1,0,0,0,0,3.27,56,38,47,7788.0
+1,0,0,0,1,1,0,1,0,0,1,0,95.7,166.3,64.4,53.0,2094,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,1,0,0,0,0,0,0,3.19,70,38,47,7738.0
+1,0,0,0,1,1,0,1,0,0,1,0,95.7,166.3,64.4,52.8,2122,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,1,0,0,0,0,0,0,3.19,70,28,34,8358.0
+1,0,0,0,1,1,0,1,0,0,1,0,95.7,166.3,64.4,52.8,2140,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,1,0,0,0,0,0,0,3.19,70,28,34,9258.0
+1,0,0,0,1,1,0,0,1,0,0,1,94.5,168.7,64.0,52.6,2169,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,1,0,0,0,0,0,0,3.19,70,29,34,8058.0
+1,0,0,0,1,1,0,0,1,0,0,1,94.5,168.7,64.0,52.6,2204,0,0,0,1,0,0,0,0,0,1,0,0,0,0,98,0,1,0,0,0,0,0,0,3.19,70,29,34,8238.0
+1,0,0,0,1,1,0,0,1,0,0,1,94.5,168.7,64.0,52.6,2265,1,0,0,0,0,0,0,0,0,1,0,0,0,0,98,0,0,0,0,0,1,0,0,3.24,112,26,29,9298.0
+1,0,0,0,1,1,0,0,1,0,0,1,94.5,168.7,64.0,52.6,2300,1,0,0,0,0,0,0,0,0,1,0,0,0,0,98,0,0,0,0,0,1,0,0,3.24,112,26,29,9538.0
+1,0,0,0,1,1,0,0,1,0,0,1,98.4,176.2,65.6,52.0,2540,0,0,0,1,0,0,0,0,0,1,0,0,0,0,146,0,0,0,0,0,1,0,0,3.62,116,24,30,8449.0
+1,0,0,0,1,1,0,0,1,0,0,1,98.4,176.2,65.6,52.0,2536,0,0,0,1,0,0,0,0,0,1,0,0,0,0,146,0,0,0,0,0,1,0,0,3.62,116,24,30,9639.0
+1,0,0,0,1,1,0,0,1,0,0,1,98.4,176.2,65.6,52.0,2551,0,0,0,1,0,0,0,0,0,1,0,0,0,0,146,0,0,0,0,0,1,0,0,3.62,116,24,30,9989.0
+1,0,0,0,1,1,0,0,1,0,0,1,98.4,176.2,65.6,52.0,2679,0,0,0,1,0,0,0,0,0,1,0,0,0,0,146,0,0,0,0,0,1,0,0,3.62,116,24,30,11199.0
+1,0,0,0,1,1,0,0,1,0,0,1,98.4,176.2,65.6,52.0,2714,0,0,0,1,0,0,0,0,0,1,0,0,0,0,146,0,0,0,0,0,1,0,0,3.62,116,24,30,11549.0
+1,0,0,0,1,1,0,0,1,0,0,1,98.4,176.2,65.6,53.0,2975,0,0,0,1,0,0,0,0,0,1,0,0,0,0,146,0,0,0,0,0,1,0,0,3.62,116,24,30,17669.0
+1,0,0,0,1,1,0,1,0,0,1,0,102.4,175.6,66.5,54.9,2326,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,0,0,0,0,1,0,0,3.31,92,29,34,8948.0
+1,0,0,1,0,0,1,1,0,0,1,0,102.4,175.6,66.5,54.9,2480,0,0,0,1,0,0,0,0,0,1,0,0,0,0,110,0,0,0,1,0,0,0,0,3.27,73,30,33,10698.0
+1,0,0,0,1,1,0,1,0,0,1,0,102.4,175.6,66.5,53.9,2414,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,0,0,0,0,1,0,0,3.31,92,27,32,9988.0
+1,0,0,0,1,1,0,1,0,0,1,0,102.4,175.6,66.5,54.9,2414,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,0,0,0,0,1,0,0,3.31,92,27,32,10898.0
+1,0,0,0,1,1,0,1,0,0,1,0,102.4,175.6,66.5,53.9,2458,0,0,0,1,0,0,0,0,0,1,0,0,0,0,122,0,0,0,0,0,1,0,0,3.31,92,27,32,11248.0
+1,0,0,0,1,1,0,0,1,0,0,1,102.9,183.5,67.7,52.0,2976,1,0,0,0,0,0,0,0,0,0,1,0,0,0,171,0,0,0,0,0,1,0,0,3.27,161,20,24,16558.0
+1,0,0,0,1,1,0,0,1,0,0,1,102.9,183.5,67.7,52.0,3016,1,0,0,0,0,0,0,0,0,0,1,0,0,0,171,0,0,0,0,0,1,0,0,3.27,161,19,24,15998.0
+1,0,0,0,1,1,0,1,0,0,0,1,104.5,187.8,66.5,54.1,3131,1,0,0,0,0,0,0,0,0,0,1,0,0,0,171,0,0,0,0,0,1,0,0,3.27,156,20,24,15690.0
+1,0,0,0,1,1,0,1,0,0,0,1,104.5,187.8,66.5,54.1,3151,1,0,0,0,0,0,0,0,0,0,1,0,0,0,161,0,0,0,0,0,1,0,0,3.27,156,19,24,15750.0
+0,0,1,1,0,1,0,0,1,0,1,0,97.3,171.7,65.5,55.7,2261,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,0,0,1,0,0,0,0,3.01,52,37,46,7775.0
+0,0,1,0,1,1,0,0,1,0,1,0,97.3,171.7,65.5,55.7,2209,0,0,0,1,0,0,0,0,0,1,0,0,0,0,109,0,0,0,0,0,1,0,0,3.19,85,27,34,7975.0
+0,0,1,1,0,1,0,1,0,0,1,0,97.3,171.7,65.5,55.7,2264,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,0,0,1,0,0,0,0,3.01,52,37,46,7995.0
+0,0,1,0,1,1,0,1,0,0,1,0,97.3,171.7,65.5,55.7,2212,0,0,0,1,0,0,0,0,0,1,0,0,0,0,109,0,0,0,0,0,1,0,0,3.19,85,27,34,8195.0
+0,0,1,0,1,1,0,1,0,0,1,0,97.3,171.7,65.5,55.7,2275,0,0,0,1,0,0,0,0,0,1,0,0,0,0,109,0,0,0,0,0,1,0,0,3.19,85,27,34,8495.0
+0,0,1,1,0,0,1,1,0,0,1,0,97.3,171.7,65.5,55.7,2319,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,0,0,1,0,0,0,0,3.01,68,37,42,9495.0
+0,0,1,0,1,1,0,1,0,0,1,0,97.3,171.7,65.5,55.7,2300,0,0,0,1,0,0,0,0,0,1,0,0,0,0,109,0,0,0,0,0,1,0,0,3.19,100,26,32,9995.0
+0,0,1,0,1,1,0,0,1,0,1,0,94.5,159.3,64.2,55.6,2254,0,0,0,1,0,0,0,0,0,1,0,0,0,0,109,0,0,0,0,0,1,0,0,3.19,90,24,29,11595.0
+0,0,1,0,1,1,0,0,1,0,1,0,94.5,165.7,64.0,51.4,2221,0,0,0,1,0,0,0,0,0,1,0,0,0,0,109,0,0,0,0,0,1,0,0,3.19,90,24,29,9980.0
+0,0,1,0,1,1,0,1,0,0,1,0,100.4,180.2,66.9,55.1,2661,0,0,0,1,0,0,0,0,1,0,0,0,0,0,136,0,0,0,0,0,1,0,0,3.19,110,19,24,13295.0
+0,0,1,1,0,0,1,1,0,0,1,0,100.4,180.2,66.9,55.1,2579,0,0,0,1,0,0,0,0,0,1,0,0,0,0,97,0,0,0,1,0,0,0,0,3.01,68,33,38,13845.0
+0,0,1,0,1,1,0,1,0,0,1,0,100.4,183.1,66.9,55.1,2563,0,0,0,1,0,0,0,0,0,1,0,0,0,0,109,0,0,0,0,0,1,0,0,3.19,88,25,31,12290.0
+0,0,1,0,1,1,0,1,0,0,0,1,104.3,188.8,67.2,56.2,2912,0,0,0,1,0,0,0,0,0,1,0,0,0,0,141,0,0,0,0,0,1,0,0,3.78,114,23,28,12940.0
+0,0,1,0,1,1,0,1,0,0,0,1,104.3,188.8,67.2,57.5,3034,0,0,0,1,0,0,0,0,0,1,0,0,0,0,141,0,0,0,0,0,1,0,0,3.78,114,23,28,13415.0
+0,0,1,0,1,1,0,1,0,0,0,1,104.3,188.8,67.2,56.2,2935,0,0,0,1,0,0,0,0,0,1,0,0,0,0,141,0,0,0,0,0,1,0,0,3.78,114,24,28,15985.0
+0,0,1,0,1,1,0,1,0,0,0,1,104.3,188.8,67.2,57.5,3042,0,0,0,1,0,0,0,0,0,1,0,0,0,0,141,0,0,0,0,0,1,0,0,3.78,114,24,28,16515.0
+0,0,1,0,1,0,1,1,0,0,0,1,104.3,188.8,67.2,56.2,3045,0,0,0,1,0,0,0,0,0,1,0,0,0,0,130,0,0,0,0,0,1,0,0,3.62,162,17,22,18420.0
+0,0,1,0,1,0,1,1,0,0,0,1,104.3,188.8,67.2,57.5,3157,0,0,0,1,0,0,0,0,0,1,0,0,0,0,130,0,0,0,0,0,1,0,0,3.62,162,17,22,18950.0
+0,0,1,0,1,1,0,1,0,0,0,1,109.1,188.8,68.9,55.5,2952,0,0,0,1,0,0,0,0,0,1,0,0,0,0,141,0,0,0,0,0,1,0,0,3.78,114,23,28,16845.0
+0,0,1,0,1,0,1,1,0,0,0,1,109.1,188.8,68.8,55.5,3049,0,0,0,1,0,0,0,0,0,1,0,0,0,0,141,0,0,0,0,0,1,0,0,3.78,160,19,25,19045.0
+0,0,1,0,1,1,0,1,0,0,0,1,109.1,188.8,68.9,55.5,3012,0,0,0,0,0,1,0,0,0,0,1,0,0,0,173,0,0,0,0,0,1,0,0,3.58,134,18,23,21485.0
+0,0,1,1,0,0,1,1,0,0,0,1,109.1,188.8,68.9,55.5,3217,0,0,0,1,0,0,0,0,0,0,1,0,0,0,145,0,0,0,1,0,0,0,0,3.01,106,26,27,22470.0
+0,0,1,0,1,0,1,1,0,0,0,1,109.1,188.8,68.9,55.5,3062,0,0,0,1,0,0,0,0,0,1,0,0,0,0,141,0,0,0,0,0,1,0,0,3.78,114,19,25,22625.0
diff --git a/data_analytics_js.ipynb b/data_analytics_js.ipynb
new file mode 100644
index 0000000..b08b2c6
--- /dev/null
+++ b/data_analytics_js.ipynb
@@ -0,0 +1,4436 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "b9db28d4-ea49-443c-a5d6-e1c44bfe4942",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "# Data Analytics with JS\n",
+ "\n",
+ "The dataset contains all the information about cars, a name of a manufacturer, all car's technical parameters and a sale price of a car.\n",
+ "\n",
+ "Libraries:\n",
+ " - nodejs-polars\n",
+ " - @observable/plot"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "d163c580-6aa0-4e8c-a780-5cc931003dc8",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "## Exploring Data\n",
+ "\n",
+ "Use [pola-rs](https://pola-rs.github.io/nodejs-polars/modules.html) dataframes to read and manipulate data.\n",
+ "\n",
+ "- use `df.head(n)` to get n first rows\n",
+ "- use `df.sample(n)` to get n random rows from the dataset\n",
+ "- use `df.describe()` to get mean, std, min, max\n",
+ "- use `df.select(...cols)` to get new dataframe for columns\n",
+ "- use `df.groupBy(..cols).agg()` to group data and get aggragates"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "1cb3589a-bffe-422a-8e32-a853161b93c4",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "CarName": "alfa-romero giulia",
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "car_ID": 1,
+ "carbody": "convertible",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "compressionratio": 9,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "peakrpm": 5000,
+ "price": 13495,
+ "stroke": 2.68,
+ "symboling": 3,
+ "wheelbase": 88.6
+ },
+ {
+ "CarName": "alfa-romero stelvio",
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "car_ID": 2,
+ "carbody": "convertible",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "compressionratio": 9,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "peakrpm": 5000,
+ "price": 16500,
+ "stroke": 2.68,
+ "symboling": 3,
+ "wheelbase": 88.6
+ },
+ {
+ "CarName": "alfa-romero Quadrifoglio",
+ "aspiration": "std",
+ "boreratio": 2.68,
+ "car_ID": 3,
+ "carbody": "hatchback",
+ "carheight": 52.4,
+ "carlength": 171.2,
+ "carwidth": 65.5,
+ "citympg": 19,
+ "compressionratio": 9,
+ "curbweight": 2823,
+ "cylindernumber": "six",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 152,
+ "enginetype": "ohcv",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 26,
+ "horsepower": 154,
+ "peakrpm": 5000,
+ "price": 16500,
+ "stroke": 3.47,
+ "symboling": 1,
+ "wheelbase": 94.5
+ },
+ {
+ "CarName": "audi 100 ls",
+ "aspiration": "std",
+ "boreratio": 3.19,
+ "car_ID": 4,
+ "carbody": "sedan",
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.2,
+ "citympg": 24,
+ "compressionratio": 10,
+ "curbweight": 2337,
+ "cylindernumber": "four",
+ "doornumber": "four",
+ "drivewheel": "fwd",
+ "enginelocation": "front",
+ "enginesize": 109,
+ "enginetype": "ohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 30,
+ "horsepower": 102,
+ "peakrpm": 5500,
+ "price": 13950,
+ "stroke": 3.4,
+ "symboling": 2,
+ "wheelbase": 99.8
+ },
+ {
+ "CarName": "audi 100ls",
+ "aspiration": "std",
+ "boreratio": 3.19,
+ "car_ID": 5,
+ "carbody": "sedan",
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.4,
+ "citympg": 18,
+ "compressionratio": 8,
+ "curbweight": 2824,
+ "cylindernumber": "five",
+ "doornumber": "four",
+ "drivewheel": "4wd",
+ "enginelocation": "front",
+ "enginesize": 136,
+ "enginetype": "ohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 22,
+ "horsepower": 115,
+ "peakrpm": 5500,
+ "price": 17450,
+ "stroke": 3.4,
+ "symboling": 2,
+ "wheelbase": 99.4
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "car_ID",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "symboling",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "CarName",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fueltype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "aspiration",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "doornumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carbody",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "drivewheel",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginelocation",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "wheelbase",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carlength",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carwidth",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carheight",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "curbweight",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginesize",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "boreratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "stroke",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "compressionratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "horsepower",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "peakrpm",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "citympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "highwaympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "price",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "
car_ID | symboling | CarName | fueltype | aspiration | doornumber | carbody | drivewheel | enginelocation | wheelbase | carlength | carwidth | carheight | curbweight | enginetype | cylindernumber | enginesize | fuelsystem | boreratio | stroke | compressionratio | horsepower | peakrpm | citympg | highwaympg | price |
---|
1 | 3 | alfa-romero giulia | gas | std | two | convertible | rwd | front | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 2.68 | 9 | 111 | 5000 | 21 | 27 | 13495 |
2 | 3 | alfa-romero stelvio | gas | std | two | convertible | rwd | front | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 2.68 | 9 | 111 | 5000 | 21 | 27 | 16500 |
3 | 1 | alfa-romero Quadrifoglio | gas | std | two | hatchback | rwd | front | 94.5 | 171.2 | 65.5 | 52.4 | 2823 | ohcv | six | 152 | mpfi | 2.68 | 3.47 | 9 | 154 | 5000 | 19 | 26 | 16500 |
4 | 2 | audi 100 ls | gas | std | four | sedan | fwd | front | 99.8 | 176.6 | 66.2 | 54.3 | 2337 | ohc | four | 109 | mpfi | 3.19 | 3.4 | 10 | 102 | 5500 | 24 | 30 | 13950 |
5 | 2 | audi 100ls | gas | std | four | sedan | 4wd | front | 99.4 | 176.6 | 66.4 | 54.3 | 2824 | ohc | five | 136 | mpfi | 3.19 | 3.4 | 8 | 115 | 5500 | 18 | 22 | 17450 |
"
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import { display } from \"https://deno.land/x/display@v0.1.1/mod.ts\"\n",
+ "import pl from \"npm:nodejs-polars\"\n",
+ "\n",
+ "let data = await Deno.readTextFile('assets/CarPrice_Assignment.csv')\n",
+ "let df = pl.readCSV(data, { sep: \",\" })\n",
+ "\n",
+ "await display(df.head(5))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "a82e43fd-04a6-4bc8-a752-3b03abd6e983",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "describe": "mean",
+ "enginesize": 126.90731707317073,
+ "horsepower": 104.1170731707317,
+ "price": 13276.710570731706
+ },
+ {
+ "describe": "std",
+ "enginesize": 41.642693438179855,
+ "horsepower": 39.54416680936116,
+ "price": 7988.852331743148
+ },
+ {
+ "describe": "min",
+ "enginesize": 61,
+ "horsepower": 48,
+ "price": 5118
+ },
+ {
+ "describe": "max",
+ "enginesize": 326,
+ "horsepower": 288,
+ "price": 45400
+ },
+ {
+ "describe": "median",
+ "enginesize": 120,
+ "horsepower": 95,
+ "price": 10295
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "describe",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginesize",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "horsepower",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "price",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "describe | enginesize | horsepower | price |
---|
mean | 126.90731707317073 | 104.1170731707317 | 13276.710570731706 |
std | 41.642693438179855 | 39.54416680936116 | 7988.852331743148 |
min | 61 | 48 | 5118 |
max | 326 | 288 | 45400 |
median | 120 | 95 | 10295 |
"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "await display(\n",
+ " df.select(\n",
+ " 'enginesize', \n",
+ " 'horsepower', \n",
+ " 'price'\n",
+ " ).describe()\n",
+ ")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "5c931435-0e19-4d32-8ca8-ae81a9cb43c8",
+ "metadata": {},
+ "source": [
+ "## Data Cleaning"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "e70e5f22-bdde-4140-9015-a6281b8478bf",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "\u001b[33mfalse\u001b[39m"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "// check for duplicates\n",
+ "const hasDups = df.select('car_ID').isDuplicated().toArray().includes(true)\n",
+ "// if there are duplicates, use df.filter()\n",
+ "hasDups"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "7fb89a88-f3ad-457d-9211-2b75eef6096f",
+ "metadata": {},
+ "source": [
+ "Resolve categorical values. For this dataset it is a brand name:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "ffb4509e-1930-4e2e-954c-51e919084514",
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "brand": "peugeot"
+ },
+ {
+ "brand": "bmw"
+ },
+ {
+ "brand": "buick"
+ },
+ {
+ "brand": "porcshce"
+ },
+ {
+ "brand": "volvo"
+ },
+ {
+ "brand": "maxda"
+ },
+ {
+ "brand": "renault"
+ },
+ {
+ "brand": "mazda"
+ },
+ {
+ "brand": "alfa-romero"
+ },
+ {
+ "brand": "subaru"
+ },
+ {
+ "brand": "toyouta"
+ },
+ {
+ "brand": "mitsubishi"
+ },
+ {
+ "brand": "dodge"
+ },
+ {
+ "brand": "isuzu"
+ },
+ {
+ "brand": "porsche"
+ },
+ {
+ "brand": "vokswagen"
+ },
+ {
+ "brand": "saab"
+ },
+ {
+ "brand": "volkswagen"
+ },
+ {
+ "brand": "audi"
+ },
+ {
+ "brand": "plymouth"
+ },
+ {
+ "brand": "chevrolet"
+ },
+ {
+ "brand": "toyota"
+ },
+ {
+ "brand": "nissan"
+ },
+ {
+ "brand": "vw"
+ },
+ {
+ "brand": "mercury"
+ },
+ {
+ "brand": "honda"
+ },
+ {
+ "brand": "jaguar"
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand |
---|
peugeot |
bmw |
buick |
porcshce |
volvo |
maxda |
renault |
mazda |
alfa-romero |
subaru |
toyouta |
mitsubishi |
dodge |
isuzu |
porsche |
vokswagen |
saab |
volkswagen |
audi |
plymouth |
chevrolet |
toyota |
nissan |
vw |
mercury |
honda |
jaguar |
"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "// get brand names from `CarName`\n",
+ "let brandNameTable = df.select('CarName').map((row) => {\n",
+ " const [carName] = row\n",
+ " const brand = carName.split(' ')[0].toLowerCase()\n",
+ " return brand\n",
+ "})\n",
+ "\n",
+ "// create a dataframe from brand names\n",
+ "let brandDf = pl.DataFrame({\n",
+ " \"brand\": brandNameTable\n",
+ "})\n",
+ "await display(brandDf.unique())"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "7f91cbc3-364c-49c9-97e3-370f78b708f8",
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "brand": "plymouth"
+ },
+ {
+ "brand": "mitsubishi"
+ },
+ {
+ "brand": "dodge"
+ },
+ {
+ "brand": "jaguar"
+ },
+ {
+ "brand": "mercury"
+ },
+ {
+ "brand": "honda"
+ },
+ {
+ "brand": "subaru"
+ },
+ {
+ "brand": "chevrolet"
+ },
+ {
+ "brand": "nissan"
+ },
+ {
+ "brand": "mazda"
+ },
+ {
+ "brand": "peugeot"
+ },
+ {
+ "brand": "alfa-romero"
+ },
+ {
+ "brand": "isuzu"
+ },
+ {
+ "brand": "audi"
+ },
+ {
+ "brand": "buick"
+ },
+ {
+ "brand": "bmw"
+ },
+ {
+ "brand": "volkswagen"
+ },
+ {
+ "brand": "saab"
+ },
+ {
+ "brand": "volvo"
+ },
+ {
+ "brand": "toyota"
+ },
+ {
+ "brand": "porsche"
+ },
+ {
+ "brand": "renault"
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand |
---|
plymouth |
mitsubishi |
dodge |
jaguar |
mercury |
honda |
subaru |
chevrolet |
nissan |
mazda |
peugeot |
alfa-romero |
isuzu |
audi |
buick |
bmw |
volkswagen |
saab |
volvo |
toyota |
porsche |
renault |
"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "// transform to remove duplicates\n",
+ "brandNameTable = brandNameTable.map((name) => {\n",
+ " name = name\n",
+ " .replace('maxda', 'mazda')\n",
+ " .replace('porcshce', 'porsche')\n",
+ " .replace('toyouta', 'toyota')\n",
+ " .replace(/(vw|vokswagen)/ig, 'volkswagen');\n",
+ " return name\n",
+ "})\n",
+ "\n",
+ "brandDf = pl.DataFrame({\n",
+ " brand: brandNameTable\n",
+ "})\n",
+ "await display(brandDf.unique())"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "eb19de54-11bb-40af-8e27-e5e3a6bd11f0",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "CarName": "alfa-romero giulia",
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "brand": "alfa-romero",
+ "car_ID": 1,
+ "carbody": "convertible",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "compressionratio": 9,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "peakrpm": 5000,
+ "price": 13495,
+ "stroke": 2.68,
+ "symboling": 3,
+ "wheelbase": 88.6
+ },
+ {
+ "CarName": "alfa-romero stelvio",
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "brand": "alfa-romero",
+ "car_ID": 2,
+ "carbody": "convertible",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "compressionratio": 9,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "peakrpm": 5000,
+ "price": 16500,
+ "stroke": 2.68,
+ "symboling": 3,
+ "wheelbase": 88.6
+ },
+ {
+ "CarName": "alfa-romero Quadrifoglio",
+ "aspiration": "std",
+ "boreratio": 2.68,
+ "brand": "alfa-romero",
+ "car_ID": 3,
+ "carbody": "hatchback",
+ "carheight": 52.4,
+ "carlength": 171.2,
+ "carwidth": 65.5,
+ "citympg": 19,
+ "compressionratio": 9,
+ "curbweight": 2823,
+ "cylindernumber": "six",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 152,
+ "enginetype": "ohcv",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 26,
+ "horsepower": 154,
+ "peakrpm": 5000,
+ "price": 16500,
+ "stroke": 3.47,
+ "symboling": 1,
+ "wheelbase": 94.5
+ },
+ {
+ "CarName": "audi 100 ls",
+ "aspiration": "std",
+ "boreratio": 3.19,
+ "brand": "audi",
+ "car_ID": 4,
+ "carbody": "sedan",
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.2,
+ "citympg": 24,
+ "compressionratio": 10,
+ "curbweight": 2337,
+ "cylindernumber": "four",
+ "doornumber": "four",
+ "drivewheel": "fwd",
+ "enginelocation": "front",
+ "enginesize": 109,
+ "enginetype": "ohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 30,
+ "horsepower": 102,
+ "peakrpm": 5500,
+ "price": 13950,
+ "stroke": 3.4,
+ "symboling": 2,
+ "wheelbase": 99.8
+ },
+ {
+ "CarName": "audi 100ls",
+ "aspiration": "std",
+ "boreratio": 3.19,
+ "brand": "audi",
+ "car_ID": 5,
+ "carbody": "sedan",
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.4,
+ "citympg": 18,
+ "compressionratio": 8,
+ "curbweight": 2824,
+ "cylindernumber": "five",
+ "doornumber": "four",
+ "drivewheel": "4wd",
+ "enginelocation": "front",
+ "enginesize": 136,
+ "enginetype": "ohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 22,
+ "horsepower": 115,
+ "peakrpm": 5500,
+ "price": 17450,
+ "stroke": 3.4,
+ "symboling": 2,
+ "wheelbase": 99.4
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "car_ID",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "symboling",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "CarName",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fueltype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "aspiration",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "doornumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carbody",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "drivewheel",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginelocation",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "wheelbase",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carlength",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carwidth",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carheight",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "curbweight",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginesize",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "boreratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "stroke",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "compressionratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "horsepower",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "peakrpm",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "citympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "highwaympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "price",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand | car_ID | symboling | CarName | fueltype | aspiration | doornumber | carbody | drivewheel | enginelocation | wheelbase | carlength | carwidth | carheight | curbweight | enginetype | cylindernumber | enginesize | fuelsystem | boreratio | stroke | compressionratio | horsepower | peakrpm | citympg | highwaympg | price |
---|
alfa-romero | 1 | 3 | alfa-romero giulia | gas | std | two | convertible | rwd | front | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 2.68 | 9 | 111 | 5000 | 21 | 27 | 13495 |
alfa-romero | 2 | 3 | alfa-romero stelvio | gas | std | two | convertible | rwd | front | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 2.68 | 9 | 111 | 5000 | 21 | 27 | 16500 |
alfa-romero | 3 | 1 | alfa-romero Quadrifoglio | gas | std | two | hatchback | rwd | front | 94.5 | 171.2 | 65.5 | 52.4 | 2823 | ohcv | six | 152 | mpfi | 2.68 | 3.47 | 9 | 154 | 5000 | 19 | 26 | 16500 |
audi | 4 | 2 | audi 100 ls | gas | std | four | sedan | fwd | front | 99.8 | 176.6 | 66.2 | 54.3 | 2337 | ohc | four | 109 | mpfi | 3.19 | 3.4 | 10 | 102 | 5500 | 24 | 30 | 13950 |
audi | 5 | 2 | audi 100ls | gas | std | four | sedan | 4wd | front | 99.4 | 176.6 | 66.4 | 54.3 | 2824 | ohc | five | 136 | mpfi | 3.19 | 3.4 | 8 | 115 | 5500 | 18 | 22 | 17450 |
"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "// add new column `brand` to our dataframe\n",
+ "df = brandDf.hstack(df)\n",
+ "await display(df.head(5))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "81abdb0d-41ce-445c-9a75-f9494eb1f9d3",
+ "metadata": {},
+ "source": [
+ "Drop unnecessary values, and write to the new file:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "id": "6da96c06-b0b6-46b7-be2d-824af909aec4",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "brand": "alfa-romero",
+ "carbody": "convertible",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "compressionratio": 9,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "peakrpm": 5000,
+ "price": 13495,
+ "stroke": 2.68,
+ "wheelbase": 88.6
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "brand": "alfa-romero",
+ "carbody": "convertible",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "compressionratio": 9,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "peakrpm": 5000,
+ "price": 16500,
+ "stroke": 2.68,
+ "wheelbase": 88.6
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 2.68,
+ "brand": "alfa-romero",
+ "carbody": "hatchback",
+ "carheight": 52.4,
+ "carlength": 171.2,
+ "carwidth": 65.5,
+ "citympg": 19,
+ "compressionratio": 9,
+ "curbweight": 2823,
+ "cylindernumber": "six",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 152,
+ "enginetype": "ohcv",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 26,
+ "horsepower": 154,
+ "peakrpm": 5000,
+ "price": 16500,
+ "stroke": 3.47,
+ "wheelbase": 94.5
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fueltype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "aspiration",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "doornumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carbody",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "drivewheel",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginelocation",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "wheelbase",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carlength",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carwidth",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carheight",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "curbweight",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginesize",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "boreratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "stroke",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "compressionratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "horsepower",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "peakrpm",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "citympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "highwaympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "price",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand | fueltype | aspiration | doornumber | carbody | drivewheel | enginelocation | wheelbase | carlength | carwidth | carheight | curbweight | enginetype | cylindernumber | enginesize | fuelsystem | boreratio | stroke | compressionratio | horsepower | peakrpm | citympg | highwaympg | price |
---|
alfa-romero | gas | std | two | convertible | rwd | front | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 2.68 | 9 | 111 | 5000 | 21 | 27 | 13495 |
alfa-romero | gas | std | two | convertible | rwd | front | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 2.68 | 9 | 111 | 5000 | 21 | 27 | 16500 |
alfa-romero | gas | std | two | hatchback | rwd | front | 94.5 | 171.2 | 65.5 | 52.4 | 2823 | ohcv | six | 152 | mpfi | 2.68 | 3.47 | 9 | 154 | 5000 | 19 | 26 | 16500 |
"
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "df = df.drop('car_ID', 'symboling', 'CarName')\n",
+ "df.head(3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0f827b40-99b5-445d-b339-2bb55b9d6686",
+ "metadata": {},
+ "source": [
+ "- Use df.groupBy(...cols) in order to get aggregates form the dataset:\n",
+ "\n",
+ "Count cars by brand:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "id": "7512602c-6ce4-4167-9f74-78bc5e8c0332",
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "brand": "mercury",
+ "brand_count": 1
+ },
+ {
+ "brand": "renault",
+ "brand_count": 2
+ },
+ {
+ "brand": "chevrolet",
+ "brand_count": 3
+ },
+ {
+ "brand": "alfa-romero",
+ "brand_count": 3
+ },
+ {
+ "brand": "jaguar",
+ "brand_count": 3
+ },
+ {
+ "brand": "isuzu",
+ "brand_count": 4
+ },
+ {
+ "brand": "porsche",
+ "brand_count": 5
+ },
+ {
+ "brand": "saab",
+ "brand_count": 6
+ },
+ {
+ "brand": "audi",
+ "brand_count": 7
+ },
+ {
+ "brand": "plymouth",
+ "brand_count": 7
+ },
+ {
+ "brand": "bmw",
+ "brand_count": 8
+ },
+ {
+ "brand": "buick",
+ "brand_count": 8
+ },
+ {
+ "brand": "dodge",
+ "brand_count": 9
+ },
+ {
+ "brand": "volvo",
+ "brand_count": 11
+ },
+ {
+ "brand": "peugeot",
+ "brand_count": 11
+ },
+ {
+ "brand": "subaru",
+ "brand_count": 12
+ },
+ {
+ "brand": "volkswagen",
+ "brand_count": 12
+ },
+ {
+ "brand": "honda",
+ "brand_count": 13
+ },
+ {
+ "brand": "mitsubishi",
+ "brand_count": 13
+ },
+ {
+ "brand": "mazda",
+ "brand_count": 17
+ },
+ {
+ "brand": "nissan",
+ "brand_count": 18
+ },
+ {
+ "brand": "toyota",
+ "brand_count": 32
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand_count",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand | brand_count |
---|
mercury | 1 |
renault | 2 |
chevrolet | 3 |
alfa-romero | 3 |
jaguar | 3 |
isuzu | 4 |
porsche | 5 |
saab | 6 |
audi | 7 |
plymouth | 7 |
bmw | 8 |
buick | 8 |
dodge | 9 |
volvo | 11 |
peugeot | 11 |
subaru | 12 |
volkswagen | 12 |
honda | 13 |
mitsubishi | 13 |
mazda | 17 |
nissan | 18 |
toyota | 32 |
"
+ ]
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "let brandCount = df.groupBy('brand').len().sort('brand_count')\n",
+ "brandCount"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "id": "44b5baf0-cbd2-48d7-a28b-e871682bbaf0",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "brand": null,
+ "describe": "mean",
+ "price": 15079.87737191671
+ },
+ {
+ "brand": null,
+ "describe": "std",
+ "price": 8738.804703803095
+ },
+ {
+ "brand": "alfa-romero",
+ "describe": "min",
+ "price": 6007
+ },
+ {
+ "brand": "volvo",
+ "describe": "max",
+ "price": 34600
+ },
+ {
+ "brand": null,
+ "describe": "median",
+ "price": 10534.274509803921
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "describe",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "price",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "describe | brand | price |
---|
mean | null | 15079.87737191671 |
std | null | 8738.804703803095 |
min | alfa-romero | 6007 |
max | volvo | 34600 |
median | null | 10534.274509803921 |
"
+ ]
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "let avgPricePerBrand = df.groupBy('brand').agg({'price': ['mean']})\n",
+ "avgPricePerBrand.describe()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "id": "98a18f05-665f-4143-b5d5-6ecda68ca2df",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{\n",
+ " jaguar: \u001b[33m34600\u001b[39m,\n",
+ " subaru: \u001b[33m8541.25\u001b[39m,\n",
+ " buick: \u001b[33m33647\u001b[39m,\n",
+ " audi: \u001b[33m17859.166714285715\u001b[39m,\n",
+ " mitsubishi: \u001b[33m9239.76923076923\u001b[39m,\n",
+ " mazda: \u001b[33m10652.882352941177\u001b[39m,\n",
+ " dodge: \u001b[33m7875.444444444444\u001b[39m,\n",
+ " peugeot: \u001b[33m15489.09090909091\u001b[39m,\n",
+ " volkswagen: \u001b[33m10077.5\u001b[39m,\n",
+ " renault: \u001b[33m9595\u001b[39m,\n",
+ " honda: \u001b[33m8184.692307692308\u001b[39m,\n",
+ " \u001b[32m\"alfa-romero\"\u001b[39m: \u001b[33m15498.333333333334\u001b[39m,\n",
+ " saab: \u001b[33m15223.333333333334\u001b[39m,\n",
+ " bmw: \u001b[33m26118.75\u001b[39m,\n",
+ " isuzu: \u001b[33m8916.5\u001b[39m,\n",
+ " porsche: \u001b[33m31400.5\u001b[39m,\n",
+ " nissan: \u001b[33m10415.666666666666\u001b[39m,\n",
+ " volvo: \u001b[33m18063.18181818182\u001b[39m,\n",
+ " toyota: \u001b[33m9885.8125\u001b[39m,\n",
+ " chevrolet: \u001b[33m6007\u001b[39m,\n",
+ " mercury: \u001b[33m16503\u001b[39m,\n",
+ " plymouth: \u001b[33m7963.428571428572\u001b[39m\n",
+ "}"
+ ]
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "// map brand name to price\n",
+ "avgPricePerBrand = avgPricePerBrand\n",
+ " .toRecords()\n",
+ " .reduce((acc, rec) => ({...acc, [rec.brand]: rec.price}), {})"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "id": "9e7dd2b4-4356-41ad-bd1e-20b7938f55f0",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "brand_category": "Budget"
+ },
+ {
+ "brand_category": "Mid_Range"
+ },
+ {
+ "brand_category": "Mid_Range"
+ },
+ {
+ "brand_category": "Luxury"
+ },
+ {
+ "brand_category": "Budget"
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand_category",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand_category |
---|
Budget |
Mid_Range |
Mid_Range |
Luxury |
Budget |
"
+ ]
+ },
+ "execution_count": 11,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "// create brand categories by budget\n",
+ "let brandCategory = df.brand.toArray().map((brand) => {\n",
+ " const avgPrice = avgPricePerBrand[brand]\n",
+ " return avgPrice < 10000 ? \"Budget\" : avgPrice > 20000 ? \"Luxury\" : \"Mid_Range\"\n",
+ "})\n",
+ "let catDf = pl.DataFrame({\n",
+ " \"brand_category\": brandCategory\n",
+ "})\n",
+ "\n",
+ "catDf.sample(5)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "14930aef-1fc0-4baf-92bf-8a093c3d2e86",
+ "metadata": {},
+ "source": [
+ "Write the cleaned dataset to a new file:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "id": "350c57c7-ec9e-400d-a8e7-19301c720c56",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "df = catDf.hstack(df)\n",
+ "df.writeCSV('assets/cleaned_car_prices.csv')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0ea22d38-cb20-47a0-8f92-422bc5925abf",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "## Exploratory Data Analysis\n",
+ "\n",
+ "For plotting we use [@observable/plot](https://observablehq.com/plot) and configured shotcuts for jupyter notebooks imported from [l12.xyz/x/shortcuts](https://l12.xyz/x/shortcuts)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "id": "2fed060e-1785-4dc1-ba44-4bcd5cee92f6",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/svg+xml": [
+ ""
+ ]
+ },
+ "execution_count": 13,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import {Plot, document} from 'https://l12.xyz/x/shortcuts/raw/branch/main/plots.ts?95'\n",
+ "\n",
+ "const brandCountRecords = brandCount.toRecords()\n",
+ "\n",
+ "const brandCountPlot = Plot.plot({\n",
+ " marginLeft: 80,\n",
+ " style: {\n",
+ " backgroundColor: \"#fff\"\n",
+ " },\n",
+ " x: {padding: 0.4},\n",
+ " marks: [\n",
+ " Plot.barX(brandCountRecords, {x: \"brand_count\", y: \"brand\", sort: {y: \"x\", order: \"descending\"}}),\n",
+ " ],\n",
+ " document\n",
+ "})\n",
+ "await display(brandCountPlot)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "id": "e21f5bdf-a5a8-43b2-855b-0eb079656da7",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[\n",
+ " \u001b[32m\"wheelbase\"\u001b[39m, \u001b[32m\"carlength\"\u001b[39m,\n",
+ " \u001b[32m\"carwidth\"\u001b[39m, \u001b[32m\"carheight\"\u001b[39m,\n",
+ " \u001b[32m\"curbweight\"\u001b[39m, \u001b[32m\"enginesize\"\u001b[39m,\n",
+ " \u001b[32m\"boreratio\"\u001b[39m, \u001b[32m\"stroke\"\u001b[39m,\n",
+ " \u001b[32m\"compressionratio\"\u001b[39m, \u001b[32m\"horsepower\"\u001b[39m,\n",
+ " \u001b[32m\"peakrpm\"\u001b[39m, \u001b[32m\"citympg\"\u001b[39m,\n",
+ " \u001b[32m\"highwaympg\"\u001b[39m\n",
+ "]"
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "let numericColumns = df.columns.filter((col) => df[col].isNumeric() && col !== 'price')\n",
+ "numericColumns"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1c8d3b90-b4b1-4da6-9e7c-f8fd7cffb77d",
+ "metadata": {},
+ "source": [
+ "Sometimes we can get some intuitive insight seeing the data plotted from different dimensions. It is an optional step, but it might help to get some assumtions about the relationships in the dataset. Below is an example for drawing plots side-by-side."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "id": "9a82f623-b39a-473a-91b9-0a0347c64c63",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ "execution_count": 15,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import { sideBySidePlot } from 'https://l12.xyz/x/shortcuts/raw/plots.ts?95'\n",
+ "\n",
+ "let records = df.toRecords();\n",
+ "\n",
+ "const plt = sideBySidePlot({\n",
+ " x: numericColumns,\n",
+ " y: ['price'],\n",
+ " marks: [\n",
+ " (x, y) => Plot.dot(records, {x, y}),\n",
+ " (x, y) => Plot.linearRegressionY(records, {x, y, stroke: \"red\"}),\n",
+ " ],\n",
+ " cols: 3\n",
+ "})\n",
+ "\n",
+ "await display(\n",
+ " plt,\n",
+ ");"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "53d04850-df05-474c-8568-a5f7c97146f3",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "Let's view the list of top features that have high correlation coefficient. The pearsonCorr() function calculates the Pearson'r correlation coefficients with respect to the 'price'."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "id": "924838be-1b4d-4edf-abe5-8bf02e02cf11",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "Variable": "enginesize",
+ "idx (price)": 0.8741448025245117
+ },
+ {
+ "Variable": "curbweight",
+ "idx (price)": 0.8353048793372955
+ },
+ {
+ "Variable": "horsepower",
+ "idx (price)": 0.8081388225362217
+ },
+ {
+ "Variable": "carwidth",
+ "idx (price)": 0.7593252997414263
+ },
+ {
+ "Variable": "carlength",
+ "idx (price)": 0.6829200156779843
+ },
+ {
+ "Variable": "wheelbase",
+ "idx (price)": 0.5778155982921477
+ },
+ {
+ "Variable": "boreratio",
+ "idx (price)": 0.5531732367984261
+ },
+ {
+ "Variable": "carheight",
+ "idx (price)": 0.11933622657047727
+ },
+ {
+ "Variable": "stroke",
+ "idx (price)": 0.07944308388192935
+ },
+ {
+ "Variable": "compressionratio",
+ "idx (price)": 0.06798350579944248
+ },
+ {
+ "Variable": "peakrpm",
+ "idx (price)": -0.0852671502778569
+ },
+ {
+ "Variable": "citympg",
+ "idx (price)": -0.6857513360270401
+ },
+ {
+ "Variable": "highwaympg",
+ "idx (price)": -0.6975990916465564
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "Variable",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "idx (price)",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "Variable | idx (price) |
---|
enginesize | 0.8741448025245117 |
curbweight | 0.8353048793372955 |
horsepower | 0.8081388225362217 |
carwidth | 0.7593252997414263 |
carlength | 0.6829200156779843 |
wheelbase | 0.5778155982921477 |
boreratio | 0.5531732367984261 |
carheight | 0.11933622657047727 |
stroke | 0.07944308388192935 |
compressionratio | 0.06798350579944248 |
peakrpm | -0.0852671502778569 |
citympg | -0.6857513360270401 |
highwaympg | -0.6975990916465564 |
"
+ ]
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "// we select pearon's idx from dataframe for all numeric cols, \n",
+ "// then we transpose result so that columns become rows, \n",
+ "// then we sort by the idx column\n",
+ "df.select(\n",
+ " ...numericColumns.map((col) => pl.pearsonCorr(col, 'price'))\n",
+ ")\n",
+ " .transpose({\n",
+ " columnNames: [\"idx (price)\"],\n",
+ " headerName: \"Variable\",\n",
+ " includeHeader: true\n",
+ " })\n",
+ " .sort('idx (price)', true)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "63bc6b92-5ab9-43e0-a957-57d895bc60f9",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "### Linearity Assumption\n",
+ "\n",
+ "Linear regression needs the relationship between independent variable and the dependent variable to be linear. We can test this assumption with some scatter plots and regression lines.\n",
+ "\n",
+ "** Here we use the same side-by-side plot shortcut, but for selected varisbles with high correlation coefficent.\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "id": "2d5a635a-c819-4989-9818-a1927363993d",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ " \n",
+ " "
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "const plt = sideBySidePlot({\n",
+ " x: ['enginesize', 'curbweight', 'horsepower', 'carwidth'],\n",
+ " y: ['price'],\n",
+ " marks: [\n",
+ " (x, y) => Plot.dot(records, {x, y}),\n",
+ " (x, y) => Plot.linearRegressionY(records, {x, y, stroke: \"red\"}),\n",
+ " ],\n",
+ " cols: 2\n",
+ "})\n",
+ "\n",
+ "await display(\n",
+ " plt,\n",
+ ");"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0a351f17-309b-444b-b4a8-26500b077e47",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "### Homoscedasticity\n",
+ "\n",
+ "The assumption of homoscedasticity (constant variance), is crucial to linear regression models. Homoscedasticity describes a situation in which the error term or variance or the \"noise\" or random disturbance in the relationship between the independent variables and the dependent variable is the same across all values of the independent variable. In other words, there is a constant variance present in the response variable as the predictor variable increases. If the \"noise\" is not the same across the values of an independent variable, we call it heteroscedasticity, opposite of homoscedasticity. \n",
+ "\n",
+ "#### Residuals\n",
+ "\n",
+ "Next we apply residual expression to 'price' and 'enginesize' varibles in order to check this assumption.\n",
+ "[The residuals function](https://l12.xyz/x/shortcuts/src/branch/main/expr.ts) uses mean squared."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "id": "fc9a31c3-6ac0-4058-b5bb-341eb1c40dd1",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "image/svg+xml": [
+ ""
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import { residuals } from 'https://l12.xyz/x/shortcuts/raw/expr.ts'\n",
+ "\n",
+ "let residualDf = df.select(\n",
+ " 'enginesize', \n",
+ " residuals(pl.col('enginesize'), pl.col('price'))\n",
+ ")\n",
+ "\n",
+ "let residPlot = Plot.plot({\n",
+ " x: \"enginesize\", \n",
+ " y: \"price\",\n",
+ " marks: [\n",
+ " Plot.dot(residualDf.toRecords(), { x: \"enginesize\", y: \"price\"}),\n",
+ " Plot.ruleY([0], {stroke: '#ccc'})\n",
+ " ],\n",
+ " document\n",
+ "})\n",
+ "\n",
+ "await display(residPlot)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "29a0ec4e-084c-4af6-9af6-a14ae5cee4e7",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "From the above plot, we can tell the error variance across the true line is dispersed somewhat not uniformly, but in a funnel like shape. So, the assumption of the *homoscedasticity* is more likely not met.\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "33d787f3-2a7b-421c-9d9b-a86719a92f9a",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "## Normality\n",
+ "\n",
+ "The linear regression analysis requires the dependent variable, 'price', to be normally distributed. A histogram, box plot, or a Q-Q-Plot can check if the target variable is normally distributed. The goodness of fit test, e.g., the Kolmogorov-Smirnov test can check for normality in the dependent variable. [This documentation](https://towardsdatascience.com/normality-tests-in-python-31e04aa4f411) contains more information on the normality assumption. \n",
+ "\n",
+ "Let's display all three charts to show how our target variable, 'price' behaves."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "id": "b94d0d8d-ae95-41f5-b17f-0ab9b3aa27ec",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ " \n",
+ " "
+ ]
+ },
+ "execution_count": 19,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import { threeChart } from './plots.ts?15'\n",
+ "\n",
+ "await display(threeChart(records, \"price\"))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "81fe890e-56c4-4076-b57c-38fe438c0ead",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "These three charts above can tell us a lot about our target variable:\n",
+ "\n",
+ "- Our target variable, 'price' is not normally distributed\n",
+ "- Our target variable is right-skewed\n",
+ "- There are some outliers in the variable\n",
+ "\n",
+ "The right-skewed plot means that most prices in the dataset are on the lower end (below 15,000). The 'max' value is very far from the '75%' quantile statistic. All these plots show that the assumption for accurate linear regression modeling is not met. \n",
+ "\n",
+ "Next, we will perform the log transformation to correct our target variable and to make it more normally distributed."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "id": "20b0317a-5807-4f28-9008-8540e5ee056a",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "\u001b[33m0.8006648595531076\u001b[39m"
+ ]
+ },
+ "execution_count": 20,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import {ShapiroWilkW} from \"./normality.ts?18\"\n",
+ "\n",
+ "ShapiroWilkW(df.price.sort())"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "id": "8f8c6044-d3a1-4f8e-89ba-365fea3fbd8b",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ " \n",
+ " "
+ ]
+ },
+ "execution_count": 21,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "let log2df = df.select(pl.col(\"price\").log())\n",
+ "\n",
+ "await display(threeChart(log2df.toRecords(), \"price\"))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "id": "9bdeba3c-2eac-44bc-8601-8241c5bfe502",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "\u001b[33m0.948674582545282\u001b[39m"
+ ]
+ },
+ "execution_count": 22,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "ShapiroWilkW(log2df.price.sort())"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "09a9d9c0-7fb6-4353-91f8-4899520b36d7",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "## Data Encoding"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "id": "79f05578-b839-4278-afb1-0123c1d32d17",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "brand": "alfa-romero",
+ "brand_category": "Mid_Range",
+ "carbody": "convertible",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "compressionratio": 9,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "peakrpm": 5000,
+ "price": 13495,
+ "stroke": 2.68,
+ "wheelbase": 88.6
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "brand": "alfa-romero",
+ "brand_category": "Mid_Range",
+ "carbody": "convertible",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "compressionratio": 9,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "peakrpm": 5000,
+ "price": 16500,
+ "stroke": 2.68,
+ "wheelbase": 88.6
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 2.68,
+ "brand": "alfa-romero",
+ "brand_category": "Mid_Range",
+ "carbody": "hatchback",
+ "carheight": 52.4,
+ "carlength": 171.2,
+ "carwidth": 65.5,
+ "citympg": 19,
+ "compressionratio": 9,
+ "curbweight": 2823,
+ "cylindernumber": "six",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginelocation": "front",
+ "enginesize": 152,
+ "enginetype": "ohcv",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 26,
+ "horsepower": 154,
+ "peakrpm": 5000,
+ "price": 16500,
+ "stroke": 3.47,
+ "wheelbase": 94.5
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 3.19,
+ "brand": "audi",
+ "brand_category": "Mid_Range",
+ "carbody": "sedan",
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.2,
+ "citympg": 24,
+ "compressionratio": 10,
+ "curbweight": 2337,
+ "cylindernumber": "four",
+ "doornumber": "four",
+ "drivewheel": "fwd",
+ "enginelocation": "front",
+ "enginesize": 109,
+ "enginetype": "ohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 30,
+ "horsepower": 102,
+ "peakrpm": 5500,
+ "price": 13950,
+ "stroke": 3.4,
+ "wheelbase": 99.8
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 3.19,
+ "brand": "audi",
+ "brand_category": "Mid_Range",
+ "carbody": "sedan",
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.4,
+ "citympg": 18,
+ "compressionratio": 8,
+ "curbweight": 2824,
+ "cylindernumber": "five",
+ "doornumber": "four",
+ "drivewheel": "4wd",
+ "enginelocation": "front",
+ "enginesize": 136,
+ "enginetype": "ohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 22,
+ "horsepower": 115,
+ "peakrpm": 5500,
+ "price": 17450,
+ "stroke": 3.4,
+ "wheelbase": 99.4
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand_category",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fueltype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "aspiration",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "doornumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carbody",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "drivewheel",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginelocation",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "wheelbase",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carlength",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carwidth",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carheight",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "curbweight",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginesize",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "boreratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "stroke",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "compressionratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "horsepower",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "peakrpm",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "citympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "highwaympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "price",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand_category | brand | fueltype | aspiration | doornumber | carbody | drivewheel | enginelocation | wheelbase | carlength | carwidth | carheight | curbweight | enginetype | cylindernumber | enginesize | fuelsystem | boreratio | stroke | compressionratio | horsepower | peakrpm | citympg | highwaympg | price |
---|
Mid_Range | alfa-romero | gas | std | two | convertible | rwd | front | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 2.68 | 9 | 111 | 5000 | 21 | 27 | 13495 |
Mid_Range | alfa-romero | gas | std | two | convertible | rwd | front | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 2.68 | 9 | 111 | 5000 | 21 | 27 | 16500 |
Mid_Range | alfa-romero | gas | std | two | hatchback | rwd | front | 94.5 | 171.2 | 65.5 | 52.4 | 2823 | ohcv | six | 152 | mpfi | 2.68 | 3.47 | 9 | 154 | 5000 | 19 | 26 | 16500 |
Mid_Range | audi | gas | std | four | sedan | fwd | front | 99.8 | 176.6 | 66.2 | 54.3 | 2337 | ohc | four | 109 | mpfi | 3.19 | 3.4 | 10 | 102 | 5500 | 24 | 30 | 13950 |
Mid_Range | audi | gas | std | four | sedan | 4wd | front | 99.4 | 176.6 | 66.4 | 54.3 | 2824 | ohc | five | 136 | mpfi | 3.19 | 3.4 | 8 | 115 | 5500 | 18 | 22 | 17450 |
"
+ ]
+ },
+ "execution_count": 23,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "let carData = pl.readCSV(\n",
+ " await Deno.readTextFile('assets/cleaned_car_prices.csv'),\n",
+ " { sep: \",\" }\n",
+ ")\n",
+ "\n",
+ "carData.head(5)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "af6eb67c-574a-430a-a04c-24d0ef9f35fa",
+ "metadata": {},
+ "source": [
+ "We'll drop some unnecessary columns:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "id": "e2df0c3f-dbc0-4820-b807-373ce3787645",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "brand_category": "Mid_Range",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "price": 13495,
+ "wheelbase": 88.6
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 3.47,
+ "brand_category": "Mid_Range",
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "curbweight": 2548,
+ "cylindernumber": "four",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginesize": 130,
+ "enginetype": "dohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 27,
+ "horsepower": 111,
+ "price": 16500,
+ "wheelbase": 88.6
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 2.68,
+ "brand_category": "Mid_Range",
+ "carheight": 52.4,
+ "carlength": 171.2,
+ "carwidth": 65.5,
+ "citympg": 19,
+ "curbweight": 2823,
+ "cylindernumber": "six",
+ "doornumber": "two",
+ "drivewheel": "rwd",
+ "enginesize": 152,
+ "enginetype": "ohcv",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 26,
+ "horsepower": 154,
+ "price": 16500,
+ "wheelbase": 94.5
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 3.19,
+ "brand_category": "Mid_Range",
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.2,
+ "citympg": 24,
+ "curbweight": 2337,
+ "cylindernumber": "four",
+ "doornumber": "four",
+ "drivewheel": "fwd",
+ "enginesize": 109,
+ "enginetype": "ohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 30,
+ "horsepower": 102,
+ "price": 13950,
+ "wheelbase": 99.8
+ },
+ {
+ "aspiration": "std",
+ "boreratio": 3.19,
+ "brand_category": "Mid_Range",
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.4,
+ "citympg": 18,
+ "curbweight": 2824,
+ "cylindernumber": "five",
+ "doornumber": "four",
+ "drivewheel": "4wd",
+ "enginesize": 136,
+ "enginetype": "ohc",
+ "fuelsystem": "mpfi",
+ "fueltype": "gas",
+ "highwaympg": 22,
+ "horsepower": 115,
+ "price": 17450,
+ "wheelbase": 99.4
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand_category",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fueltype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "aspiration",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "doornumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "drivewheel",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "wheelbase",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carlength",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carwidth",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carheight",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "curbweight",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginesize",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem",
+ "rdfType": null,
+ "title": null,
+ "type": "string"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "boreratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "horsepower",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "citympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "highwaympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "price",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand_category | fueltype | aspiration | doornumber | drivewheel | wheelbase | carlength | carwidth | carheight | curbweight | enginetype | cylindernumber | enginesize | fuelsystem | boreratio | horsepower | citympg | highwaympg | price |
---|
Mid_Range | gas | std | two | rwd | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 111 | 21 | 27 | 13495 |
Mid_Range | gas | std | two | rwd | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | dohc | four | 130 | mpfi | 3.47 | 111 | 21 | 27 | 16500 |
Mid_Range | gas | std | two | rwd | 94.5 | 171.2 | 65.5 | 52.4 | 2823 | ohcv | six | 152 | mpfi | 2.68 | 154 | 19 | 26 | 16500 |
Mid_Range | gas | std | four | fwd | 99.8 | 176.6 | 66.2 | 54.3 | 2337 | ohc | four | 109 | mpfi | 3.19 | 102 | 24 | 30 | 13950 |
Mid_Range | gas | std | four | 4wd | 99.4 | 176.6 | 66.4 | 54.3 | 2824 | ohc | five | 136 | mpfi | 3.19 | 115 | 18 | 22 | 17450 |
"
+ ]
+ },
+ "execution_count": 24,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "let carDataGeneralized = carData.drop('brand', 'carbody', 'enginelocation', 'stroke', 'compressionratio', 'peakrpm')\n",
+ "carDataGeneralized.head(5)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "826ab213-65a2-43d0-b9ce-fecdebd79eb8",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "source": [
+ "Next we use one hot (binary) encoding. We assume that all non-numeric colums are categorical."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "id": "9bc95dd8-0240-45c6-a0f9-21b1873ae04b",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.dataresource+json": {
+ "bytes": null,
+ "data": [
+ {
+ "aspiration_std": 1,
+ "aspiration_turbo": 0,
+ "boreratio": 3.47,
+ "brand_category_Budget": 0,
+ "brand_category_Luxury": 0,
+ "brand_category_Mid_Range": 1,
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "curbweight": 2548,
+ "cylindernumber_eight": 0,
+ "cylindernumber_five": 0,
+ "cylindernumber_four": 1,
+ "cylindernumber_six": 0,
+ "cylindernumber_three": 0,
+ "cylindernumber_twelve": 0,
+ "cylindernumber_two": 0,
+ "doornumber_four": 0,
+ "doornumber_two": 1,
+ "drivewheel_4wd": 0,
+ "drivewheel_fwd": 0,
+ "drivewheel_rwd": 1,
+ "enginesize": 130,
+ "enginetype_dohc": 1,
+ "enginetype_dohcv": 0,
+ "enginetype_l": 0,
+ "enginetype_ohc": 0,
+ "enginetype_ohcf": 0,
+ "enginetype_ohcv": 0,
+ "enginetype_rotor": 0,
+ "fuelsystem_1bbl": 0,
+ "fuelsystem_2bbl": 0,
+ "fuelsystem_4bbl": 0,
+ "fuelsystem_idi": 0,
+ "fuelsystem_mfi": 0,
+ "fuelsystem_mpfi": 1,
+ "fuelsystem_spdi": 0,
+ "fuelsystem_spfi": 0,
+ "fueltype_diesel": 0,
+ "fueltype_gas": 1,
+ "highwaympg": 27,
+ "horsepower": 111,
+ "price": 13495,
+ "wheelbase": 88.6
+ },
+ {
+ "aspiration_std": 1,
+ "aspiration_turbo": 0,
+ "boreratio": 3.47,
+ "brand_category_Budget": 0,
+ "brand_category_Luxury": 0,
+ "brand_category_Mid_Range": 1,
+ "carheight": 48.8,
+ "carlength": 168.8,
+ "carwidth": 64.1,
+ "citympg": 21,
+ "curbweight": 2548,
+ "cylindernumber_eight": 0,
+ "cylindernumber_five": 0,
+ "cylindernumber_four": 1,
+ "cylindernumber_six": 0,
+ "cylindernumber_three": 0,
+ "cylindernumber_twelve": 0,
+ "cylindernumber_two": 0,
+ "doornumber_four": 0,
+ "doornumber_two": 1,
+ "drivewheel_4wd": 0,
+ "drivewheel_fwd": 0,
+ "drivewheel_rwd": 1,
+ "enginesize": 130,
+ "enginetype_dohc": 1,
+ "enginetype_dohcv": 0,
+ "enginetype_l": 0,
+ "enginetype_ohc": 0,
+ "enginetype_ohcf": 0,
+ "enginetype_ohcv": 0,
+ "enginetype_rotor": 0,
+ "fuelsystem_1bbl": 0,
+ "fuelsystem_2bbl": 0,
+ "fuelsystem_4bbl": 0,
+ "fuelsystem_idi": 0,
+ "fuelsystem_mfi": 0,
+ "fuelsystem_mpfi": 1,
+ "fuelsystem_spdi": 0,
+ "fuelsystem_spfi": 0,
+ "fueltype_diesel": 0,
+ "fueltype_gas": 1,
+ "highwaympg": 27,
+ "horsepower": 111,
+ "price": 16500,
+ "wheelbase": 88.6
+ },
+ {
+ "aspiration_std": 1,
+ "aspiration_turbo": 0,
+ "boreratio": 2.68,
+ "brand_category_Budget": 0,
+ "brand_category_Luxury": 0,
+ "brand_category_Mid_Range": 1,
+ "carheight": 52.4,
+ "carlength": 171.2,
+ "carwidth": 65.5,
+ "citympg": 19,
+ "curbweight": 2823,
+ "cylindernumber_eight": 0,
+ "cylindernumber_five": 0,
+ "cylindernumber_four": 0,
+ "cylindernumber_six": 1,
+ "cylindernumber_three": 0,
+ "cylindernumber_twelve": 0,
+ "cylindernumber_two": 0,
+ "doornumber_four": 0,
+ "doornumber_two": 1,
+ "drivewheel_4wd": 0,
+ "drivewheel_fwd": 0,
+ "drivewheel_rwd": 1,
+ "enginesize": 152,
+ "enginetype_dohc": 0,
+ "enginetype_dohcv": 0,
+ "enginetype_l": 0,
+ "enginetype_ohc": 0,
+ "enginetype_ohcf": 0,
+ "enginetype_ohcv": 1,
+ "enginetype_rotor": 0,
+ "fuelsystem_1bbl": 0,
+ "fuelsystem_2bbl": 0,
+ "fuelsystem_4bbl": 0,
+ "fuelsystem_idi": 0,
+ "fuelsystem_mfi": 0,
+ "fuelsystem_mpfi": 1,
+ "fuelsystem_spdi": 0,
+ "fuelsystem_spfi": 0,
+ "fueltype_diesel": 0,
+ "fueltype_gas": 1,
+ "highwaympg": 26,
+ "horsepower": 154,
+ "price": 16500,
+ "wheelbase": 94.5
+ },
+ {
+ "aspiration_std": 1,
+ "aspiration_turbo": 0,
+ "boreratio": 3.19,
+ "brand_category_Budget": 0,
+ "brand_category_Luxury": 0,
+ "brand_category_Mid_Range": 1,
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.2,
+ "citympg": 24,
+ "curbweight": 2337,
+ "cylindernumber_eight": 0,
+ "cylindernumber_five": 0,
+ "cylindernumber_four": 1,
+ "cylindernumber_six": 0,
+ "cylindernumber_three": 0,
+ "cylindernumber_twelve": 0,
+ "cylindernumber_two": 0,
+ "doornumber_four": 1,
+ "doornumber_two": 0,
+ "drivewheel_4wd": 0,
+ "drivewheel_fwd": 1,
+ "drivewheel_rwd": 0,
+ "enginesize": 109,
+ "enginetype_dohc": 0,
+ "enginetype_dohcv": 0,
+ "enginetype_l": 0,
+ "enginetype_ohc": 1,
+ "enginetype_ohcf": 0,
+ "enginetype_ohcv": 0,
+ "enginetype_rotor": 0,
+ "fuelsystem_1bbl": 0,
+ "fuelsystem_2bbl": 0,
+ "fuelsystem_4bbl": 0,
+ "fuelsystem_idi": 0,
+ "fuelsystem_mfi": 0,
+ "fuelsystem_mpfi": 1,
+ "fuelsystem_spdi": 0,
+ "fuelsystem_spfi": 0,
+ "fueltype_diesel": 0,
+ "fueltype_gas": 1,
+ "highwaympg": 30,
+ "horsepower": 102,
+ "price": 13950,
+ "wheelbase": 99.8
+ },
+ {
+ "aspiration_std": 1,
+ "aspiration_turbo": 0,
+ "boreratio": 3.19,
+ "brand_category_Budget": 0,
+ "brand_category_Luxury": 0,
+ "brand_category_Mid_Range": 1,
+ "carheight": 54.3,
+ "carlength": 176.6,
+ "carwidth": 66.4,
+ "citympg": 18,
+ "curbweight": 2824,
+ "cylindernumber_eight": 0,
+ "cylindernumber_five": 1,
+ "cylindernumber_four": 0,
+ "cylindernumber_six": 0,
+ "cylindernumber_three": 0,
+ "cylindernumber_twelve": 0,
+ "cylindernumber_two": 0,
+ "doornumber_four": 1,
+ "doornumber_two": 0,
+ "drivewheel_4wd": 1,
+ "drivewheel_fwd": 0,
+ "drivewheel_rwd": 0,
+ "enginesize": 136,
+ "enginetype_dohc": 0,
+ "enginetype_dohcv": 0,
+ "enginetype_l": 0,
+ "enginetype_ohc": 1,
+ "enginetype_ohcf": 0,
+ "enginetype_ohcv": 0,
+ "enginetype_rotor": 0,
+ "fuelsystem_1bbl": 0,
+ "fuelsystem_2bbl": 0,
+ "fuelsystem_4bbl": 0,
+ "fuelsystem_idi": 0,
+ "fuelsystem_mfi": 0,
+ "fuelsystem_mpfi": 1,
+ "fuelsystem_spdi": 0,
+ "fuelsystem_spfi": 0,
+ "fueltype_diesel": 0,
+ "fueltype_gas": 1,
+ "highwaympg": 22,
+ "horsepower": 115,
+ "price": 17450,
+ "wheelbase": 99.4
+ }
+ ],
+ "description": null,
+ "dialect": null,
+ "encoding": null,
+ "format": null,
+ "hash": null,
+ "homepage": null,
+ "licenses": null,
+ "mediatype": null,
+ "path": null,
+ "schema": {
+ "fields": [
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand_category_Budget",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand_category_Luxury",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "brand_category_Mid_Range",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fueltype_diesel",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fueltype_gas",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "aspiration_std",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "aspiration_turbo",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "doornumber_four",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "doornumber_two",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "drivewheel_4wd",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "drivewheel_fwd",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "drivewheel_rwd",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "wheelbase",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carlength",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carwidth",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "carheight",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "curbweight",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype_dohc",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype_dohcv",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype_l",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype_ohc",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype_ohcf",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype_ohcv",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginetype_rotor",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber_eight",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber_five",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber_four",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber_six",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber_three",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber_twelve",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "cylindernumber_two",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "enginesize",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem_1bbl",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem_2bbl",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem_4bbl",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem_idi",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem_mfi",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem_mpfi",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem_spdi",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "fuelsystem_spfi",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "boreratio",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "horsepower",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "citympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "highwaympg",
+ "rdfType": null,
+ "title": null,
+ "type": "integer"
+ },
+ {
+ "constraints": null,
+ "description": null,
+ "example": null,
+ "format": null,
+ "name": "price",
+ "rdfType": null,
+ "title": null,
+ "type": "number"
+ }
+ ],
+ "foreignKeys": null,
+ "missingValues": null,
+ "primaryKey": null
+ },
+ "sources": null,
+ "title": null
+ },
+ "text/html": [
+ "brand_category_Budget | brand_category_Luxury | brand_category_Mid_Range | fueltype_diesel | fueltype_gas | aspiration_std | aspiration_turbo | doornumber_four | doornumber_two | drivewheel_4wd | drivewheel_fwd | drivewheel_rwd | wheelbase | carlength | carwidth | carheight | curbweight | enginetype_dohc | enginetype_dohcv | enginetype_l | enginetype_ohc | enginetype_ohcf | enginetype_ohcv | enginetype_rotor | cylindernumber_eight | cylindernumber_five | cylindernumber_four | cylindernumber_six | cylindernumber_three | cylindernumber_twelve | cylindernumber_two | enginesize | fuelsystem_1bbl | fuelsystem_2bbl | fuelsystem_4bbl | fuelsystem_idi | fuelsystem_mfi | fuelsystem_mpfi | fuelsystem_spdi | fuelsystem_spfi | boreratio | horsepower | citympg | highwaympg | price |
---|
0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 130 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3.47 | 111 | 21 | 27 | 13495 |
0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 88.6 | 168.8 | 64.1 | 48.8 | 2548 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 130 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3.47 | 111 | 21 | 27 | 16500 |
0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 94.5 | 171.2 | 65.5 | 52.4 | 2823 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 152 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2.68 | 154 | 19 | 26 | 16500 |
0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 99.8 | 176.6 | 66.2 | 54.3 | 2337 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 109 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3.19 | 102 | 24 | 30 | 13950 |
0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 99.4 | 176.6 | 66.4 | 54.3 | 2824 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 136 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3.19 | 115 | 18 | 22 | 17450 |
"
+ ]
+ },
+ "execution_count": 25,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import { oneHotEncoding } from './encoding.ts?6'\n",
+ "\n",
+ "let encodedCarData = oneHotEncoding(carDataGeneralized)\n",
+ "encodedCarData.head(5)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "id": "aff549ce-6736-43c7-8d40-b09b9ca7fa59",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "encodedCarData.writeCSV('assets/encoded_car_data.csv')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "ec799133-584f-450d-bd8b-6b443fbf5fb5",
+ "metadata": {
+ "editable": true,
+ "slideshow": {
+ "slide_type": ""
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Deno",
+ "language": "typescript",
+ "name": "deno"
+ },
+ "language_info": {
+ "codemirror_mode": "typescript",
+ "file_extension": ".ts",
+ "mimetype": "text/x.typescript",
+ "name": "typescript",
+ "nbconvert_exporter": "script",
+ "pygments_lexer": "typescript",
+ "version": "5.5.2"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}