Price of Flights Prediction Algorithms Based on Alibaba.ir Flights in Azar (Nov-Dec)¶

In [1]:
#libraries
import pandas as pd 
import numpy as np 
import seaborn as sns 
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split,GridSearchCV
from sklearn.metrics import accuracy_score,confusion_matrix

import warnings
warnings.filterwarnings('ignore')
In [5]:
df=pd.read_csv('df.csv')

Data Cleaning¶

In [6]:
#There were some missing values (Unannounced Flight Prices)
df.dropna(inplace=True)
df.reset_index
Out[6]:
<bound method DataFrame.reset_index of      Depart Arrival       Price     Company Destination Location        Date
0     16:40   18:10  10500000.0      coming         SYZ      MHD  01/09/2022
1     20:45   22:25  10700000.0     Caspian         SYZ      MHD  01/09/2022
2     20:45   22:25  11000000.0     Caspian         SYZ      MHD  01/09/2022
3     16:00   17:45  11000000.0  Iran Irtor         SYZ      MHD  01/09/2022
4     16:40   18:10  11000000.0      coming         SYZ      MHD  01/09/2022
...     ...     ...         ...         ...         ...      ...         ...
3623  11:40   13:10   9289000.0       Mahan         THR      SYZ  18/09/2022
3624  15:00   16:20   9289000.0   Qeshm Air         THR      SYZ  18/09/2022
3625  11:35   13:10   9288000.0       Caron         THR      SYZ  18/09/2022
3626  09:30   10:50   9289000.0    Sepahran         THR      SYZ  18/09/2022
3628  18:00   19:05   6963000.0     the sky         BND      SYZ  18/09/2022

[3157 rows x 7 columns]>
In [7]:
def cid(col):
    df[col]=pd.to_datetime(df[col],format)
In [8]:
df.columns
Out[8]:
Index(['Depart', 'Arrival', 'Price', 'Company', 'Destination', 'Location',
       'Date'],
      dtype='object')
In [9]:
df['Depart']=pd.to_datetime(df['Depart'],format='%H:%M')
df['Arrival']=pd.to_datetime(df['Arrival'],format='%H:%M')
df['Date']=pd.to_datetime(df['Date'],format='%d/%m/%Y')
In [ ]:
 
In [10]:
for i in ['Depart','Arrival','Date']:
    cid(i)
In [11]:
df['Price']=df['Price'].astype(int)
In [12]:
df['Time']=df['Arrival']-df['Depart']
In [13]:
df['jday']=df['Date'].dt.day
In [14]:
df
Out[14]:
Depart Arrival Price Company Destination Location Date Time jday
0 1900-01-01 16:40:00 1900-01-01 18:10:00 10500000 coming SYZ MHD 2022-09-01 0 days 01:30:00 1
1 1900-01-01 20:45:00 1900-01-01 22:25:00 10700000 Caspian SYZ MHD 2022-09-01 0 days 01:40:00 1
2 1900-01-01 20:45:00 1900-01-01 22:25:00 11000000 Caspian SYZ MHD 2022-09-01 0 days 01:40:00 1
3 1900-01-01 16:00:00 1900-01-01 17:45:00 11000000 Iran Irtor SYZ MHD 2022-09-01 0 days 01:45:00 1
4 1900-01-01 16:40:00 1900-01-01 18:10:00 11000000 coming SYZ MHD 2022-09-01 0 days 01:30:00 1
... ... ... ... ... ... ... ... ... ...
3623 1900-01-01 11:40:00 1900-01-01 13:10:00 9289000 Mahan THR SYZ 2022-09-18 0 days 01:30:00 18
3624 1900-01-01 15:00:00 1900-01-01 16:20:00 9289000 Qeshm Air THR SYZ 2022-09-18 0 days 01:20:00 18
3625 1900-01-01 11:35:00 1900-01-01 13:10:00 9288000 Caron THR SYZ 2022-09-18 0 days 01:35:00 18
3626 1900-01-01 09:30:00 1900-01-01 10:50:00 9289000 Sepahran THR SYZ 2022-09-18 0 days 01:20:00 18
3628 1900-01-01 18:00:00 1900-01-01 19:05:00 6963000 the sky BND SYZ 2022-09-18 0 days 01:05:00 18

3157 rows × 9 columns

In [15]:
def extract_hour(data,col):
    data[col+'_hour']=data[col].dt.hour
    
def extract_min(data,col):
    data[col+'_min']=data[col].dt.minute
    

def drop_col(data,col):
    data.drop(col,axis=1,inplace=True)
In [16]:
extract_hour(df,'Depart')
extract_min(df,'Depart')
drop_col(df,'Depart')
extract_hour(df,'Arrival')
extract_min(df,'Arrival')
drop_col(df,'Arrival')
In [17]:
df['Duration']=((df['Arrival_hour']*60)+40)-((df['Depart_hour']*60)+40)
In [18]:
drop_col(df,'Time')
In [19]:
df
Out[19]:
Price Company Destination Location Date jday Depart_hour Depart_min Arrival_hour Arrival_min Duration
0 10500000 coming SYZ MHD 2022-09-01 1 16 40 18 10 120
1 10700000 Caspian SYZ MHD 2022-09-01 1 20 45 22 25 120
2 11000000 Caspian SYZ MHD 2022-09-01 1 20 45 22 25 120
3 11000000 Iran Irtor SYZ MHD 2022-09-01 1 16 0 17 45 60
4 11000000 coming SYZ MHD 2022-09-01 1 16 40 18 10 120
... ... ... ... ... ... ... ... ... ... ... ...
3623 9289000 Mahan THR SYZ 2022-09-18 18 11 40 13 10 120
3624 9289000 Qeshm Air THR SYZ 2022-09-18 18 15 0 16 20 60
3625 9288000 Caron THR SYZ 2022-09-18 18 11 35 13 10 120
3626 9289000 Sepahran THR SYZ 2022-09-18 18 9 30 10 50 60
3628 6963000 the sky BND SYZ 2022-09-18 18 18 0 19 5 60

3157 rows × 11 columns

In [20]:
column=[column for column in df.columns if df[column].dtype=='object']
column
categorical = df[column]
In [21]:
continuous_col =[column for column in df.columns if df[column].dtype!='object']
continuous_col
Out[21]:
['Price',
 'Date',
 'jday',
 'Depart_hour',
 'Depart_min',
 'Arrival_hour',
 'Arrival_min',
 'Duration']
In [22]:
categorical.head()
Out[22]:
Company Destination Location
0 coming SYZ MHD
1 Caspian SYZ MHD
2 Caspian SYZ MHD
3 Iran Irtor SYZ MHD
4 coming SYZ MHD
In [23]:
categorical['Company'].value_counts()
Out[23]:
the sky       353
Kish Air      315
Zagros        285
Mahan         273
Caspian       273
Warsh         257
Iran Irtor    256
Iran Air      240
Sepahran      194
coming        167
Caron         157
Chabahar      116
Qeshm Air      76
Shining        75
Ascension      51
Saha           44
dynamic        13
Pars Air        6
Asagt           4
Fly Persia      2
Name: Company, dtype: int64
In [24]:
plt.figure(figsize=(15,8))
sns.boxplot(x='Company',y='Price',data=df.sort_values('Price',ascending=False))
Out[24]:
<AxesSubplot: xlabel='Company', ylabel='Price'>

Graph 1, shows Mahan is on average the most expensive airline to travel with and IranAir is the cheapest¶

In [25]:
plt.figure(figsize=(15,8))
sns.boxplot(x='Destination',y='Price',data=df.sort_values('Price',ascending=False))
Out[25]:
<AxesSubplot: xlabel='Destination', ylabel='Price'>

Graph 2 shows Bandar Abbas and Mahshahr are the most expensive cities to travel to¶

In [26]:
plt.figure(figsize=(15,8))
sns.boxplot(x='Location',y='Price',data=df.sort_values('Price',ascending=False))
Out[26]:
<AxesSubplot: xlabel='Location', ylabel='Price'>

Graph 3 Shows that theyre also the most expensive to travel from¶

In [27]:
# As Company is Nominal Categorical data we will perform OneHotEncoding
Airline=pd.get_dummies(categorical['Company'],drop_first=True)
In [28]:
#encoding of location and Destination columns
source=pd.get_dummies(categorical['Location'],drop_first=True)

destination=pd.get_dummies(categorical['Destination'],drop_first=True)
In [29]:
for i in categorical.columns:
    print('{} has total {} categories'.format(i,len(categorical[i].value_counts())))
Company has total 20 categories
Destination has total 27 categories
Location has total 28 categories
In [30]:
df.columns
Out[30]:
Index(['Price', 'Company', 'Destination', 'Location', 'Date', 'jday',
       'Depart_hour', 'Depart_min', 'Arrival_hour', 'Arrival_min', 'Duration'],
      dtype='object')
In [31]:
df.plot.hexbin(x='Depart_hour',y='Price',gridsize=15)
Out[31]:
<AxesSubplot: xlabel='Depart_hour', ylabel='Price'>

Graph 4 Shows Depart hour does not affect price¶

In [32]:
# Applying label encoder
from sklearn.preprocessing import LabelEncoder
encoder = LabelEncoder()
In [33]:
for i in ['Location','Destination','Company']:
    categorical[i]=encoder.fit_transform(categorical[i])
In [34]:
categorical.head(70)
Out[34]:
Company Destination Location
0 17 21 15
1 3 21 15
2 3 21 15
3 7 21 15
4 17 21 15
... ... ... ...
73 3 14 22
74 3 14 22
75 3 14 22
76 7 14 22
77 3 14 22

70 rows × 3 columns

In [35]:
#merge it back in
final_df=pd.concat([categorical,df[continuous_col]],axis=1)
In [36]:
pd.set_option('display.max_columns',500)
final_df
Out[36]:
Company Destination Location Price Date jday Depart_hour Depart_min Arrival_hour Arrival_min Duration
0 17 21 15 10500000 2022-09-01 1 16 40 18 10 120
1 3 21 15 10700000 2022-09-01 1 20 45 22 25 120
2 3 21 15 11000000 2022-09-01 1 20 45 22 25 120
3 7 21 15 11000000 2022-09-01 1 16 0 17 45 60
4 17 21 15 11000000 2022-09-01 1 16 40 18 10 120
... ... ... ... ... ... ... ... ... ... ... ...
3623 9 23 22 9289000 2022-09-18 18 11 40 13 10 120
3624 11 23 22 9289000 2022-09-18 18 15 0 16 20 60
3625 2 23 22 9288000 2022-09-18 18 11 35 13 10 120
3626 13 23 22 9289000 2022-09-18 18 9 30 10 50 60
3628 19 5 22 6963000 2022-09-18 18 18 0 19 5 60

3157 rows × 11 columns

In [37]:
#check for outliers
def plot(data,col):
    fig,(ax1,ax2)=plt.subplots(2,1)
    sns.distplot(data[col],ax=ax1)
    sns.boxplot(data[col],ax=ax2)
In [38]:
plot(final_df,'Price')

Graph 5 shows us the average price of tickets are around 10million Rials, but range from 5mill to 20mill, we can also see we have one ticket that is at 40million, we can safely consider that an outlier and eliminate it from our dataset¶

In [39]:
#As there is one outlier in price feature, we will replace it with the median
final_df['Price']=np.where(final_df['Price']>=40000000,final_df['Price'].median(),final_df['Price'])
In [40]:
plot(final_df,'Price')

Data is ready for us to start modelling¶

In [41]:
#Seperate the dataset in X and Y columns

X=final_df.drop('Price',axis=1)
y=df['Price']
In [42]:
#Feature Selection
from sklearn.feature_selection import mutual_info_classif
In [43]:
del X['Date']
In [44]:
X
Out[44]:
Company Destination Location jday Depart_hour Depart_min Arrival_hour Arrival_min Duration
0 17 21 15 1 16 40 18 10 120
1 3 21 15 1 20 45 22 25 120
2 3 21 15 1 20 45 22 25 120
3 7 21 15 1 16 0 17 45 60
4 17 21 15 1 16 40 18 10 120
... ... ... ... ... ... ... ... ... ...
3623 9 23 22 18 11 40 13 10 120
3624 11 23 22 18 15 0 16 20 60
3625 2 23 22 18 11 35 13 10 120
3626 13 23 22 18 9 30 10 50 60
3628 19 5 22 18 18 0 19 5 60

3157 rows × 9 columns

In [45]:
mutual_info_classif(X,y)
Out[45]:
array([2.17542178, 1.54024816, 1.25597602, 0.69158529, 0.93495738,
       0.70005497, 0.96351747, 0.73204306, 0.90033304])
In [46]:
imp = pd.DataFrame(mutual_info_classif(X,y),index=X.columns)
In [47]:
imp.columns=['importance']
imp.sort_values(by='importance',ascending=False)
Out[47]:
importance
Company 2.153031
Destination 1.518041
Location 1.148863
Duration 0.942153
Depart_hour 0.904052
Arrival_hour 0.898867
Depart_min 0.751783
Arrival_min 0.715833
jday 0.709763
In [48]:
# spiliting the dataset
from sklearn.model_selection import train_test_split
X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.30,random_state=123)
In [49]:
from sklearn.metrics import r2_score,mean_absolute_error,mean_squared_error
def predict(ml_model):
    print('Model is: {}'.format(ml_model))
    model= ml_model.fit(X_train,y_train)
    print("Training score: {}".format(model.score(X_train,y_train)))
    predictions = model.predict(X_test)
    print("Predictions are: {}".format(predictions))
    print('\n')
    r2score=r2_score(y_test,predictions) 
    print("r2 score is: {}".format(r2score))
          
    print('MAE:{}'.format(mean_absolute_error(y_test,predictions)))
    print('MSE:{}'.format(mean_squared_error(y_test,predictions)))
    print('RMSE:{}'.format(np.sqrt(mean_squared_error(y_test,predictions))))
     
    sns.distplot(y_test-predictions)      
          
In [50]:
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import KNeighborsRegressor
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import GradientBoostingRegressor,RandomForestRegressor
In [51]:
predict(RandomForestRegressor())
Model is: RandomForestRegressor()
Training score: 0.7970841337183335
Predictions are: [14889459.33333333 10643496.66666667  9716687.5        10302206.19047619
 10927847.28571429 10051396.33333333 11502090.         11620593.21428571
 12142363.85714286 10623245.5         9957648.95238095  9718507.93650793
 10963749.81746032 10006900.         10780586.30952381 12632530.
  9294140.92857143 12934583.33333334  8404638.66666667  9664557.5
 11734197.83333334 17159077.33333333 10790227.         10886043.55952381
 12739307.81746031  7316830.61111111  9464794.76190476 10499960.
  7426108.          9351510.         10246460.         10440177.88095238
 11341401.71428571 10196390.27777778 11611033.95238095 10989287.59027084
  9045690.         11626837.5         8709073.96031746 11133424.51190476
 12282510.         16914024.66666667  9240735.         12357435.
 11844154.         10825518.33333334 11249450.         12920902.14285714
 10360328.39285714  9119000.         12264876.66666666  9662706.
 12993825.         10110638.66666667 11576252.5        11283812.5
 12458925.5         8997706.66666667 10197278.03571429 10273097.5952381
 10552380.71428571 11576252.5        10313099.96428571  7509028.
 11355344.98376623 11060726.66666667 11902350.         11240303.84126984
 13579639.16666666 13918360.83333333 11780543.80952381 12144929.80952381
 13860878.14285714 11843418.33333334  9330918.85714286  9240950.
 12897248.80952381  9842746.66666667 10257302.5        11983330.
 12135977.85714286 11271276.         11388852.57142857 11433582.26190476
 11575379.52380952  9878130.          9142831.91666666 12950966.66666666
  8870145.33333333 10366109.16666667  9968363.9047619  10482490.04761905
  8680429.66666667 10330147.14285714  9654474.44444444  9336560.
 12094485.83333334 12346183.33333334  8324458.          9039510.
 11138739.28571429  9285510.         13466553.80952381 10034602.66683317
 12853342.66666667 11988342.38095238 12118865.         11652550.
  9982035.         11896141.6998557   9117235.          9654523.33333333
  9319020.         12275384.52380952  9716400.         11284094.45238095
 10577883.33333333  9079690.         11608933.66666667  8911896.66666667
  9653620.         13493310.         10090090.         10480370.
 13003490.6031746  10963749.81746032  8338750.          9616104.58333333
  9772931.42857143 11786513.33333334 12799616.66666666  9298432.
 11579491.33333333  9292485.         11284750.83333334 10453768.83333333
 10320061.66666667 12329919.66666666  9701064.66666667 10522273.33333333
  9301130.         24526754.16666667 12322810.         11113873.80952381
 11308850.39213564 10130178.75        9135243.80952381 11729502.38095238
 11801656.          8722890.          8591423.33333333  8407133.33333333
 12154030.15873016  9414648.57142857 13371266.66666667  8836308.
  9850923.2967033   7017155.          9864434.66666667 11284750.83333334
 10832981.25        9325120.         14781608.33333334 13354020.
 12522923.5        13561266.66666667  9127278.33333333  9074403.33333333
 10507665.         11373859.61111111 11146831.96969697 10034602.66683317
  9968363.9047619   9815694.66666667 12728863.38888889 11853208.66666666
  8502725.         11880147.33333333  9370616.66666667 13400203.53571429
  9296610.          9649073.80952381 13908406.9920635  13892613.33333334
 10616020.         11275520.         10437359.         10627599.33333333
  9969035.5         8586520.          9342420.          9522470.
  9835983.33333333 15167903.52380952  9414313.33333333 12202950.
 10763051.50793651 10471574.16666667 13013052.80952381 10374673.33333333
  7783054.36507936 13775385.5         9919762.22222222 12912230.
 12430710.         11041540.95238095  9016511.         11291655.
  8837142.66666667 11627141.19047619 14018098.95238095 10101430.
 12977172.5        10665402.14285714 12063797.14285714 11085322.38200688
 15649377.          9023584.66666667 10544059.11111111 15768847.14285714
 10544059.11111111 18699601.70238095  8271590.         12973878.33333333
 13187122.5        11896255.         10126218.         13146800.
  7883550.          9491047.5         8965876.66666667 10044313.80952381
 12054653.33333333 10146811.43253968 18699601.70238095 15401040.
  9810718.         13647580.         10507665.         10595121.66666667
  9716687.5        10214610.83333333  9766712.14285714 13485552.
  7881234.          9292485.          9341872.         11576265.
  9538760.         10699208.82539682 10280488.         11074206.5
 12259112.92857143  8724200.         10302206.19047619  8600580.
 13263054.16666667  9968363.9047619   9666214.28571429 10045295.71428571
 12913590.         13005072.26190476  9207895.         16091760.
  9470258.57142857  9470787.33333333 12447050.         13023280.
 12104900.33333334 13908406.9920635  11772260.         11921268.76190476
  8322910.         12114984.41666666 11952326.66666667 10221298.80952381
 17739480.          7019165.         12548842.22222222 11783047.83333333
 12021000.         11921839.         12011070.          8243596.54761905
 12636563.33333333 12675888.57142857 11979150.         13632521.33333334
 10957847.29731053 10035199.42857143 10732625.15873016 12443740.
 12738379.48412698 10612468.44444444 10675496.62837163 15983501.66666666
  9571558.45238095  9182717.         12938585.4047619  10222308.66666667
  8804524.28571429  9627750.         10987027.5        11237596.66666666
  9988256.66666667 11674351.32142857 10478714.         10967343.3015873
  7427598.          9901290.95238095 12549914.33333333 13466553.80952381
 13474231.44047619  9119000.         12716728.27380952 12686377.14285714
 10689325.3968254  10478714.         11732620.         12575883.33333333
 10840849.         10224520.         10444690.         10825518.33333334
 10166660.         13639977.76190476  8845987.5         8586520.
 10708952.5        12684225.          8723471.5        11235722.5
 12653412.66666667  8879935.33333333 10380802.28571429  8879935.33333333
 12954090.         13422127.22222222  9349363.33333333 10889415.0952381
 11625662.73809524 10108875.83333333 14341578.22222222 13023859.65151515
  7167086.         11641710.4448052  15767340.11904762  8873335.35714286
 11595327.72619048 10452427.83333333 12574687.48809524  9182658.
 11774483.33333333 13422127.22222222 10644981.         11705980.
 12221088.5952381  12424236.66666666  9625770.          9827744.83333333
  9172363.33333333  9061616.66666667 13572179.16666666 12021128.66666666
 12348055.         11590662.10714286  9470258.57142857 16721180.
 10090641.         14275880.          9587048.         12341436.66666666
 11538818.33333334 10006900.         10473476.5        10140369.09090909
 12448213.61111111 12733360.         11111056.66666667 12081027.5
 14679230.83333333 10280256.         10617892.54761905 12006900.
 10190624.12698413 12341436.66666666  7262686.66666667 11458130.
  9589652.          7377198.          9134779.30952381 11864354.28571429
 10411850.         14889459.33333333  8076330.          9142831.91666666
 13639977.76190476  9729514.28571429 10532387.42063492 11795469.19047619
 12513479.16666667  9916440.         12728863.38888889  9764151.33333333
 11840185.23809524  9778957.5        10221891.11111111  9235997.88888889
 11731518.33333333  9299040.         10604430.95238095 10120080.
  9458113.83333333  9553470.         10108875.83333333  7061740.
  8236494.11111111 11669331.95238095 10141272.          9365011.33333333
  9647040.         10532387.42063492  9149968.42857143  9350210.
 12570326.66666667 10609477.5        12764556.66666666  9297670.56956932
  8387071.66666667  9403569.         11617391.9047619   9364910.
 12766849.78571429  9031264.         10689325.3968254  11880147.33333333
 10006900.         11647653.33333334  9305803.33333333 12822765.
  9571558.45238095 12675176.66666667 15927539.         10213476.66666667
 10992900.         10210967.14285714 10817654.28571429 10419672.95238095
 12650916.66666667 13400203.53571429 11644969.04761905 11704897.5
 12934583.33333334 11023106.15873016  9982075.          9559041.66666667
 11817667.92857143 11576265.         10076734.24603175  9311300.
 11400775.          9718507.93650793 10367195.          8933384.5
 10989287.59027084 10106411.63636364 12322810.          8009452.66666667
  7858410.         13677100.         12699560.          9221740.
 10586763.33333333 11874740.43176268  9344810.         12938585.4047619
 11990000.71428571 11896323.57142857 11650436.66666667 10066440.
  9301130.         11958969.52380952 16721180.          9912360.
 10131451.66666667 12168272.02380952  8290530.          7531324.66666667
 12547583.33333333 12729760.17857143 10038741.66666667  9030128.5
 11626837.5        13079530.          7191570.         10061380.66666667
  9359934.61111111  8973233.63636364 13047300.          9692868.33333333
 11382359.52380952  9085210.         10720130.         12839423.33333334
  9301130.          9585190.         10090945.         16914024.66666667
 11893470.         12829196.66666666  8817426.         11575641.07142857
 12738379.48412698 11070226.66666667 12247842.61904762  9540116.66666667
 18734517.42857143 12638807.02380952  9894569.98015873 10460241.66666667
  9505452.66666667  9313580.         11259527.5        10252247.5
 10820121.          8815778.5        11876118.          9330918.85714286
  9998909.52380952 12110894.16666667 10221298.80952381  8436919.
 13370985.85714286  9781157.         14537569.16666667  9279130.
  8917601.36507937  9943214.28571429  9965238.66666667 12235293.33333334
 10957847.29731053 12021000.         12337354.83333334 10201836.66666667
 10539134.28571429  9633964.33333333  9871671.16666667 13186722.
 11405380.         10946877.         13045065.          7112000.
 16975855.83333334 10170990.04978355 12599818.30952381 13370985.85714286
  9694619.66666667 10895014.66666666 11739857.93650793 15927539.
 11019047.5        12786147.14285714 15732551.23809524  8271590.
  7376192.5        12132796.25       12744550.          9127245.14285714
 11541743.33333334 11864354.28571429  9975437.42796093 11388852.57142857
 14184043.19047619 10179649.33333333 11314318.33333334 10296561.16666667
 10077370.         10190624.12698413 12767671.66666666 10185070.
 11351682.33333334 12718142.75793651 11283920.55555556 10076734.24603175
 13656468.33333333 10131451.66666667  8965876.66666667 10545836.66666667
 12088412.         11024399.76190476 10276970.         12021128.66666666
 11078498.54761905 10864295.19047619  8643360.          9074403.33333333
  9982075.          9679676.         10870720.         11114181.0952381
 10302206.19047619 11911885.33766234 12316995.55952381 13138942.85714286
 11848470.         11855893.33333333  9681402.         10113110.
 11944568.          8350865.71428571  8509398.33333333  9019432.33333333
 11314970.         13026050.         10273097.5952381   9969490.
 12707603.33333334 10778218.          9054923.88888889  9816721.33333333
 13632521.33333334 13113246.66666666 12869033.57142857 12546840.
  9450903.5        12636563.33333333 11136232.          9781157.
 11746478.         10938602.5        10736816.66666667 10917651.
 10614145.78174604 11089763.33333334  8870145.33333333  8934561.66666667
  9254758.00793651 11946786.66666666  9429947.5        10391836.66666667
 10076734.24603175 10187622.5         9918836.61904762 14537569.16666667
  9718507.93650793  9756181.66666667 11332914.4047619   9965238.66666667
 13369505.5        11615318.          8879935.33333333 10441620.78751804
 13051344.44444444  9516506.66666667 10008565.         12176405.71428571
  9516506.66666667  7873620.         13352175.         11465118.
 10964741.16666666 10539134.28571429  9318620.         10185866.66666667
  7045880.          9849463.33333333 11321572.76298701 12848001.66666667
 11610674.16666667 11780543.80952381 13617414.83333333  8995149.66810967
 10820121.         10022215.         11595327.72619048 11314970.
 13572179.16666666 12867197.5        10924932.16666666 11848470.
  9965238.66666667 11746478.         12737484.28571429  9330488.
 11701090.         11376768.88888889  9603300.          7984030.33333333
 10627467.88347764 10268411.66666667 12517788.02991453 12594099.57142857
 11373859.61111111 13059766.66666667 10763051.50793651  9211190.
 12286822.14285714 14623043.33333333 17105277.33333334 14016715.
 10109455.01190476 10924932.16666666 12397831.33333333 10076734.24603175
  9184596.66666667  9316320.          9464794.76190476 12194494.47619048
 10158260.         11990000.71428571  8743221.66666667 13908406.9920635
 11613886.66666667  9283143.33333333 12529256.66666666 14866103.33333333
 10689912.          9462180.6547619   9669943.          9698371.66666667
 11112213.33333334  9366834.19047619 11405380.         10613961.9047619
  9372120.         13175510.         11941123.33333334  9958925.10714286
  9172896.66666667 11416553.82936508 16196130.66666667  8586520.
 13302982.91666666 12152481.58333333 11542556.46825397 15352053.05952381
  9383006.66666667  9830851.83333333 12355503.33333333 10715761.61904762
 12716728.27380952 13632521.33333334 12466220.         10864295.19047619
 11324880.         13159395.         16914024.66666667 11958289.45970696
  9547650.60714286 12033890.          9863847.04761905  9853064.04761905
 12927410.         11285971.33333333 12123849.88095238 10858717.
 11880147.33333333 10385240.28571429 10442113.         10435721.66666667
 13023280.         12712115.71428572  9777450.         13030002.66666666
 12549914.33333333 11416553.82936508 12061502.61904762  8636310.
  9119000.          8872130.          9968363.9047619  10307402.
 11729502.38095238  8861178.09523809  8870145.33333333  9671600.
 10392044.16666667 10106411.63636364 12114984.41666666 10061476.82539682
 11275520.          8119960.         13377820.         10011435.23809524
 10414780.          9074403.33333333 11513832.         19157525.
 12382313.33333333 15523153.76190476 13020860.         13600773.91666666
 13419290.          8467643.33333333 13233304.14285714 12370909.84271284
 14184043.19047619 11990850.         10384748.69047619 10038346.66666667
 10114248.57142857 12028933.76984127 12950673.07622933  9419991.61111111
  9217940.          8590180.75       11976525.          8726180.
  9808741.66666667 13196845.         12154000.42857143  8900880.
  9341740.         11259527.5        13317332.14285714 15311012.42857143
 11746730.83333334  8929100.         11798727.004329    7944600.
 12044535.         11390795.         10419221.66666667 12259112.92857143
 11843418.33333334 12316995.55952381  9869690.          9639375.71428571
 10957847.29731053 11353688.14285714 10007473.          9235997.88888889
 10957847.29731053 11625897.61904762 10620797.61904762 12168272.02380952
 13282992.71428571 10573830.         10223290.         11729502.38095238
 15806340.         10221298.80952381 10193839.40909091 11958289.45970696
  9567363.33333333 11434567.28571429 15732551.23809524  7200250.
 11677541.66666666 10471574.16666667  9774926.66666667 12556342.28571429
  9923201.42857143 11373588.47619048 12450305.83333334 12448213.61111111
 12739307.81746031  8651620.         11554969.5        11374644.28571429
  9096570.          8591626.         12570326.66666667 12267711.66666667
 13039560.         11579608.95238095 13322960.         11659815.66666666
 12300527.85714286 11576252.5        12517788.02991453  9701834.5
 10920903.33333333 10380802.28571429 11091667.         11006146.66666667
 11014568.33333334  9129248.          8645468.         13051464.83333334
 10051396.33333333 10573226.69444444 11481992.38095238  9034603.33333333
 12303943.          9426640.          9344500.          9418004.16666667
 10587530.         10964741.16666666 10221761.66666667 10518988.33333333
 18803715.55555556  8968733.33333333 10718559.66666667  8923613.33333333
 12653261.11904762 13639977.76190476 10110638.66666667 10963749.81746032
  9538760.         12223682.6984127  12547583.33333333 10817654.28571429
 13631587.97619048 10162891.14285714  9842903.17460318 11308850.39213564
 10118500.         11878190.09163059 10675496.62837163 11857710.
 12317223.33333334 13517793.33333333 10419672.95238095 10967343.3015873
  8819524.38095238 12892793.33333334 12448213.61111111 13282580.
  8514940.         10620797.61904762 11641710.4448052  12028454.
 12950673.07622933 12977172.5        12712115.71428572 10335711.
 12439898.57142857  9703664.35714286  9638178.33333333  8926072.
 11682270.         13228214.66666666 10765220.83333333 13694435.
 12238987.61904762  8926146.13636364 12046626.66666666 12287593.33333334
 11407900.          9939913.98809524 12622620.         13035961.36363637
 13547145.         10963749.81746032  8226428.57142857 12401963.33333334]


r2 score is: 0.30763242758792075
MAE:1244970.2878049996
MSE:4267821088437.6025
RMSE:2065870.5400962576
In [52]:
predict(LogisticRegression())
Model is: LogisticRegression()
Training score: 0.13173381620642824
Predictions are: [10191000  9500000 10191000 10191000 13671000 11000000 12500000 10191000
 10191000 10191000 10191000 10191000 10191000 13152000 10191000 10191000
  6963000 10191000  6963000 13152000 13152000 10191000 12000000 10191000
 10191000 10191000 10191000 10191000 10191000  9357000 10138000 10191000
 12000000  6963000 13030000 13671000  9289000  9908000 10191000 10191000
 11900000 10191000  8862000 12500000 10191000 10191000 11900000 10191000
 12000000  9844000 10191000 13152000 10191000 10191000 11000000  8900000
 12500000  9357000 10191000 10191000 10191000 11000000 10167000 10191000
 13500000  9289000 10191000 10191000 10191000 10191000 11000000  9289000
 11000000 11900000 10191000 10191000  9500000  9357000 13030000 10191000
  9357000 10191000 10191000 12000000 11000000 10191000 10191000  8287000
 11000000 13152000 11000000 10191000 12000000 10191000 10191000 10191000
  9357000 13152000 10191000 10191000 10191000 11900000  8287000  9289000
 13152000 13030000 11900000 10191000 10191000 10191000  9844000  9357000
  9357000 10191000  9289000  9289000 10191000 11900000 13030000  9357000
 10191000 10191000 11000000 10191000 13152000 10191000 10191000  9357000
  9357000 11900000 10191000 10191000 11900000 10191000 10191000  6963000
  6963000 10191000 10191000 10191000  9357000  9844000  9357000 10191000
 10191000 11000000 13152000  6963000 13152000 10191000 11000000 10240000
 10191000  9289000 13030000 10191000  9357000  6963000 10191000 10191000
 10191000  9357000  6963000 13152000 13152000  9844000 10191000  9357000
 13030000 13030000  9844000  9289000 11000000 10191000 10191000 10191000
 10191000  9289000 10191000 11900000  6963000 10191000  9289000  6963000
 10191000 10191000 13152000 10191000 12500000  9500000  9289000  9289000
 10191000 10240000 10191000 10191000 10191000 10191000 13671000 10191000
 13152000 13152000  9500000 10191000 11900000 10191000  8862000  9221000
 10191000 10191000 10191000 10191000 10191000  9357000 10191000 10191000
 10191000 10191000 10191000 10191000 10191000 10167000 11900000  9357000
 10191000 10191000 13152000 13671000  6963000 10138000  9289000  9500000
 13152000 13415000 10167000 10191000 10191000 13671000 13030000  6963000
 10191000 10191000 10191000 10191000 12500000 10191000  9357000 13152000
 10191000 10191000 10191000 13671000 10191000  6963000 10191000 10191000
  9357000 11000000 11900000 12500000 10191000  9357000 10191000  9357000
 10191000 10191000  9357000 10191000 13152000  9289000 10191000 13671000
  9500000  6963000 10191000 10191000 10191000  6963000 10191000  9357000
 10191000 12000000 10191000 10191000  9844000  9289000  9357000 13152000
 11000000 12500000 10191000 10191000 12000000 10191000 10191000 11000000
  9289000  9357000  6963000 10191000 10191000 10191000  9357000 10191000
 10191000 10191000 13152000 10191000 10191000 10191000 11900000  8287000
 10191000  9844000  9289000 10191000 10191000 13152000 10191000  9357000
 10191000 10191000 13030000 10191000 13030000 10191000  9357000  9500000
 13152000 12500000  9357000 10191000  9357000 10191000 10191000 10191000
 10191000 10191000 10191000 13671000 11000000 10191000 13152000 11900000
 10191000 13415000 18856000  9500000 18856000 10191000 10191000 10191000
 10240000 10191000 10191000  6963000  9357000 10191000  9844000 12000000
 10191000 11900000 10191000 10167000  9289000 11000000 10191000  9357000
 10191000 10191000  9357000 13152000 10191000 13152000 10191000 10191000
 10191000 10191000 12000000 10191000 10191000 10191000 10191000 10191000
 10191000 13152000 10191000 12500000  9289000 10191000  9357000 10191000
 10191000 10191000  9844000 10191000 10191000 10191000 10191000 18856000
 18856000  9289000 10191000  9289000  9289000 10167000  9357000 10191000
 10191000  9357000  6963000 10191000  9357000 10191000 10191000 10191000
 10191000 10240000 10191000 10191000 10240000 10191000 10191000  9357000
  6963000 10191000 10191000 10191000 13152000  9289000 11000000  9289000
 10191000  9500000 10191000  9289000 13152000 11900000 10191000 10191000
  9289000 12000000 10167000 10191000 13152000 10191000 10191000 10191000
 13152000 11900000 10191000 13152000 10191000 10191000 10191000 10191000
 10191000 13152000  9357000  9289000 10191000 10191000 18074000 11900000
 13671000 11400000  9357000 12000000 13152000 10191000 10191000  6963000
 10191000 10167000  9357000  6963000  9289000 10191000 12957000 10191000
  9357000  9357000  9357000 13152000 10191000 10191000  9844000 10191000
 10191000 12000000 11000000  9357000  9908000 10191000  6963000 10191000
  9357000 10191000 13000000 12000000 11000000 10191000 10191000 10191000
  9357000 10191000 10191000 10191000 13152000  6963000 10191000 11900000
 12000000 10191000  9357000 10191000 10191000 10191000 10191000  9357000
  9357000  9357000 10191000 10191000 10191000  9357000  9357000 10191000
 13030000 10191000 10191000 10191000 10240000  9289000 13415000 10191000
  9357000 10191000  9500000 11900000 11000000 10191000 10191000 10191000
 13030000 13152000 10191000 10191000 10191000 13030000 13671000  6963000
  9357000 10191000  9289000 10240000 10191000  9289000 10191000 10167000
 10191000 10191000 10191000 11900000 10191000  9289000 13152000  9357000
 18856000 10191000 13152000 10191000  6963000 10191000 10191000 11000000
 10191000 10191000 10191000 10191000  6963000 10191000  6963000  9357000
 10191000 10191000  9289000 10191000  9289000 10191000 13152000 10167000
 13152000 10240000 12500000  9357000 10191000 10191000 10191000 10191000
 10191000 13415000 10191000  9844000 10191000 10191000  9289000 10191000
 12500000 11000000 12000000 10191000 10191000 10191000 10191000  9289000
 10191000 10191000 10191000  9289000 13152000 13152000  9357000 10191000
  9357000  9844000  9289000  9289000 10191000 13152000 10191000 10175000
  9357000  9289000 11000000  9357000 10191000 11900000  9357000 10191000
  9357000 13152000  8287000 13415000 10191000 11000000 10191000  9500000
 12000000 10191000 10191000 10191000 10191000  9357000 10167000 10191000
  9357000 10240000 12500000 10191000 13152000 13030000  9357000 10191000
 13030000 10191000 10191000  9844000 12957000 11000000  6963000 10191000
 10191000 11000000 18856000 10191000 10191000 10191000 10191000 10191000
  9500000 10191000 12000000  9357000 10191000  9357000 10191000 10191000
  9908000  6963000 10191000  9289000 13030000 10191000 10191000 10191000
  6963000  9844000 10240000 12000000 10191000 10191000 11900000  9357000
 10191000  9357000 10191000 10167000  9500000  9289000 10191000  9289000
 10191000 10191000 10191000  9844000 11900000 10191000  9289000 10138000
 10191000  9357000 10191000 10191000  9357000 12957000  9357000 10191000
 10191000 11900000 13030000  9500000  9289000  9289000 10191000 10191000
  9289000  9357000 10191000  9844000  9289000 13152000 12000000 10240000
 12500000 10191000 10191000  9357000 11000000 11900000 12500000  9844000
 10191000 10191000 10191000 13152000  9289000 10191000 10191000 11900000
 10191000 10191000  9357000 10191000 11900000 11900000  9357000  9357000
  9844000  8862000 11000000 10191000  6963000 10191000 11000000  9357000
 11000000 11400000  6963000  9357000 10191000 11000000 12500000 10191000
 13030000  9357000  9357000 10191000 10191000 13152000 13000000 11900000
 11000000  9908000 13671000  9357000  6963000 10191000 10191000 10191000
 10191000  9908000  9357000 13152000  6963000 18074000 10191000 12500000
 10191000 13671000 11900000 10191000  9357000 10191000  9289000 10240000
 11900000  8862000 13415000 10191000 10191000 13152000 10191000 10191000
 11900000 10191000 10191000  6963000 11000000 10191000 13152000 10191000
 11000000 10191000 10191000 10191000 12500000  6963000  9357000  6963000
  9357000 10191000 11000000  9357000 13152000 13152000 10191000 10191000
 10191000 10191000 10191000 10191000 10191000 13152000 10191000 10191000
 10191000  9357000  9289000 10191000  9357000 13152000  6963000 12500000
 10191000 10191000  9289000 12500000 10191000 11000000 10191000 10191000
 10191000 10191000 10191000 10191000 10191000  9357000  9289000  9844000
 11000000 10191000 18856000  9357000 11900000 10191000  6963000  9357000
 10191000 13152000 10191000 10191000 10191000  9357000 10191000 12500000
 10167000 10191000 10191000 10191000 10191000  9500000 10191000 10191000
 12000000 10191000 10191000 10191000 10191000 10191000 10191000 10191000
 10191000  9289000 10191000 10191000 10191000 10191000 10191000 13671000
 13000000 10191000 13415000 13152000  9357000 10191000 10191000 11000000
 10191000  9357000 10191000 10240000 10191000  6963000 10191000 13671000
 10191000 10191000 10191000 10191000 10191000 10191000 10191000  9357000
 13671000 10191000 10191000 10191000]


r2 score is: 0.9999732795124189
MAE:1990928.270042194
MSE:164707685.53586498
RMSE:12833.849209643418
In [53]:
predict(KNeighborsRegressor())
Model is: KNeighborsRegressor()
Training score: 0.46169451387003313
Predictions are: [14940400. 12250600. 12628200.  9273400.  9706600.  9981000. 11171000.
  9728800. 11624600. 12155800.  9686200.  9860000. 10783600. 12004600.
 12246800. 12060000.  9351800. 11936400.  8956800. 11680000. 10985400.
 14177600. 10405600.  9469400. 13814200.  8622600. 10060000. 10229400.
  7978000.  9302000. 10900200. 11059000. 13373600. 10174600. 10769600.
 10540000.  9030200. 10970800.  7815800.  9469400. 11507000. 15292400.
  9216200. 12278000. 11141200.  9460000. 10466400. 11724000. 12433200.
  9284200. 13373600. 10572000. 13826800.  9769600. 11493400. 11360000.
 11527400.  9749200.  9164400. 10752000. 11200000. 11493400. 11414000.
  8352400. 13373600. 11376000. 12100000. 11749400. 13265600. 11337800.
 11195000. 10701800. 12537200. 11520000. 11806000.  9738800. 13159400.
 10691400. 10869600. 12100000. 11349400. 10445000. 11220800. 12880000.
 11095000.  7782200.  9548400. 12583000.  9565400. 11345200.  9986800.
 12918200. 13006200. 11479000. 10110000.  9289000. 12667400. 12475000.
  8158360. 10042200. 11937800. 10408200. 13307600. 10120400. 12027800.
 12107200. 12020000. 11578200. 10635000. 11140800. 10077600. 10768600.
  9302000. 11378000.  9026800. 10476000. 10790000.  8489600. 10927200.
  9049600.  8896000.  9526800.  9739000. 11564200. 11905800. 10783600.
  7711000.  8857800. 11059000. 11800000. 12518000. 10500000. 11520000.
  8908400. 11698200.  9695800. 10172400. 11481400.  8080000. 11498000.
  9286200. 22470800. 12762000. 10501200. 11365400. 10871400.  7787800.
 11771400. 11406600.  8621000.  9000400.  9031200. 12260000.  9813200.
 12378200.  7954400.  8599000.  6963000.  9054000. 11698200. 11433200.
  9256800. 13106200. 13320000. 12350000. 12369000.  9416000.  9142800.
 11596000. 10869600. 10051600. 10120400.  9986800.  6942200. 11897800.
 12000000.  7337000. 10358600.  9469400. 13316400.  9520000. 10374400.
 13976400. 15001000. 11398200. 11038200. 10365200. 10191000. 10152800.
  9114200.  9289000. 13124600.  9640000. 14940400. 10338400. 12866200.
 10060000. 11924000. 13038600. 10073200.  9501000. 13838000. 10522000.
 12255800. 10479000. 10892000.  8862000. 12385000.  9618200. 11792000.
 13492200.  9350200. 11636400. 10690000. 12758000. 10945400. 15292400.
 12020000. 10907000. 11824600. 10907000. 22636000.  9940000. 11789800.
 12329400. 12180000. 10790600. 13038600.  9076400.  9772800. 10088000.
  9920400. 12595800. 10904800. 22636000. 13373600. 10194600. 13671000.
 11596000. 13009600. 12628200. 11215000.  9461000. 10722360.  8846800.
  8908400.  9336600. 12428400.  8613800. 11280400.  9806600. 11206200.
 11182600.  7875400.  9273400.  9838200. 14417600.  9986800. 10861400.
 10961000. 13030000. 13034600. 10526600. 13373600.  9289000.  9469400.
 13373600. 14317800. 10661000. 13976400. 10955000. 11206200.  8982200.
 12594600. 10976600. 10500000. 16632200.  7920600. 11760000.  9749200.
 13544000.  8245800. 13804800.  8966200. 13410000. 14175400. 13373600.
 13922400. 11060000. 10400000. 11953000. 11324600. 12906200. 10191000.
 10600000. 11493400.  9838600.  8743160. 12460800. 11072000. 11237200.
  9458600. 13373600. 10101200.  8899800. 11766400. 10030000. 10614400.
  8997600. 13115600. 12999000. 13307600. 16499000.  9284200. 10071200.
 13580000. 10650000. 10030000. 11898000. 12163800. 10069400. 10191000.
  9998800.  9460000.  9848400. 13191000. 10652000.  9114200. 11155200.
 12968000.  8599000.  9920000. 13486000.  9144200. 10076400.  9144200.
 13826800. 12960000. 11675000. 11517600. 11602000.  9545000. 13922400.
 12988400.  7869000. 11435800. 17123000.  9538000. 24619200. 10974000.
 10312600.  9377800.  9943600. 12960000. 10600000.  9918400. 10711600.
 13133400.  8857000. 10054400.  9088800.  9937400. 12391800. 11001400.
 11380000. 11610800.  9289000. 13373600.  9830200. 13196800.  9336600.
 12595800. 11866600. 12004600. 11058000.  9914400. 12427200. 10872800.
 12207200. 11400000. 14288000.  9830200. 12086200. 12198000. 11657800.
 12595800.  7815800. 13999800. 10008600.  9352000. 10711600. 12866200.
  8899800. 14940400.  8146800.  9548400. 13191000.  8899800. 10582000.
 11270600. 14629600.  9431200. 11897800.  9858600. 11336200.  9166600.
  8245800.  8356400. 12336000.  9326400.  8856400.  8899800.  8111800.
  9984600.  9545000.  7337000.  8764000. 13373600. 12147400. 10338400.
  9221200. 10582000.  9257000.  9526200. 14147600. 11479000. 13799200.
  9328400.  8918200.  9289000. 16110800.  9289000. 11734000.  9071800.
 10650000. 10358600. 12004600. 11800000. 10240200. 13240800.  9838600.
 11648000. 22636000. 11288800. 10937200. 10191000. 11562800. 10219400.
 12428400. 13316400. 10740000. 10985400. 11936400. 11280400.  8744000.
 10698000. 11280000. 12428400. 10050600.  9289000. 12295600.  9860000.
 11796800. 10408200. 10540000.  9491800. 12762000.  8845400.  8399400.
 14842400. 12961600.  9221000. 10903600. 12311600.  8398800. 12460800.
 10361200. 12391800. 12189800. 12921200.  9286200. 13533400. 13373600.
 10528600.  9269200. 12581000.  9169400.  8249600. 11940000. 11466400.
 11392200.  8651400. 10970800. 13012000.  8769400. 10431400.  9749200.
  8824200. 13236400. 14135600. 11380000.  9378000. 10800000. 13030000.
  9286200.  8851000. 10030600. 15292400. 11314600. 13740000. 10166600.
 11287800. 12906200. 10888000. 11997600. 10049000. 12728200. 13568000.
 11143000.  8245800.  9356800.  9391200. 11001600. 10999000.  9797800.
  8599000. 12877000. 11806000.  8998000. 13456800. 10500000.  8866200.
 13373600.  9916200. 13368000.  8613800.  9034200. 10900000.  9920400.
 11520000. 11060000. 13544000. 10401800. 10190600. 10048400. 10788000.
 12049800. 13319400. 12277200. 11745800. 13038600.  7920600. 14749600.
 10190600. 12626000. 13373600. 10325800. 11010400. 11140000. 22636000.
 12036000. 11626000. 14168000.  9940000.  8317200. 11481200. 11500000.
 12035600. 11715800. 12866200.  9387200. 11220800. 14177600.  9558200.
 12794600. 10048600.  9545400. 11657800. 13504800. 10191000. 12961200.
 11924000.  9987600. 10050600. 11824400.  9269200. 10088000. 10089000.
 11826000. 12168600. 10301000. 11001400. 10382600. 11806800.  7788000.
  9142800.  8744000. 10254200.  9918000. 12094400.  9273400. 11995800.
 12363800. 17033600. 11363000. 11735000. 10008600. 11288800. 11818000.
  7963000.  9930800.  9467000. 10320000. 13024000. 10752000. 10008600.
 15598400. 10183200.  9770800.  9673000. 13922400. 12917200. 13034600.
 13030000.  9239200. 13410000.  9469400.  9916200. 11976600. 11597600.
 11924000. 16457000. 10672600. 10704000.  9565400.  8037600.  9686200.
 11392000.  8037600.  9246200. 10050600. 10189800.  9600000. 13368000.
  9860000.  9137400.  9903600.  9920400. 10688200. 11175600.  9144200.
 10843600. 11953000.  9627600. 10026800. 13284200.  9627600.  8785400.
 12404000. 10738200. 11500000. 10048400.  9346800. 11628000.  7767000.
 10505000. 11315200. 12961600. 12189800. 11195000. 14661000.  8657800.
  9797800. 10405000. 24619200. 10320000. 12391800. 11792000. 10778000.
 11363000.  9920400. 11976600. 12156200.  8878000. 12175400. 11596800.
 11385600.  9468800. 10325400. 10175000. 12456200. 11336200. 10869600.
 11936400. 10060000.  9431200. 12594600. 10864800. 14940400. 11650400.
 10969000. 10778000. 12999000. 10050600. 10447000.  9194200. 10060000.
 16656200.  9920400. 10361200.  9412000. 13976400. 12085000. 10240200.
 12518000. 22476000. 10342600.  9956600. 10180560.  9551000. 11465400.
  9297000. 12277200. 11331800.  9073600. 11915800. 12162400. 10152800.
  9378000. 10764800. 13307600.  9114200. 14405800. 11398200. 11335600.
 12429200.  9548160.  8990000. 12260000. 22468200. 10071200. 13922400.
 12055800. 11806800. 11499000. 14842400. 15292400. 11432000.  9652400.
 12000000. 10400000. 10275600. 12038200. 10517200. 14774600. 11235000.
 10358600. 10191000. 11537800. 11554200. 14317800. 13805000.  8969400.
 11628000. 12999000. 10764800. 12594600.  8599000.  9284200.  8862000.
  9986800. 11766400. 11771400.  8120000.  9565400.  9602800.  9972400.
  9491800. 12594600. 12272000. 11038200.  8830200. 13166800.  9164400.
 11596000.  9142800.  9170600. 14486000. 13371200. 14640600. 13236400.
 13316400. 11560000. 10554200. 13038600. 12373000. 14177600. 12756000.
 10398600.  9377800.  9164400. 11010800. 12272000. 10427200.  9221000.
  8380000. 10924000.  9814600. 10593200. 13038600. 11275800. 11505600.
  8850400. 11001600. 14396600. 16507200. 12069600.  8862000. 12538800.
  8938800. 12198000. 10631400.  8850800. 11182600. 11520000. 12363800.
  9472400.  9939600. 11060000. 11481200. 10622600.  8356400. 11060000.
 11780600. 10900000. 12581000. 15292400. 10191000.  9712400. 11771400.
 13373600. 10500000. 12760000. 11432000.  9428600. 11697800. 14168000.
  7879600. 11890000. 11924000. 10467600. 14096200. 10116800.  9632800.
 11972800. 12427200. 13814200.  7884000. 10260200. 11990000.  8990600.
  8594800. 14147600. 12404000. 13855800. 10360000. 12842400. 10625400.
 10924000. 11493400. 12456200.  9014400. 13622400. 10076400. 11902400.
 11265400. 10623000.  9256800.  7718000. 12572200.  9981000. 10230800.
 11924000.  8296000. 11035200. 10732800.  9357000.  7867200. 10191000.
 11500000. 12604400. 10191000. 16245400.  9060000. 12546200.  7832600.
 11194000. 13191000.  9769600. 10783600.  8613800. 11537800. 11940000.
 11562800. 11347600. 11058600. 11275000. 11365400.  8254200. 11876600.
 10600000. 12735600. 12924000. 14072000. 10219400. 10614400. 10194800.
 12278200. 12427200. 13671000.  9805600. 10900000. 11435800. 12256000.
 12272000. 11636400. 13805000. 11035400. 13307600.  9602800.  9268200.
  8352000. 12580000. 11549600. 12254600. 13582200. 12156200.  8915600.
 10465000. 11760000. 11618600. 10820000.  9796200. 12292800. 13671000.
 10783600.  8100000. 13371200.]


r2 score is: 0.02178032644261385
MAE:1602561.434599156
MSE:6029841255257.384
RMSE:2455573.508420667
In [54]:
predict(DecisionTreeRegressor())
Model is: DecisionTreeRegressor()
Training score: 0.8286279132200205
Predictions are: [18074000.         10240000.          9642500.         10738000.
  6963000.          9600000.         11000000.         11134000.
 11951666.66666667  9700000.         10738000.          9860000.
 10931750.         10000000.         10931750.         13593000.
  9384500.         13000000.          7900000.          9200000.
 12000000.         18074000.          9567500.          9289000.
 10190000.          6940000.          9150000.         10738000.
  6940000.          9356000.         10167000.         10363000.
 10240000.         10181000.         11827000.         10987833.33333333
  9000000.         13227000.          8669666.66666667  9289000.
 13000000.         18074000.          8862000.         11900000.
 13792000.         11948000.         11400000.         12948333.33333333
  8900000.          8911000.         10240000.          6963000.
 13016000.         10191500.         10191000.         11200000.
 13592000.          9357000.         10600000.         10415000.
 10000000.         10191000.         10190000.          6963000.
 10500000.         10700000.         12000000.         11400000.
 13500000.         18903000.          9540000.         13415000.
 13562000.         11900000.          9150000.          8832000.
 13150000.          9800000.         10000000.         12000000.
 14267000.          6963000.          9221000.         10425000.
 13000000.         10191000.          9105500.         11500000.
  8600000.         10000000.          9941750.         10191000.
  6535000.          9275000.          9800000.          9289000.
 13546500.         10000000.          8833000.          8833000.
 12000000.          8425000.         10167000.         10008666.66666667
 11400000.         12500000.         11900000.         12000000.
 10191000.         11000000.          6940000.          9340000.
  9356000.         13030000.          9357000.         11864000.
 10450000.          8862000.         13792000.          8862000.
 10000000.         15680000.          9289000.         10191000.
 14049000.         10931750.          8833000.          9357000.
  9675000.         11400000.         12000000.          9000000.
 11400000.          9289000.         10191000.         10191000.
 10181000.         12621500.         10191000.         10167000.
  9306000.         10180000.         12275500.         13593000.
 11304500.         10191000.          8807000.         11766666.66666667
 13792000.          8833000.          8600000.          7300000.
 12133333.33333333  9033000.         13350000.          6940000.
 10621000.          6963000.         10191000.         10191000.
 10175000.         20150000.         15720000.         13900000.
 13050000.         13150000.          9820000.          9100000.
 10240000.         11510500.         10793000.         10008666.66666667
  9941750.         10191000.         12000000.         12500000.
  8833000.         14049000.          6940000.         13248750.
  9300000.          9000000.         13976400.         16845000.
 10191000.         10515000.         10138000.         10191000.
 10000000.          8533333.33333333  9289000.          8287000.
  9800000.         15462666.66666667  9289000.         13016000.
  9150000.         10191000.         13671000.          9288000.
  6963000.         13900000.          9540000.         13593000.
 12707000.         10240000.          8862000.         11155000.
  8340000.         11666666.66666667 14208333.33333333 10191000.
 13300000.          8295000.         12200000.         11079142.85714286
 15462666.66666667  9200000.         12500000.         18903000.
 12500000.          9200000.          6960000.         13152000.
 13590000.         12000000.          9500000.         13671000.
  7420000.          9500000.          8505000.         10191000.
 12000000.          9844000.          9200000.         18074000.
 10000000.         13671000.         10240000.          9880000.
  9642500.         10191000.          9275000.         15666000.
  6950000.          9289000.          9357000.         11343000.
  9289000.         10175000.         10191000.         11500000.
 13590000.          8807000.         10738000.          8000000.
 10191000.          9941750.          8600000.          8417000.
 13030000.         13086333.33333333  8833000.         18074000.
 10191000.          9289000.         10240000.         13000000.
 12439000.         13976400.         12000000.         12081333.33333333
  8020000.         12386166.66666667 13792000.         10000000.
 18856000.          6963000.         16248000.         13150000.
 11860000.         13593000.         13532000.          7540000.
 12000000.          8904000.         10240000.         13152000.
 10962500.         10000000.         10558333.33333333 14045000.
 10191000.         10191000.         10666666.66666667 18856000.
  9781250.          7900000.         13152000.         10191000.
  8666666.66666667  9780000.         10240000.         12000000.
 10191000.         11531000.         10191500.         11000000.
  6940000.          9289000.         12325500.         10167000.
 13152000.          8911000.         13976400.         11900000.
 10700000.         10191500.         13590000.         13152000.
 10738000.         10191000.         10191000.         11948000.
 10400000.         14019666.66666667  8295000.          8533333.33333333
 10694000.         12995000.          8599000.         11400000.
 13151000.          8460000.         10000000.          8460000.
 13532000.         13450000.          9289000.          9844000.
 11827000.         10190500.         14437333.33333333 12988400.
  6130000.         11744750.         15967666.66666667  8500000.
 11200000.         13000000.         13030000.          9129666.66666667
  6940000.         13450000.         11000000.         13152000.
 13213000.         10425000.         10181000.          8862000.
  8833000.         12800000.         13500000.         13227000.
 13152000.         11610800.         10191000.         18074000.
 10191000.         15790000.          9306000.         12500000.
 10500000.         10000000.         10000000.         10000000.
 12427200.         13414000.          9275000.         13000000.
 14813333.33333333 10191000.         11285000.         11500000.
 10000000.         12500000.          6940000.         16845000.
  9680000.          6963000.          6963000.         11948000.
 10191000.         18074000.          6963000.          9105500.
 14019666.66666667 10191000.         10700000.         11000000.
 11400000.          9289000.         12000000.         10191000.
 11330333.33333333 10138000.          9357000.          8669666.66666667
 11000000.          9306000.         11000000.         10191000.
  9357000.          8911000.         10190500.          6963000.
  7900000.         10240000.          9844000.          9289000.
  9844000.         10700000.          9289000.          9357000.
 12200000.         10191000.         13532000.          9328400.
  6963000.          9289000.         11827000.          9289000.
 12763000.          9900000.         10700000.         14049000.
 10000000.         11400000.          9289000.         13414000.
  9781250.         12500000.         11200000.         10191000.
  9500000.         10191000.         10605000.         10735000.
 13152000.         13248750.         11800000.         11400000.
 13000000.         10175000.         10191000.          9100000.
 12000000.         11343000.         10086250.          9289000.
 11100000.          9860000.         10190000.          8425000.
 10987833.33333333 10363000.         12275500.          6130000.
  6963000.         10200000.         10621000.          9221000.
 10191000.         11879714.28571429  9356000.         13152000.
 12120000.         13200000.         10950000.         10190000.
  9306000.         12000000.         18074000.         10191000.
  9780000.         12948333.33333333  7695000.          6940000.
 10000000.         12825000.         10191000.          8979000.
 13227000.         13000000.          6963000.          9844000.
  9357000.          9289000.         12970000.          8660000.
 11380000.          6940000.         11000000.         13030000.
  9306000.         10000000.         10191000.         18074000.
 10660000.         11864000.          6900000.         11277000.
 10191000.         11000000.         12223000.          8980000.
 18856000.         12641000.         10191000.          9357000.
  9357000.          9306000.         10191000.         11430000.
  9700000.          8599000.          9221000.          9150000.
 10190000.          9288000.         10000000.          7548000.
 14157000.          9800000.         14672500.          9289000.
  8909666.66666667  9500000.         10191000.         12400000.
 10962500.         11860000.         11000000.         10191000.
  9400000.          9000000.          8904000.          8000000.
  9400000.         10288000.         13671000.          6963000.
 18903000.         10190666.66666667 11330333.33333333 14157000.
 11430000.         10621000.         12030000.         11200000.
 11000000.         12948333.33333333 18856000.          6960000.
  6963000.         13590000.         13543000.          6960000.
 11000000.         11948000.          9889428.57142857  9221000.
 14157000.         10191000.         10830000.         10167000.
 10191000.         10000000.         11500000.         10191000.
 10240000.         13079333.33333333  6940000.         10086250.
 13593000.          9780000.          8505000.         10845000.
 12950000.          9246000.          9844000.         13227000.
 10971000.         10240000.          8807000.          9100000.
 10191000.          9780000.         11800000.          9246000.
 10738000.         13000000.         12641000.         13543000.
 12000000.         11330333.33333333  9790000.         10191000.
 11200000.          8303000.          6940000.          8951000.
 11400000.         10167000.         10415000.         10191000.
 13000000.         10240000.          8900000.          8505000.
 13152000.         13485000.         11400000.         13030000.
  9300000.         12000000.          9289000.          9800000.
 12120000.         10167000.         10191000.          8295000.
 10672600.         11100000.          8600000.          9357000.
  6940000.         11400000.          9357000.         10600000.
 10086250.         10167000.          9866666.66666667 14672500.
  9860000.          7540000.         11827000.         10191000.
 10191000.         13304666.66666667  8460000.         10191000.
 14045000.          8862000.         10167000.         12168000.
  8862000.          7353000.         13592000.         11000000.
 10750000.          9400000.          9306000.          9820000.
  6963000.         10191000.         11315200.         14500000.
 10950000.          9540000.         15080000.          9289000.
  9700000.          9890000.         11200000.         11400000.
 13500000.         13304666.66666667  8287000.         12000000.
 10191000.         12120000.         10694000.          9356000.
 11500000.         10893000.          8911000.          6963000.
 10607714.28571429 10181000.         12386166.66666667 13415000.
 11510500.         13150000.          9150000.          6940000.
 12223000.         10180000.         18074000.         17620000.
 10191000.          8287000.         12386000.         10086250.
  6963000.          9357000.          9150000.         13229000.
 10191000.         12120000.          8340000.         13976400.
 12500000.          9289000.         12000000.         10180000.
 10709666.66666667  8833000.         10138800.         10191000.
 11000000.          9357000.          9400000.         10191000.
  9357000.         13979000.         11333333.33333333 10000000.
  8833000.         11384250.         20150000.          8533333.33333333
 14500000.         13590000.         11335600.         15562000.
  6940000.          9340000.         12450000.         10167000.
 13976400.         13152000.         13150000.         10240000.
 11000000.         12000000.         18074000.         12007500.
  9594000.         11900000.          9833333.33333333 10524000.
 13000000.         13000000.         11827000.         10900000.
 14049000.         10191000.         10191000.          9844000.
 13000000.         14208333.33333333  9357000.         13400000.
 12325500.         11384250.         12223000.          8599000.
  8911000.          8862000.          9941750.         10190000.
 11766666.66666667  9000000.          8600000.          9357000.
 10191000.         10363000.         12386166.66666667  9357000.
 10515000.          7980000.         13590000.         10191000.
 10240000.          9100000.         13213000.         21660000.
 12250000.         15551000.         12970000.         13587000.
 12900000.          7900000.         13671000.         12373000.
 14157000.         13152000.         12500000.         10000000.
 10191000.         13227000.         12853333.33333333  6963000.
  9221000.          6963000.         11500000.          9500000.
  9275000.         13671000.         12265000.          8807000.
  9356000.         10191000.         13587000.         15462666.66666667
 13152000.          8862000.         13000000.          7540000.
 13590000.         12663000.         10000000.         13590000.
 11900000.         12641000.         10000000.          9289000.
 10962500.         10508000.         10181000.          8669666.66666667
 10962500.         11000000.         10750000.         12948333.33333333
 10987833.33333333 10738000.         13000000.         11766666.66666667
 18074000.         10000000.         10000000.         12007500.
  7920000.         10694000.         18856000.          6940000.
 11000000.         10191000.          9275000.         10240000.
  9820000.         13593000.         13900000.         12427200.
 10190000.          8700000.         12440000.         10200000.
  9357000.          6963000.         12200000.         13592000.
 13000000.         11864000.         13592000.         11277000.
 11500000.         10191000.         12386166.66666667 15666000.
 10500000.         10000000.         10240000.         11000000.
 10175000.          9207000.          9000000.         13592000.
  9600000.         10718000.         10191000.          9289000.
 12386000.          8807000.          9357000.          9357000.
 10191000.         10750000.         10191000.         10191000.
 18966666.66666667  6960000.         10191000.          9500000.
 13500000.         14019666.66666667 10191500.         10931750.
  9289000.         12435666.66666667 10000000.         10605000.
 13000000.          9500000.          9275000.         11304500.
 10191000.         11876600.         10666666.66666667 13200000.
 12500000.         13361000.         10735000.         11000000.
  8460000.         13200000.         12427200.         10240000.
  8060000.         10750000.         11744750.         12300000.
 12853333.33333333 13300000.         14208333.33333333 10175000.
 12657000.          9766666.66666667  9210000.         20150000.
 11400000.         14478000.         10621000.         13671000.
 10694000.          8833000.         12500000.         12500000.
 10515000.          9200000.         11864000.         13152000.
 13671000.         10931750.          8166666.66666667 12400000.        ]


r2 score is: 0.1333704497598801
MAE:1204078.8903958208
MSE:5341988876649.26
RMSE:2311274.2971463297
In [55]:
from sklearn.svm import SVR
predict(SVR())
Model is: SVR()
Training score: -0.10142340508156522
Predictions are: [10239983.89042958 10239983.75085534 10240000.46946491 10239983.62683526
 10239990.06540089 10240000.2771586  10239999.67389539 10240001.01559148
 10239983.9759984  10239983.87823735 10239984.34602979 10240000.0594255
 10240000.03603657 10240001.16284888 10240000.08466693 10239991.51281347
 10240000.34288639 10240000.14804831 10239982.41409743 10240001.31731123
 10240001.26852079 10240000.87982046 10240000.89547878 10240000.64622051
 10239984.16231241 10239983.95700357 10239983.89283117 10240000.17476556
 10239982.67450303 10239982.63038223 10239984.36394231 10240000.29452791
 10239983.93700596 10240000.01785966 10239983.69737588 10239999.54145352
 10239983.35258133 10239991.1075858  10239983.9451124  10240000.65627546
 10239999.98445877 10239983.84940212 10239983.59812495 10239999.94081811
 10239983.87130457 10240000.87372145 10240016.38301246 10239983.29541969
 10239984.38455338 10240000.92276649 10239983.90971699 10239984.33754115
 10240000.2810651  10239982.9199684  10239983.355463   10239991.40926614
 10239999.81806079 10239983.69004496 10239999.84501375 10240000.64467064
 10240016.16428954 10239983.355463   10240001.22624923 10239983.82708905
 10239984.04266016 10239991.75333719 10239983.96537656 10240000.92559991
 10240000.65260272 10239991.51625464 10239984.38529799 10239999.70089248
 10240000.42227965 10240000.66875654 10239999.69377978 10240000.0347028
 10239984.10781597 10239999.94770267 10239983.86362596 10239983.97904021
 10240000.47740129 10239983.22777822 10240000.47672512 10239984.00204818
 10239984.03986979 10239983.83608084 10239983.2818275  10240000.54433726
 10239999.91176951 10240001.35633105 10240000.60649854 10239984.24443222
 10239984.08205518 10239983.33639122 10239983.94939665 10239989.79286648
 10239983.68854008 10240001.07222661 10239983.59450958 10239984.34631829
 10240001.37483009 10240029.11860001 10239982.72169259 10239999.70744108
 10240000.85188106 10239984.03436342 10240000.83435825 10239984.2178234
 10239983.47214303 10240001.54407351 10240000.62107622 10240000.20013622
 10239982.62388015 10239991.43594906 10239982.56699801 10239999.84579267
 10239983.79611537 10239982.39916909 10239983.73833253 10239983.07296192
 10239983.97226284 10239982.69581863 10239983.04851886 10240000.09018785
 10239984.44990601 10240000.03603657 10240000.2847639  10239983.6625489
 10239999.65402674 10240000.70459649 10240001.10333688 10240000.0352572
 10240000.66232388 10239984.27034556 10239983.4234814  10239999.94381852
 10240000.0284298  10240000.54206098 10240000.00820804 10240001.09304662
 10239982.67837049 10240000.56955618 10240000.74047422 10239984.06763407
 10239983.35481528 10239983.8609548  10239984.07956762 10240000.35891826
 10239983.78494692 10239982.72227955 10239999.87260178 10239989.86936542
 10240000.1120022  10239991.55612504 10239989.91732819 10239983.6125597
 10239983.82756322 10239982.37930167 10240000.67603803 10239983.4234814
 10240000.05894122 10239982.80410517 10240000.28923774 10240001.72390971
 10240000.95445657 10240001.24627331 10239999.91168881 10239983.90731166
 10239983.81346623 10239983.69037904 10240001.23805674 10239999.70744108
 10240000.60649854 10239984.31600256 10239984.03488021 10240000.89839579
 10240000.24273155 10239999.85828927 10239982.87338779 10240016.27689682
 10239999.95526665 10240000.51191506 10239999.57875004 10240000.10899084
 10239983.39871739 10239983.53984838 10239983.78892538 10239983.46520781
 10239982.95492291 10239983.04271258 10239983.18130187 10240000.19603233
 10240000.02674492 10239999.73483021 10239983.81942078 10240000.94671445
 10239983.69359055 10239983.16398552 10239991.83181815 10240000.42818841
 10239984.30826081 10240001.66234722 10239984.23135949 10239983.99449498
 10240017.48260121 10240000.07569334 10239983.51321538 10239999.49444338
 10239984.1597205  10240000.81673188 10240001.30743493 10239983.35799554
 10239983.46755776 10239999.78511318 10240000.90301408 10239983.74355634
 10239983.84399932 10239984.02523299 10239983.38044051 10239991.47561376
 10239983.38044051 10240000.52741068 10239999.99683315 10240000.4286695
 10240000.58516035 10239999.84471657 10240001.73430968 10239991.79481526
 10239999.87659952 10239984.58233622 10239999.89944634 10239983.36256811
 10240001.24456661 10239999.7990719  10240000.52741068 10239983.90317506
 10239983.19042741 10239999.51015202 10239983.81346623 10240000.20934857
 10240000.46946491 10239983.7996383  10239983.38330811 10239983.30204684
 10239982.30043124 10239984.27034556 10239982.7816524  10239983.60408641
 10239983.74807175 10240000.21383469 10239983.1698397  10240000.22432884
 10240000.87289746 10239982.28084454 10239983.62683526 10240000.03771001
 10240000.79113831 10240000.60649854 10240016.68116001 10239982.82385421
 10239984.16617039 10240000.76019447 10239983.69073869 10239991.44314841
 10239989.76483097 10239983.05520829 10239991.43975452 10239984.03725389
 10240001.47923959 10239999.57875004 10239983.27105884 10240000.23070763
 10239982.89084762 10240000.21249131 10239983.82475278 10240000.44099542
 10240000.71599083 10239982.33756781 10239983.58461859 10239983.71290623
 10240000.87017442 10239968.49929088 10240000.97830009 10239984.09559207
 10240000.63258387 10240000.08569118 10239991.45334689 10239983.76163548
 10240000.92500502 10239999.79741    10239983.32460351 10239983.79001093
 10239984.20881585 10240000.2695107  10240000.42049194 10239983.36609545
 10239999.72018882 10239982.53453706 10239999.64324536 10239983.24926629
 10239983.97312418 10239983.06786462 10239991.46356743 10239991.56713865
 10239982.80267818 10240000.06471268 10239983.31209513 10240000.49670315
 10239982.61523806 10240000.45791436 10240000.41193346 10239982.72169259
 10240001.18949775 10240000.92276649 10239999.80915948 10240000.95582927
 10239983.85112571 10239983.31209513 10240000.94844328 10240001.18419679
 10240000.13272952 10239983.41531677 10239983.22948927 10240000.87372145
 10239983.19124562 10240000.81918622 10239999.75461175 10239983.04271258
 10239983.94166846 10239999.61260079 10239983.76889618 10239999.80277617
 10240000.31649764 10239983.23913711 10239999.92329166 10239983.23913711
 10240000.33419594 10239983.73208012 10239982.968766   10240000.26635866
 10239983.87476879 10239999.92954324 10239983.94935928 10240000.34315227
 10239984.27659558 10239999.7040807  10240000.65006294 10239989.73014085
 10240000.56207694 10239999.91686539 10240001.81555241 10239983.35608101
 10239999.98121068 10239983.73208012 10240016.3689185  10239999.79949404
 10239984.05185832 10239983.88330058 10240000.01363801 10239984.10919619
 10239982.78689518 10239999.97638537 10240000.48889084 10240000.72854263
 10239999.83585929 10240000.05843489 10239989.76483097 10239991.44654521
 10239984.50447432 10239999.81732769 10239983.27464452 10240001.23456974
 10239983.90313046 10240001.16284888 10240000.73514256 10240000.03150077
 10240000.57134593 10240000.57128858 10240000.93161319 10240016.60850224
 10240001.40959865 10239984.46774119 10239984.15314762 10240001.10886371
 10240000.26861391 10240001.23456974 10239983.92407158 10240000.14785771
 10239982.56340273 10239982.64792086 10239983.9177475  10240000.90529758
 10239982.69027793 10239983.89042958 10239982.58923657 10239983.2818275
 10240000.81918622 10240000.1623547  10239983.68153076 10240000.60429866
 10240001.38247866 10239983.12978137 10239984.03488021 10239982.88884119
 10239999.8912241  10240000.07375198 10239968.02674066 10239983.97116485
 10240000.97381942 10239982.48591709 10239999.89437805 10239982.70080407
 10239983.57917608 10239983.95998576 10239999.92954324 10240000.38846962
 10239983.89797628 10239999.78784204 10240000.02053383 10239983.84686655
 10239991.63820154 10239983.68153076 10240000.41515866 10239982.1255095
 10239999.70318047 10239983.21694253 10240000.62204755 10239984.07138849
 10239984.02932823 10239983.00965217 10240001.10792545 10239983.14035535
 10240000.04669892 10239982.59274825 10239983.85112571 10239999.85828927
 10240001.16284888 10240000.71548696 10239983.81284293 10240001.67084921
 10239999.72018882 10239983.96431121 10240000.54241494 10239982.68857634
 10240001.77628322 10239983.07161303 10240001.67054062 10239982.84350908
 10239983.58558584 10240016.27689682 10239984.09730569 10240001.28958857
 10240000.14804831 10240000.25522543 10239984.18379056 10240001.01740763
 10239983.94300395 10239983.60408641 10239983.98377396 10239983.20742523
 10240001.7496471  10240000.0594255  10239991.37354604 10240029.08443286
 10239999.54145352 10240001.16058953 10240000.74047422 10239984.32292802
 10239984.35078543 10240000.31491686 10240001.23836786 10239982.57662302
 10239999.8455779  10240001.49352493 10239982.65770052 10239999.64324536
 10239983.20859223 10240000.51034641 10239991.45338694 10239983.16929805
 10239982.67837049 10239999.6416426  10239991.44654521 10239984.02307542
 10239983.12681357 10240000.42811163 10240000.03974045 10239982.70188224
 10239983.80433955 10239984.74601518 10239983.45692982 10239983.03434308
 10239991.1075858  10240000.2993688  10239982.64538746 10239984.18535159
 10239984.02759437 10240000.06502908 10240000.24516367 10240001.52335478
 10240000.55975996 10239982.85899803 10240016.54190438 10239984.22726333
 10239982.67837049 10239989.85947683 10239982.90198579 10239983.84940212
 10240000.87313666 10240000.30017041 10240000.67303696 10239999.90490404
 10239984.20881585 10239984.0989367  10240000.28456653 10240000.26954046
 10240000.63610919 10240000.96479462 10239984.15774035 10239968.066914
 10239983.26955457 10239982.42679573 10239983.62063047 10239983.41897732
 10239984.19983872 10239983.7635955  10240000.44832394 10239999.69377978
 10239989.86628205 10239983.98594787 10240000.44099542 10239983.36832835
 10239991.41272549 10239983.1771161  10239999.59267801 10239983.75338062
 10239982.72392761 10239991.65967127 10239983.36794303 10240000.6557607
 10240000.92500502 10240000.87017442 10240000.52306047 10240000.23765894
 10239983.18757356 10239984.00339525 10240000.16113013 10240000.63243198
 10239983.39782362 10239983.77637982 10239991.78806157 10239982.30492353
 10240000.6524591  10240000.12604939 10239999.8867498  10239991.41272549
 10239984.27876969 10239999.99782672 10239983.7835764  10240000.54241494
 10239983.81874272 10240000.38587831 10240001.12716226 10239999.99683315
 10240000.3870072  10240000.69988481 10240001.60735736 10239982.73222654
 10240001.53574814 10240000.90529758 10239983.76969084 10240000.47672512
 10240000.25970033 10239983.34816227 10240000.50292439 10240000.22932753
 10239982.70626501 10240000.26861391 10240000.99644244 10239983.05970691
 10240000.28099497 10239983.17506008 10239999.94427213 10239983.98377396
 10240000.65136088 10239983.12681357 10239999.89944634 10240000.66146827
 10239991.80015035 10239983.62073718 10240001.47279718 10240000.72854263
 10239983.36815947 10239991.41946031 10239982.28056908 10239983.90731166
 10239984.18379056 10239983.60714336 10239983.33685147 10239983.57298079
 10239983.62683526 10239999.74506809 10240000.80316364 10240000.61341507
 10239983.95871169 10240000.24219733 10239982.53593086 10239982.85076638
 10239999.75908681 10239982.58757516 10239984.36103826 10239989.54086981
 10240000.21945306 10240000.27912601 10240000.64467064 10239982.69475453
 10240000.72610517 10240000.42109426 10239989.66624619 10240000.03898373
 10239983.76163548 10240001.12977859 10240000.80157157 10240000.49915075
 10239983.0543609  10240000.63258387 10239983.19176769 10239983.1771161
 10239983.16675486 10240000.88455035 10239983.15874931 10240001.83078674
 10239983.60002683 10239991.66412879 10239999.91176951 10239983.37024374
 10239984.15612574 10240000.9161286  10239983.35767824 10239999.83522995
 10239983.98377396 10239983.18442499 10239999.96091472 10239999.59267801
 10240000.0594255  10239983.70920413 10239991.18626316 10239983.36794303
 10240001.1985147  10239984.24238026 10239983.23913711 10239983.5587185
 10239983.31393004 10239983.67592655 10240000.77547987 10240001.0200186
 10239983.67592655 10239991.64495854 10239999.87850587 10239983.53929211
 10240001.66099231 10239983.18757356 10239999.8818814  10239999.93056341
 10239967.20783204 10239984.46737335 10239999.9025948  10240001.2688187
 10239991.46363936 10239984.38529799 10239999.87228518 10240000.1128121
 10239984.19983872 10240001.05964703 10240000.56207694 10240000.21945306
 10240000.48889084 10239983.84542732 10240000.37021833 10239983.95871169
 10239983.36794303 10239983.16675486 10240001.68967871 10239983.24764992
 10239983.14734241 10239983.42760956 10239983.98688286 10239999.88349393
 10239991.06061465 10240000.00438321 10240000.93205062 10239999.90137723
 10239983.69037904 10240000.14760584 10239983.69359055 10239982.87817862
 10240000.24581052 10240000.63480108 10239999.72835158 10240001.54645189
 10239991.11263806 10240000.37021833 10240000.45405178 10239983.98377396
 10239982.77055559 10239984.12234089 10239983.89283117 10240001.12108742
 10239983.35731552 10239983.20859223 10239984.15827136 10239999.57875004
 10240001.53891484 10239983.80002957 10240001.10269277 10240000.60991034
 10240016.37673429 10239984.3922072  10239982.64807916 10239984.33163774
 10239983.8204531  10239982.86834477 10239983.39782362 10239991.4828061
 10239999.81869561 10239991.41939399 10239983.64580919 10239982.92870047
 10239982.8179761  10240000.42543185 10239982.73735155 10239983.04271258
 10240000.07166416 10240000.5537795  10240000.79352488 10239983.13305846
 10239982.90630692 10240000.15761868 10240000.11156365 10240000.78168604
 10239999.80915948 10239983.76163548 10239984.01975349 10239991.41946031
 10239999.65444299 10240000.73925691 10239983.84940212 10239983.47049654
 10239984.51139868 10240000.8540947  10239999.79754834 10240000.48841599
 10240000.14169677 10239984.16955172 10240000.57295551 10240001.40425639
 10239999.85828927 10240000.03262961 10240000.04291864 10240000.69147649
 10239984.03725389 10240001.34960677 10239989.91539146 10239999.88980664
 10240000.41193346 10240000.42543185 10240000.27440623 10239983.77431327
 10240000.92276649 10239983.39324067 10240000.60649854 10240000.04052796
 10240000.35891826 10240000.0111535  10239999.91176951 10239982.6672795
 10239983.67366979 10240001.16058953 10240000.21249131 10239983.96730249
 10239983.53984838 10239982.73594686 10239999.8768899  10239999.85556425
 10239983.80002744 10239983.90731166 10239983.29427673 10239999.7826496
 10240000.70950047 10240001.35528936 10240000.23527187 10240016.31519689
 10240000.00236133 10239991.185552   10239991.81839663 10240000.7537528
 10240000.25970033 10240001.77136857 10239983.24336101 10239983.34443963
 10239999.84895775 10239991.08389818 10239984.0587597  10239984.26259761
 10239982.58206499 10239999.98055477 10239983.19726925 10239982.88074937
 10239983.35185558 10239991.78468278 10240016.39860998 10239983.40804626
 10239982.64377997 10239983.62063047 10239999.61971365 10239999.74119187
 10240000.2136042  10239983.38389163 10239999.80505962 10239984.0125037
 10240001.13360748 10239984.49301707 10239983.36693924 10240000.87289746
 10240000.66875654 10240000.80316364 10239983.34733836 10240000.25082549
 10240000.92500502 10240000.65967933 10239983.88349921 10239983.97116485
 10240000.92500502 10239991.45565608 10239991.65923877 10240000.42811163
 10239999.78258852 10240000.12275086 10239999.84068627 10240000.35891826
 10239991.44994475 10240000.44099542 10239983.7917309  10239983.47049654
 10239983.84066233 10239983.69124712 10240001.12716226 10239984.02811035
 10240001.41358142 10239983.16398552 10239983.53832575 10239983.69760318
 10239983.35007552 10239983.37242759 10240000.86359889 10240000.57134593
 10239984.16231241 10239999.84441646 10239999.82678599 10240000.42732158
 10239983.73205662 10239984.4363267  10239999.70318047 10239999.85820676
 10239984.04158193 10240000.69553357 10240000.10017118 10239983.29436135
 10239983.2108495  10239983.355463   10240000.93205062 10239983.21750987
 10240000.2667283  10239999.92329166 10240000.46673528 10239983.648337
 10240000.2013222  10239982.57444086 10239982.48828273 10240001.34332919
 10240000.2771586  10239983.79656953 10240000.70821097 10239999.8816712
 10240000.47529371 10239983.29468102 10239982.13352975 10239983.6504364
 10240000.07473515 10240001.66099231 10239983.16326816 10239983.41831762
 10240001.13970455 10239982.89822844 10240000.72152404 10239982.36495605
 10240001.03691022 10240000.81918622 10239982.9199684  10240000.03603657
 10239983.74807175 10239983.20808293 10239983.80433955 10240001.67054062
 10240001.24382214 10240000.73277916 10240001.29311734 10239983.35481528
 10239982.77322674 10240001.23518851 10240000.42049194 10240001.52128495
 10240000.32746757 10239999.72757795 10239982.84350908 10240000.49670315
 10239983.61689849 10240000.12134467 10240000.57134593 10239999.5691888
 10240000.31843    10239991.65923877 10239999.7040807  10240000.80951511
 10239984.0587597  10239983.46755776 10240001.34960677 10240001.30668274
 10239982.78290955 10239982.83372856 10239982.87756693 10239982.29703471
 10240000.91273953 10240000.17319095 10239983.83783546 10239999.59436949
 10240001.67952035 10240000.11044624 10239983.32039386 10239983.42061822
 10239983.86990066 10240000.2523462  10240000.70244831 10240001.0011267
 10239999.55830229 10240000.03603657 10240000.93739753 10240000.90001997]


r2 score is: -0.10686130024957996
MAE:1844664.2279733596
MSE:6822800759896.2
RMSE:2612049.14959428
In [56]:
predict(GradientBoostingRegressor())
Model is: GradientBoostingRegressor()
Training score: 0.4345350703949775
Predictions are: [12278379.25486124 11987443.77203916 10578117.74595412 10821026.43045443
  9515729.69618113  9867731.8971204  11860187.699257   11217865.74928253
 11716830.94126745 10675195.57372211  9407865.9556489  10700781.29273112
 10074713.57883588 11425213.0152074  11588746.94803873 12317616.96696841
 10340537.8659771  11677710.86331408  9314204.80594659 12117375.48518873
 11524599.1008865  13362041.41840967 11266218.09148607 11717349.8089743
 11460509.26919914  9153859.6167364  10791864.8800987  11355806.79740388
  9316644.06198257  9291136.55671241  9602291.82712007 11116522.50595972
 12141535.36417897 11097500.28024694 10932939.40122627 11105152.64134917
  9752794.00754578 10622552.4026015   9257336.7902674  11841567.65638742
 12084218.98124851 12374670.2652023   8462604.04585937 12576389.26477038
 11131353.3021843  11556931.22354305 11518411.11662018  9969791.26629312
 10710998.02150663 11712865.15595514 12433550.58805806  9360892.46439388
 13057108.29001213 10555784.5238386  11471339.54038181 10790621.69446459
 12219734.59335892  9122396.81423306 10100619.19252755 11432912.29439857
 10644348.20334018 11471339.54038181 11261521.77005752  9022328.86930378
 11215430.08192426 11405573.37375988 11167491.99827528 11460897.10484065
 13309629.08353271 13106215.89814725 11651239.19874294 11120736.3211245
 14476752.80736343 12043849.19413946 10689247.49955449 10273802.45505822
 12374331.28782414 11314920.90220814 10471132.85821932 11349718.45485509
 13331900.76296324 10424884.69634467 12550237.26373697 10622875.92388505
 11528760.61037202 10330547.9063325  10101447.79423673 11051347.77262893
  9725396.56713304 11732949.3136253  10663319.26310891 10820495.42178131
  9545698.95507875 10091661.32756305 10240883.09917894  9360465.96466181
 10908841.48608065 12729042.60275896  9767546.15417895  9780812.4252166
 11699053.09000588 10480988.81825573 10234488.09409324 11120736.3211245
 12351861.29397591 12107038.63501547 11950096.24117031 11261192.62206767
 10152182.69302611 11946583.43512949 10173871.69522548 10848140.4639929
  9250602.07768649 12251098.07582411  9400390.66314127 13039612.01296973
 11217932.40080935  9468938.22101319 11054809.4624962   8585695.41890312
 10262468.36250443  9704317.71977953 10281995.58531775 10699891.09195577
 11412620.06594624 10074713.57883588  9369243.25727139  9809763.06610002
 11455069.64591196 12043849.19413946 12790646.09361659  9878036.04588398
 11664243.02927453  9292221.1206075  11981026.56227502 10234845.08403092
 11097500.28024694 12366843.84717264 10179713.81828344 12025931.16237377
  9483865.0305641  13801936.8953483  12447074.67241274 11452617.03435148
 10527817.59843464 10355261.9721521  10071317.56104797 11710933.59560301
 11094467.67909619  9635855.53956974  9580274.02930825  9494586.95758893
 11401757.11232354 11520196.49920162 12638962.5808744  10437980.35333718
  9951612.20071806  8905865.53962594 10511368.71304882 11981026.56227502
 11049462.17323254 10046487.81660331 12043120.71090644 12837304.49083962
 12260525.15495863 13878894.84667713 10126198.24345644  9220253.33166555
 12079083.06350794 10364648.12172863 10817475.05476396 11120736.3211245
 10663319.26310891  9531238.13359584 11926402.77993901 11415766.44872087
  9278986.6528553  11178421.11894341 10437177.133988   11986722.6846994
 11150143.44566896 10890494.52966445 12939901.39000344 12300797.41140034
 10878183.1692394  11084986.03559949 11726711.67444189 10849863.94131942
 10165768.13926253  9509420.94126546 10428508.10747094 11533033.62088631
 10910978.38184392 13489963.88925968  9818933.53235245 11381480.6659793
 10908504.84325871 10271479.32715561 12236096.26322862 10030815.57077776
  7875269.69921548 13338264.60296041 10811523.95938186 11639146.99919722
 12273404.50358932 13134816.73090323  9194671.58014234 11565921.27032844
 10126958.86576349 11937982.08941876 11450116.30570954 10321201.32630709
 11436013.51403442 11487395.53954188 12611177.8831647  10990077.27860639
 12889269.59085373 10353459.18405551 10062646.41256699 12310243.42146362
 10062646.41256699 12702987.95995932 11822033.9770415  12527746.07778017
 13056185.66043962 11135345.67591466 10591185.84756908 12041707.12797383
  9712356.85971838  9136327.39744623 11353436.21271882  9789770.79479713
 11842359.13567111 11530586.48570639 12702987.95995932 12318913.73388716
  9807488.88514122 12297673.03394154 12079083.06350794 10453802.51035966
 10578117.74595412 10989339.14937782 10176224.90877298  9646337.21139241
  9995319.73496452  9292221.1206075   9829394.98561388 11442300.40340256
  9467727.83816023 10678999.44351289 10082936.7115202  10846938.34859066
 11950372.83768577  9366717.40889241 10821026.43045443  9889863.75782385
 12816954.55657566 10663319.26310891  8936624.10576029 11899216.5562429
 12926130.90154577 11847716.85740199  9624468.17360664 12370709.7473315
  9884935.53736597  9967430.64573582 12370709.7473315  11679681.47822314
 12017510.34072699 12939901.39000344 10454804.2595589  10988145.61814971
  9659747.90496955 13786275.65448609 11091695.08558431 10090932.63247402
 13865066.95751449  8905865.53962594 11593690.45019905 10542957.39253252
 12999037.85384154 11654309.31457908 12241416.83512593  9670531.21407922
 12925427.06636439 11002652.54578556 12451590.22591677 12240605.78332297
 11392664.45974742 11876324.50345457 10469605.65503562 10268635.89018489
 11619363.70502062 11670998.37580647 10280646.48386809 11660140.69427817
 11014712.32140393  9231399.27663221 11833794.71953871 10336430.86164425
 10762529.00407756  9561366.31315011 12159575.00203768 13243943.50408723
 10476426.69183302 10366870.98692282 10801279.10825087 11195345.9415614
  9244454.95187326 12091353.28411996 12651879.07634935 10234488.09409324
 13349983.1264515  11712865.15595514 12033422.16383369 13218968.95632848
 10694154.97973673 10801279.10825087 12353056.85914175 11051086.94610275
 10854330.571269   10480048.17482837 10319594.31895445 11556931.22354305
  9758215.7803932  13036685.35285905 10806659.05933022  9509420.94126546
 11747697.28415732 11693481.90412549  9448962.59075046 11109766.62498578
 12464879.38181848  9869341.73818508  9896406.55225802  9869341.73818508
 11702524.90525524 13137369.56309217  9509949.50197311 11110015.67941965
 11069525.5550786   9613402.34219933 12915525.09812913 12602894.18269787
  7781470.14925982 12105797.68537678 14231461.02576287  9833981.57688144
 12239029.17512517 10723886.57483447 12652773.39760626 10098257.38787499
 11828174.62664907 13137369.56309217 10439554.37961506 10381108.09112629
 10324450.50964559 11839374.87936567  9522072.58553015  9493569.65562817
  9846783.87487568  9444531.17805464 13256866.54692578 11386735.18773634
 11687611.99666889 10529135.64324162  9884935.53736597 12411244.22635742
  9327038.89235291 12929093.68902682  9798224.60289565 11587617.55550325
 11239614.55178871 11425213.0152074  12105664.1259044   9849105.75263176
 11762832.41576565 11430918.71007511 11544472.35611688 10816498.96832388
 12704027.7315981   9681122.32775771 10243495.23278465 12214092.26732358
 10342446.07236982 11587617.55550325  9287969.54190301 12956746.66634665
  9525557.01586115  9508956.98173187  8965016.70168637 11206465.57220389
 10234670.06035716 12278379.25486124  8558330.90264517 10101447.79423673
 13036685.35285905 10384361.41110299 10452787.54662357 12724022.20977739
 12978298.25248506 10117836.89230464 11926402.77993901  9918576.80446465
 13247928.37867202  9308965.15359321 10163396.95187413  9748534.60775454
 12591222.83174302  9110622.34951071 10077105.71465052 10137231.87700078
  9490777.84260067 10417354.44790702  9613402.34219933  7535617.3012915
  8777824.19061887 13434207.35794454 11548131.06470327  9925208.98192293
  9892996.79229336 10452787.54662357  9342323.21269421  9538190.85915497
 12391781.03602764 11417740.70086191 11842359.13567111  8910957.83757411
  9616243.67546548  9866979.9191376  11499021.28489533 10306638.04620101
 11273644.50961258  9391047.98079007 10694154.97973673 11178421.11894341
 11425213.0152074  12084383.67316538  9818933.53235245 11660305.44555157
 11014712.32140393 12009665.63347716 11726051.84882494  9805776.97839174
 10713055.90883901 10288858.29290726 11982574.30987554  9926043.1361283
 10927701.07775112 11986722.6846994  10559750.69337453 11649693.21072555
 11677710.86331408 10854014.5372883  10254986.40653709 11417045.29584165
 11167721.33738502 11442300.40340256 10308302.50367404 10428508.10747094
 12078233.73518743 10700781.29273112 10679193.5117114  10305973.72448032
 11105152.64134917 10534827.31689432 12447074.67241274  7711841.40293024
  9355673.15105252 11870218.70086144 13040502.39568235  9282215.53454034
 10761584.70373367 12348150.24240685  9263355.94286986 11833794.71953871
 10969633.41009879 11474244.96859594 11397793.01725186 10352177.16558611
  9483865.0305641  11724388.13658951 12411244.22635742 10773988.91470454
 10065413.97249992 10265306.37889045 11054946.56634757  9613507.37273328
 13261574.34873904 10973675.44282156 10192274.65868006  9639247.17378211
 10622552.4026015  13468190.43644318  8639424.50354077 11161896.77501292
 10190248.24465797 10404397.83348012 12860188.40379122 11700691.36353879
 11234677.28039123  9869929.34730193 10708795.03578692 13256317.328518
  9483865.0305641   9741461.18379184  9906660.36677131 12374670.2652023
 12476955.40381496 12043120.71090644 11491731.03916671 11731079.2525611
 11619363.70502062 11509435.64849067 12551953.42115494 10573023.914348
 13689234.59195457 12702181.58413441  9748045.14620175 10216541.9843796
  9353113.16497108  9213951.01326616 10801987.47656975 10160493.98739241
  9951021.21805794  9448962.59075046 11871961.38532813 10689247.49955449
  9949189.67530794 11485325.6605442  10090932.63247402  9449098.80803026
 12981600.08332399 10086752.68961605 12452695.81999701  9467727.83816023
  9579916.72287497 11341243.21747154  9978571.9486935  12081404.17156957
 11392664.45974742 12999037.85384154 12135430.71019029 10425430.67457603
 10144579.22517904  9928048.62160083 13356700.16523732 12232760.09463761
  9968561.00310116 10633328.11159496 12294416.16482426  7882980.4551173
 14047014.05524389 10141086.77738556 11540152.39774261 12981600.08332399
  8770836.55697999 10790955.27560634 11045577.48934335 11726051.84882494
 10546744.20547643 10143436.31762051 12988811.30723888 11822033.9770415
  8760970.91108678 11580994.40334701 13262046.55717384  9919645.69238445
 12833143.27705907 11206465.57220389 10515847.41288405 12550237.26373697
 11989975.67840096 10408201.55253029 11483061.80264363 10219324.7324433
  9987795.83415425 10342446.07236982 12496946.86102761 10460969.71773445
 10616207.05065551 11242725.6070865  10763828.39357384 10308302.50367404
 12683350.08282772 10065413.97249992 11353436.21271882 11487065.86825126
 11612098.66308331 10489016.6166227  11793838.83958273 11386735.18773634
 10775539.87170587 12317564.71482603  9153972.73950843  9220253.33166555
 10254986.40653709  9938734.40166551 10428134.03798466 10934016.11073521
 10821026.43045443 12227667.74664672 12335491.30791885 11826661.04331581
 11167491.99827528 11072421.45148278  9525557.01586115  9849569.40449507
 12129482.09418719 10195807.3119289   9442479.70107796  9515909.15412259
 10996903.04912696 13153982.63923203 11432912.29439857  9810105.40406106
 14356702.92904162 12446552.94305422  9630739.12759975 10912825.33687628
 12240605.78332297 12808585.65127511 11900861.88990746 12938433.0664307
  9708999.60488938 12925427.06636439 10735215.95947445 10086752.68961605
 10991510.09365977 12071026.61683698 10271479.32715561  9202893.72989688
 10397143.61918107 10666892.47345942  9725396.56713304  9090975.73413384
 10115758.06697688 12303235.96985772  9107986.14675826 10385832.79389729
 10308302.50367404 10433591.96209085 11166137.29754919 12452695.81999701
 10700781.29273112  9611103.35137043 10606787.75832159  9978571.9486935
 13446570.6863369  11573031.15438102  9869341.73818508 10860993.29932705
 10274728.92098475  9867431.60028981 11342445.91110452 11912791.92043301
  9867431.60028981  9710800.11957766 12451104.15276845 12032863.2918441
 12267751.82537427 10144579.22517904  9502962.90769441 10536111.15682112
  9670079.76642954  9402590.04005493 11202535.10280939 13001477.01015369
 11504068.46682234 11651239.19874294 12788317.13158045  9159510.16344327
  9951021.21805794 11138747.46047766 12239029.17512517 10996903.04912696
 13256866.54692578 11374638.47013699 11985248.09573663 11167491.99827528
  9978571.9486935  10991510.09365977 12376033.97958155  9355529.60272401
 10914105.81421627 11523297.35741961 10523629.8974775   9870671.97649498
 10513482.54431817 11108238.82942105 12709390.98184747 13447499.32171227
 10364648.12172863 11666874.58495013 10908504.84325871  9897317.72760731
 13160973.83827225 13878154.94113487 14004563.21491111 13043839.73083537
 10260950.556725   11985248.09573663 12914956.40717833 10308302.50367404
  9465612.60980162  9582100.55265398 10791864.8800987  11124586.5905705
  9789770.79479713 10969633.41009879  9983408.11315367 12939901.39000344
 12146915.72464919  9778399.05332653 12815686.6987188  13801936.8953483
 10955545.44337425  9882514.89242499  9779051.1659852   9553251.09349829
 11627022.89204239  9636682.13845162  9968561.00310116 10786305.74416034
  9477825.00498035 11309679.33156755 11051258.9540941  10125233.66023661
  9844350.29637304 11493593.95335051 10873789.48429197  9509420.94126546
 12118260.59072428 11780190.88833104 11395907.33047085 12827117.71983839
 10239866.82143449  9737948.87051902 11390920.8339596  11888996.55728553
 12033422.16383369 12240605.78332297 12064901.07569224 12317564.71482603
 11831480.93217096 12429667.80586991 12374670.2652023  10527388.18583453
 10041581.95666594 11949996.34917825 11876324.50345457 10627624.74593505
 11665883.1513742  10833230.09767496 11925571.76020875 11534331.15346643
 11178421.11894341 10472221.56692692 10862593.41369099 11386729.37410824
 11679681.47822314 11795657.86812373  9263450.20991056 11533763.90248737
 12651879.07634935 11493593.95335051 12694370.88916839  9351524.40739407
 11712865.15595514  8869991.10249452 10663319.26310891 10150194.45654126
 11710933.59560301  9397421.20657641  9725396.56713304  9530413.32615057
 10391871.7468644  10534827.31689432 13786275.65448609 11119875.64758204
 11084986.03559949  9026048.97790319 12841426.36209764 10198057.37588394
 12027978.25106507  9220253.33166555 10038090.33265425 13709757.31089104
 12889713.63679352 13224933.96395226 12753912.95422074 12108592.74596933
 13542658.01823947 10973260.58143421 12163577.18924377 11932475.34676131
 11989975.67840096 12201058.70954797 10569557.66886067  9909456.23397862
 10198057.37588394 10620625.21142648 11365230.78501905  9557202.57211944
  9197457.04518102 11025812.93636054 10944231.34495975  9912084.97708032
 10420721.29944108 12294416.16482426 10995131.77115053  9584758.45621209
  9405773.41088331 10801987.47656975 13114916.48377885 13340527.84641315
 12690923.1218817   9122584.13348721 12168191.71429392  9360146.80416704
 12416971.85493227 10012248.107871   11080086.97485838 11950372.83768577
 12043849.19413946 12335491.30791885  9752794.00754578 10708355.37530912
 11392664.45974742 11487314.89181562 10241481.19981292  9748534.60775454
 11392664.45974742 11108889.94419433 10600936.38895985 10265306.37889045
 12684832.09574559 11536507.89651862 10434253.12363176 11710933.59560301
 12525881.08052832 10090932.63247402 10587288.98802167 10527388.18583453
 10200946.720787   11643609.5963593  12988811.30723888  9040502.99436498
 12495412.30962188 10271479.32715561 10386245.11732755 11386189.07436701
  9813575.27194604 11290699.62291426 11808118.12627646 11762832.41576565
 11460509.26919914  9606757.35314324 13088443.50490758 12264122.95018401
  9175541.84673854  8731467.99671232 12391781.03602764 12260269.07238484
 11795353.03607042 11617413.32662211 12468648.73176534 11207880.30197324
 11126457.80153956 11471339.54038181 12709390.98184747  9767228.79337788
 11405833.25369134  9896406.55225802 12487087.42208013 11504544.30367147
 11013308.68464832  9015347.68570483  9856419.57923767 12087865.14722932
  9867731.8971204  10558983.8976526  14296115.43106725  8698383.35356285
 13016268.49114411 10030137.2601986   9198001.73168436  9428437.95622678
 10973697.79306179 12267751.82537427 10472056.22410704 10703054.01272302
 12389535.34280392 10084625.16018695 11807349.8280193   9560651.75742023
 11783843.65729012 13036685.35285905 10555784.5238386  10074713.57883588
  9467727.83816023 10477944.70534201 13261574.34873904 11982574.30987554
 12647363.23722644 12105664.1259044  11285548.55282171 10527817.59843464
 10123948.682003   11641361.22328119 10280646.48386809 11662613.32015371
 11527113.10148283 12407373.54039052  9926043.1361283  11195345.9415614
  9975711.18891687 11430463.87940958 11762832.41576565 12717813.67783239
  8423933.62736499 10600936.38895985 12105797.68537678 11710933.59560301
 11365230.78501905 11436013.51403442 11795657.86812373 11246185.7728341
 11651250.41306174  9685412.66786391  9876256.58994287  9885455.91181284
 12121687.29973223 12027628.38539555 10505718.75406927 12575396.20981894
 12291474.34876842  9666362.05012933 10663120.6252612  11244619.39385702
 11657148.42278587 11240794.59321052 12048644.1779121  11939802.78206403
 12677279.19880648 10074713.57883588 10955314.98379693 12066680.30208537]


r2 score is: 0.3348606685125829
MAE:1441325.8357415097
MSE:4099983561884.336
RMSE:2024841.6140242515
In [57]:
predict(GradientBoostingRegressor())
Model is: GradientBoostingRegressor()
Training score: 0.4345350703949773
Predictions are: [12278379.25486124 11987443.77203915 10578117.74595412 10821026.43045443
  9515729.69618113  9867731.8971204  11860187.699257   11217865.74928253
 11716830.94126745 10675195.57372211  9407865.9556489  10700781.29273112
 10074713.57883588 11425213.01520739 11588746.94803873 12317616.96696841
 10340537.8659771  11677710.86331407  9314204.80594659 12117375.48518874
 11524599.1008865  13362041.41840967 11266218.09148607 11717349.8089743
 11460509.26919914  9153859.6167364  10791864.8800987  11355806.79740387
  9316644.06198257  9291136.55671241  9602291.82712007 11116522.50595972
 12141535.36417897 11097500.28024694 10932939.40122626 11105152.64134917
  9752794.00754578 10622552.4026015   9257336.7902674  11841567.65638742
 12084218.98124851 12374670.2652023   8462604.04585937 12576389.26477038
 11131353.30218429 11556931.22354305 11518411.11662018  9969791.26629312
 10710998.02150663 11712865.15595514 12433550.58805806  9360892.46439388
 13057108.29001213 10555784.5238386  11471339.54038181 10790621.69446459
 12219734.59335892  9122396.81423306 10100619.19252756 11432912.29439857
 10644348.20334018 11471339.54038181 11261521.77005751  9022328.86930378
 11215430.08192426 11405573.37375988 11167491.99827528 11460897.10484064
 13309629.08353271 13106215.89814725 11651239.19874293 11120736.32112451
 14476752.80736343 12043849.19413946 10689247.4995545  10273802.45505822
 12374331.28782414 11314920.90220814 10471132.85821931 11349718.45485508
 13331900.76296324 10424884.69634467 12550237.26373697 10622875.92388505
 11528760.61037202 10330547.90633249 10101447.79423673 11051347.77262893
  9725396.56713304 11732949.3136253  10663319.26310891 10820495.42178131
  9545698.95507874 10091661.32756306 10240883.09917894  9360465.96466181
 10908841.48608065 12729042.60275895  9767546.15417895  9780812.4252166
 11699053.09000588 10480988.81825574 10234488.09409324 11120736.32112451
 12351861.29397591 12107038.63501547 11950096.24117031 11261192.62206767
 10152182.69302611 11946583.43512949 10173871.69522548 10848140.4639929
  9250602.07768649 12251098.07582411  9400390.66314127 13039612.01296973
 11217932.40080935  9468938.22101319 11054809.4624962   8585695.41890312
 10262468.36250443  9704317.71977953 10281995.58531775 10699891.09195578
 11412620.06594623 10074713.57883588  9369243.25727139  9809763.06610002
 11455069.64591196 12043849.19413946 12790646.09361658  9878036.04588398
 11664243.02927453  9292221.1206075  11981026.56227502 10234845.08403092
 11097500.28024694 12366843.84717264 10179713.81828344 12025931.16237377
  9483865.0305641  13801936.8953483  12447074.67241274 11452617.03435148
 10527817.59843464 10355261.9721521  10071317.56104797 11710933.59560301
 11094467.67909619  9635855.53956974  9580274.02930825  9494586.95758893
 11401757.11232354 11520196.49920162 12638962.5808744  10437980.35333718
  9951612.20071806  8905865.53962594 10511368.71304882 11981026.56227502
 11049462.17323254 10046487.81660331 12043120.71090644 12837304.49083962
 12260525.15495863 13878894.84667713 10126198.24345644  9220253.33166555
 12079083.06350794 10364648.12172863 10817475.05476396 11120736.32112451
 10663319.26310891  9531238.13359584 11926402.77993901 11415766.44872087
  9278986.6528553  11178421.11894341 10437177.133988   11986722.6846994
 11150143.44566896 10890494.52966445 12939901.39000344 12300797.41140034
 10878183.1692394  11084986.03559949 11726711.67444189 10849863.94131942
 10165768.13926253  9509420.94126546 10428508.10747095 11533033.62088631
 10910978.38184392 13489963.88925968  9818933.53235245 11381480.6659793
 10908504.84325871 10271479.32715561 12236096.26322862 10030815.57077776
  7875269.69921548 13338264.60296041 10811523.95938185 11639146.99919722
 12273404.50358932 13134816.73090323  9194671.58014234 11565921.27032844
 10126958.86576349 11937982.08941876 11450116.30570954 10321201.32630709
 11436013.51403442 11487395.53954188 12611177.8831647  10990077.27860639
 12889269.59085373 10353459.18405551 10062646.412567   12310243.42146362
 10062646.412567   12702987.95995932 11822033.9770415  12527746.07778017
 13056185.66043962 11135345.67591467 10591185.84756908 12041707.12797383
  9712356.85971838  9136327.39744624 11353436.21271882  9789770.79479713
 11842359.13567111 11530586.48570639 12702987.95995932 12318913.73388716
  9807488.88514122 12297673.03394154 12079083.06350794 10453802.51035966
 10578117.74595412 10989339.14937782 10176224.90877298  9646337.21139241
  9995319.73496452  9292221.1206075   9829394.98561388 11442300.40340256
  9467727.83816023 10678999.44351289 10082936.7115202  10846938.34859066
 11950372.83768577  9366717.40889241 10821026.43045443  9889863.75782386
 12816954.55657565 10663319.26310891  8936624.10576029 11899216.5562429
 12926130.90154577 11847716.85740199  9624468.17360664 12370709.7473315
  9884935.53736597  9967430.64573582 12370709.7473315  11679681.47822314
 12017510.34072699 12939901.39000344 10454804.25955891 10988145.61814971
  9659747.90496955 13786275.65448609 11091695.08558431 10090932.63247402
 13865066.95751449  8905865.53962594 11593690.45019905 10542957.39253252
 12999037.85384154 11654309.31457908 12241416.83512592  9670531.21407922
 12925427.06636439 11002652.54578556 12451590.22591677 12240605.78332297
 11392664.45974742 11876324.50345457 10469605.65503562 10268635.89018489
 11619363.70502061 11670998.37580647 10280646.48386809 11660140.69427818
 11014712.32140393  9231399.27663221 11833794.71953871 10336430.86164425
 10762529.00407756  9561366.31315011 12159575.00203768 13243943.50408723
 10476426.69183302 10366870.98692282 10801279.10825087 11195345.9415614
  9244454.95187326 12091353.28411996 12651879.07634934 10234488.09409324
 13349983.1264515  11712865.15595514 12033422.16383368 13218968.95632848
 10694154.97973673 10801279.10825087 12353056.85914175 11051086.94610275
 10854330.571269   10480048.17482837 10319594.31895445 11556931.22354305
  9758215.7803932  13036685.35285905 10806659.05933022  9509420.94126546
 11747697.28415731 11693481.90412549  9448962.59075046 11109766.62498578
 12464879.38181848  9869341.73818508  9896406.55225802  9869341.73818508
 11702524.90525524 13137369.56309217  9509949.50197311 11110015.67941965
 11069525.55507859  9613402.34219934 12915525.09812913 12602894.18269787
  7781470.14925982 12105797.68537679 14231461.02576287  9833981.57688144
 12239029.17512518 10723886.57483447 12652773.39760626 10098257.38787499
 11828174.62664907 13137369.56309217 10439554.37961506 10381108.09112629
 10324450.50964559 11839374.87936567  9522072.58553015  9493569.65562817
  9846783.87487568  9444531.17805464 13256866.54692578 11386735.18773634
 11687611.99666889 10529135.64324162  9884935.53736597 12411244.22635742
  9327038.89235291 12929093.68902682  9798224.60289565 11587617.55550325
 11239614.55178871 11425213.01520739 12105664.1259044   9849105.75263176
 11762832.41576565 11430918.71007511 11544472.35611688 10816498.96832388
 12704027.7315981   9681122.32775771 10243495.23278465 12214092.26732358
 10342446.07236982 11587617.55550325  9287969.54190301 12956746.66634665
  9525557.01586115  9508956.98173187  8965016.70168637 11206465.57220389
 10234670.06035716 12278379.25486124  8558330.90264517 10101447.79423673
 13036685.35285905 10384361.41110299 10452787.54662357 12724022.20977739
 12978298.25248506 10117836.89230464 11926402.77993901  9918576.80446465
 13247928.37867203  9308965.15359321 10163396.95187413  9748534.60775454
 12591222.83174302  9110622.3495107  10077105.71465052 10137231.87700078
  9490777.84260067 10417354.44790702  9613402.34219934  7535617.3012915
  8777824.19061887 13434207.35794454 11548131.06470327  9925208.98192293
  9892996.79229336 10452787.54662357  9342323.21269421  9538190.85915497
 12391781.03602764 11417740.70086192 11842359.13567111  8910957.83757411
  9616243.67546547  9866979.9191376  11499021.28489533 10306638.04620101
 11273644.50961258  9391047.98079007 10694154.97973673 11178421.11894341
 11425213.01520739 12084383.67316538  9818933.53235245 11660305.44555158
 11014712.32140393 12009665.63347716 11726051.84882494  9805776.97839174
 10713055.90883901 10288858.29290726 11982574.30987554  9926043.1361283
 10927701.07775112 11986722.6846994  10559750.69337453 11649693.21072555
 11677710.86331407 10854014.5372883  10254986.40653709 11417045.29584165
 11167721.33738502 11442300.40340256 10308302.50367404 10428508.10747095
 12078233.73518743 10700781.29273112 10679193.5117114  10305973.72448033
 11105152.64134917 10534827.31689432 12447074.67241274  7711841.40293024
  9355673.15105252 11870218.70086144 13040502.39568234  9282215.53454034
 10761584.70373367 12348150.24240686  9263355.94286986 11833794.71953871
 10969633.41009879 11474244.96859594 11397793.01725186 10352177.16558611
  9483865.0305641  11724388.13658951 12411244.22635742 10773988.91470454
 10065413.97249992 10265306.37889045 11054946.56634757  9613507.37273328
 13261574.34873904 10973675.44282156 10192274.65868006  9639247.17378211
 10622552.4026015  13468190.43644318  8639424.50354077 11161896.77501292
 10190248.24465797 10404397.83348012 12860188.40379122 11700691.3635388
 11234677.28039123  9869929.34730193 10708795.03578692 13256317.328518
  9483865.0305641   9741461.18379185  9906660.36677131 12374670.2652023
 12476955.40381495 12043120.71090644 11491731.03916671 11731079.2525611
 11619363.70502061 11509435.64849067 12551953.42115494 10573023.914348
 13689234.59195457 12702181.5841344   9748045.14620175 10216541.9843796
  9353113.16497108  9213951.01326615 10801987.47656975 10160493.98739241
  9951021.21805793  9448962.59075046 11871961.38532813 10689247.4995545
  9949189.67530794 11485325.6605442  10090932.63247402  9449098.80803026
 12981600.08332399 10086752.68961605 12452695.81999701  9467727.83816023
  9579916.72287496 11341243.21747154  9978571.9486935  12081404.17156957
 11392664.45974742 12999037.85384154 12135430.71019029 10425430.67457603
 10144579.22517904  9928048.62160083 13356700.16523732 12232760.09463761
  9968561.00310116 10633328.11159496 12294416.16482426  7882980.4551173
 14047014.05524389 10141086.77738556 11540152.39774261 12981600.08332399
  8626387.70283393 10790955.27560634 11045577.48934335 11726051.84882494
 10546744.20547643 10143436.31762051 12988811.30723888 11822033.9770415
  8760970.91108678 11580994.40334701 13262046.55717384  9919645.69238445
 12833143.27705907 11206465.57220389 10515847.41288405 12550237.26373697
 11989975.67840096 10408201.55253029 11483061.80264363 10219324.73244329
  9987795.83415425 10342446.07236982 12496946.86102761 10460969.71773445
 10616207.05065551 11242725.60708651 10763828.39357384 10308302.50367404
 12683350.08282771 10065413.97249992 11353436.21271882 11487065.86825125
 11612098.66308331 10344567.76247663 11793838.83958274 11386735.18773634
 10775539.87170588 12317564.71482603  9153972.73950843  9220253.33166555
 10254986.40653709  9938734.40166551 10428134.03798466 10934016.11073521
 10821026.43045443 12227667.74664672 12335491.30791884 11826661.04331581
 11167491.99827528 11072421.45148278  9525557.01586115  9849569.40449507
 12129482.09418719 10195807.3119289   9442479.70107795  9515909.15412259
 10996903.04912696 13153982.63923203 11432912.29439857  9810105.40406106
 14356702.92904162 12446552.94305422  9630739.12759975 10912825.33687628
 12240605.78332297 12808585.6512751  11900861.88990746 12938433.0664307
  9708999.60488938 12925427.06636439 10735215.95947445 10086752.68961605
 10991510.09365977 12071026.61683697 10271479.32715561  9202893.72989689
 10397143.61918107 10666892.47345942  9725396.56713304  9090975.73413384
 10115758.06697688 12303235.96985772  9107986.14675826 10385832.79389729
 10308302.50367404 10433591.96209086 11166137.29754919 12452695.81999701
 10700781.29273112  9611103.35137043 10606787.75832159  9978571.9486935
 13446570.6863369  11573031.15438102  9869341.73818508 10860993.29932705
 10274728.92098475  9867431.60028982 11342445.91110452 11912791.92043301
  9867431.60028982  9710800.11957766 12451104.15276845 12032863.2918441
 12267751.82537428 10144579.22517904  9502962.90769441 10536111.15682112
  9670079.76642955  9402590.04005493 11202535.10280939 13001477.01015369
 11504068.46682234 11651239.19874293 12788317.13158046  9159510.16344327
  9951021.21805793 11138747.46047766 12239029.17512518 10996903.04912696
 13256866.54692578 11374638.47013699 11985248.09573663 11167491.99827528
  9978571.9486935  10991510.09365977 12376033.97958154  9355529.60272401
 10914105.81421627 11523297.35741961 10523629.8974775   9870671.97649498
 10513482.54431817 11108238.82942104 12709390.98184746 13447499.32171227
 10364648.12172863 11666874.58495013 10908504.84325871  9897317.72760731
 13160973.83827225 13878154.94113487 14004563.21491111 13043839.73083537
 10260950.556725   11985248.09573663 12914956.40717833 10308302.50367404
  9465612.60980162  9582100.55265398 10791864.8800987  11124586.59057051
  9789770.79479713 10969633.41009879  9983408.11315367 12939901.39000344
 12146915.72464919  9778399.05332653 12815686.6987188  13801936.8953483
 10955545.44337425  9882514.89242499  9779051.1659852   9553251.09349829
 11627022.89204238  9636682.13845162  9968561.00310116 10786305.74416034
  9477825.00498035 11309679.33156755 11051258.9540941  10125233.66023661
  9844350.29637304 11493593.9533505  10873789.48429197  9509420.94126546
 12118260.59072427 11780190.88833104 11395907.33047085 12827117.71983839
 10239866.82143449  9737948.87051902 11390920.8339596  11888996.55728553
 12033422.16383368 12240605.78332297 12064901.07569224 12317564.71482603
 11831480.93217096 12429667.80586991 12374670.2652023  10527388.18583453
 10041581.95666594 11949996.34917825 11876324.50345457 10627624.74593505
 11665883.1513742  10833230.09767495 11925571.76020875 11534331.15346643
 11178421.11894341 10472221.56692692 10862593.41369098 11386729.37410824
 11679681.47822314 11795657.86812373  9263450.20991056 11533763.90248737
 12651879.07634934 11493593.9533505  12694370.88916839  9351524.40739407
 11712865.15595514  8869991.10249452 10663319.26310891 10150194.45654126
 11710933.59560301  9397421.20657642  9725396.56713304  9530413.32615057
 10391871.7468644  10534827.31689432 13786275.65448609 11119875.64758205
 11084986.03559949  9026048.97790319 12841426.36209764 10198057.37588394
 12027978.25106507  9220253.33166555 10038090.33265425 13709757.31089105
 12889713.63679352 13224933.96395226 12753912.95422074 12108592.74596933
 13542658.01823947 10973260.58143421 12163577.18924377 11932475.34676131
 11989975.67840096 12201058.70954797 10569557.66886067  9909456.23397863
 10198057.37588394 10620625.21142648 11365230.78501905  9557202.57211944
  9197457.04518102 11025812.93636054 10944231.34495975  9912084.97708032
 10420721.29944109 12294416.16482426 10995131.77115053  9584758.4562121
  9405773.41088331 10801987.47656975 13114916.48377885 13340527.84641315
 12690923.1218817   9122584.13348721 12168191.71429393  9360146.80416704
 12416971.85493226 10012248.107871   11080086.97485838 11950372.83768577
 12043849.19413946 12335491.30791884  9752794.00754578 10708355.37530912
 11392664.45974742 11487314.89181562 10241481.19981291  9748534.60775454
 11392664.45974742 11108889.94419433 10600936.38895985 10265306.37889045
 12684832.09574559 11536507.89651862 10434253.12363176 11710933.59560301
 12525881.08052832 10090932.63247402 10587288.98802167 10527388.18583453
 10200946.720787   11643609.5963593  12988811.30723888  9040502.99436498
 12495412.30962188 10271479.32715561 10386245.11732755 11386189.07436701
  9813575.27194604 11290699.62291426 11808118.12627646 11762832.41576565
 11460509.26919914  9606757.35314324 13088443.50490758 12264122.95018401
  9175541.84673854  8731467.99671232 12391781.03602764 12260269.07238484
 11795353.03607041 11617413.32662211 12468648.73176534 11207880.30197324
 11126457.80153956 11471339.54038181 12709390.98184746  9767228.79337789
 11405833.25369134  9896406.55225802 12487087.42208014 11504544.30367147
 11013308.68464832  9015347.68570483  9856419.57923767 12087865.14722932
  9867731.8971204  10558983.89765259 14296115.43106725  8698383.35356285
 13016268.49114411 10030137.26019861  9198001.73168436  9428437.95622678
 10973697.79306179 12267751.82537428 10472056.22410704 10703054.01272302
 12389535.34280391 10084625.16018695 11807349.8280193   9560651.75742023
 11783843.65729012 13036685.35285905 10555784.5238386  10074713.57883588
  9467727.83816023 10477944.70534201 13261574.34873904 11982574.30987554
 12647363.23722644 12105664.1259044  11285548.55282171 10527817.59843464
 10123948.682003   11641361.22328119 10280646.48386809 11662613.32015371
 11527113.10148283 12407373.54039052  9926043.1361283  11195345.9415614
  9975711.18891687 11430463.87940958 11762832.41576565 12717813.67783239
  8423933.62736499 10600936.38895985 12105797.68537679 11710933.59560301
 11365230.78501905 11436013.51403442 11795657.86812373 11246185.7728341
 11651250.41306174  9685412.66786391  9876256.58994287  9885455.91181284
 12121687.29973222 12027628.38539554 10505718.75406927 12575396.20981894
 12291474.34876841  9666362.05012933 10663120.6252612  11244619.39385702
 11657148.42278587 11240794.59321052 12048644.17791209 11939802.78206403
 12677279.19880648 10074713.57883588 10955314.98379693 12066680.30208537]


r2 score is: 0.3348872370364766
MAE:1441325.83574151
MSE:4099819790917.7563
RMSE:2024801.1731816425
In [58]:
from sklearn.model_selection import RandomizedSearchCV
In [59]:
random_grid = {
    'n_estimators' : [100, 120, 150, 180, 200,220],
    'max_features':['auto','sqrt'],
    'max_depth':[5,10,15,20],
    }
In [60]:
rf=RandomForestRegressor()
rf_random=RandomizedSearchCV(estimator=rf,param_distributions=random_grid,cv=3,verbose=2,n_jobs=-1,)

rf_random.fit(X_train,y_train)

# best parameter
rf_random.best_params_
Fitting 3 folds for each of 10 candidates, totalling 30 fits
Out[60]:
{'n_estimators': 120, 'max_features': 'sqrt', 'max_depth': 10}
In [61]:
#predicting the values
prediction = rf_random.predict(X_test)

#distribution plot between actual value and predicted value
sns.displot(y_test-prediction)
Out[61]:
<seaborn.axisgrid.FacetGrid at 0x279914cfb20>
In [62]:
r2_score(y_test,prediction)
Out[62]:
0.34372722318228377

DecisionTree Algorithm performed the best with a training score of 81.34%, however due to the size of our data-set, it probably created some deadly biases in order to acheive this accuracy by overfitting and not generalizing, therefore it probably wont have the same successrate on new data. Other Models may outperform it once we increase our dataset¶