Used Car Predictions


Lesson Guide

Import Data

# NumPy for numerical computing
import numpy as np

# Pandas for DataFrames
import pandas as pd
pd.set_option('display.max_columns', 100)

# Matplotlib for visualization
from matplotlib import pyplot as plt
# display plots in the notebook
%matplotlib inline 

# Seaborn for easier visualization
import seaborn as sns

# For standardization
from sklearn.preprocessing import StandardScaler

# Helper for cross-validation
from sklearn.model_selection import GridSearchCV

# Function for splitting training and test set
from sklearn.model_selection import train_test_split # Scikit-Learn 0.18+

# Function for creating model pipelines
from sklearn.pipeline import make_pipeline

# Import Logistic Regression
from sklearn.linear_model import LogisticRegression
from sklearn import linear_model

# Import RandomForestClassifier and GradientBoostingClassifer
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
from sklearn.ensemble import GradientBoostingRegressor

from sklearn.preprocessing import PolynomialFeatures
from sklearn import model_selection

#import PipeLine, SelectKBest transformer, and RandomForest estimator classes
from sklearn.pipeline import Pipeline
from sklearn.feature_selection import SelectKBest, f_regression
from sklearn.metrics import r2_score, mean_absolute_error
import scipy.stats

Read Data

df = pd.read_csv('../Capstone/usedcarnew.csv')

Explore data

df.head()
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Market Category Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
0 BMW 1 Series M 2011 premium unleaded (required) 335.0 6.0 MANUAL rear wheel drive 2.0 Factory Tuner,Luxury,High-Performance Compact Coupe 26 19 3916 46135
1 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Luxury,Performance Compact Convertible 28 19 3916 40650
2 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Luxury,High-Performance Compact Coupe 28 20 3916 36350
3 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Luxury,Performance Compact Coupe 28 18 3916 29450
4 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Luxury Compact Convertible 28 18 3916 34500
df.shape
(11914, 16)
# Drop duplicates
df = df.drop_duplicates()
print( df.shape )
(11199, 16)
# Make the figsize 7 x 6
plt.figure(figsize=(7,6))

# Plot heatmap of correlations
#sns.heatmap(correlations)
sns.heatmap(df.corr(), annot = True)
<matplotlib.axes._subplots.AxesSubplot at 0x10a239668>

png

correlations = df.corr()
# Generate a mask for the upper triangle
mask = np.zeros_like(correlations, dtype=np.bool)
mask[np.triu_indices_from(mask)] = True
#Make the figsize 10 x 8
plt.figure(figsize=(10,8))

# Plot heatmap of correlations
sns.heatmap(correlations * 100, annot=True, fmt='.0f', mask=mask)
<matplotlib.axes._subplots.AxesSubplot at 0x10a265208>

png

df.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 11199 entries, 0 to 11913
Data columns (total 16 columns):
Make                 11199 non-null object
Model                11199 non-null object
Year                 11199 non-null int64
Engine Fuel Type     11196 non-null object
Engine HP            11130 non-null float64
Engine Cylinders     11169 non-null float64
Transmission Type    11199 non-null object
Driven_Wheels        11199 non-null object
Number of Doors      11193 non-null float64
Market Category      7823 non-null object
Vehicle Size         11199 non-null object
Vehicle Style        11199 non-null object
highway MPG          11199 non-null int64
city mpg             11199 non-null int64
Popularity           11199 non-null int64
MSRP                 11199 non-null int64
dtypes: float64(3), int64(5), object(8)
memory usage: 1.5+ MB
# Display summary statistics for the numerical features.
#Summarize numerical features
df.describe()
Year Engine HP Engine Cylinders Number of Doors highway MPG city mpg Popularity MSRP
count 11199.000000 11130.000000 11169.000000 11193.000000 11199.000000 11199.000000 11199.000000 1.119900e+04
mean 2010.714528 253.388859 5.665950 3.454123 26.610590 19.731851 1558.483347 4.192593e+04
std 7.228211 110.150938 1.797021 0.872946 8.977641 9.177555 1445.668872 6.153505e+04
min 1990.000000 55.000000 0.000000 2.000000 12.000000 7.000000 2.000000 2.000000e+03
25% 2007.000000 172.000000 4.000000 2.000000 22.000000 16.000000 549.000000 2.159950e+04
50% 2015.000000 239.000000 6.000000 4.000000 25.000000 18.000000 1385.000000 3.067500e+04
75% 2016.000000 303.000000 6.000000 4.000000 30.000000 22.000000 2009.000000 4.303250e+04
max 2017.000000 1001.000000 16.000000 4.000000 354.000000 137.000000 5657.000000 2.065902e+06
# xrot= argument that rotates x-axis labels counter-clockwise.

# Plot histogram grid
df.hist(figsize=(14,14), xrot=-45)

# Clear the text "residue"
plt.show()

png

# Summarize categorical features
df.describe(include=['object'])
Make Model Engine Fuel Type Transmission Type Driven_Wheels Market Category Vehicle Size Vehicle Style
count 11199 11199 11196 11199 11199 7823 11199 11199
unique 48 915 10 5 4 71 3 16
top Chevrolet Silverado 1500 regular unleaded AUTOMATIC front wheel drive Crossover Compact Sedan
freq 1083 156 6658 7932 4354 1075 4395 2843
# barchart for missing values in each column
nullvalues = df.isnull().sum()
nullvalues.plot.barh()
<matplotlib.axes._subplots.AxesSubplot at 0x1a116aeeb8>

png

df.head()
#df.Year.unique()
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Market Category Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
0 BMW 1 Series M 2011 premium unleaded (required) 335.0 6.0 MANUAL rear wheel drive 2.0 Factory Tuner,Luxury,High-Performance Compact Coupe 26 19 3916 46135
1 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Luxury,Performance Compact Convertible 28 19 3916 40650
2 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Luxury,High-Performance Compact Coupe 28 20 3916 36350
3 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Luxury,Performance Compact Coupe 28 18 3916 29450
4 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Luxury Compact Convertible 28 18 3916 34500

SEGMENTATION


Cutting the data to observe the relationship between categorical features and numeric features

# Bar plot for Vehicle Style
plt.subplots(figsize=(10,10))
sns.countplot(y='Vehicle Style', data=df)
<matplotlib.axes._subplots.AxesSubplot at 0x1a116ceb00>

png

# Plot bar plot for each categorical feature
# Show count of observations
#  for loop to plot bar plots of each of the categorical features.
# Some plots there is too many columns to visualize with this 

plt.subplots(figsize=(20,15))
             
             
for feature in df.dtypes[df.dtypes == 'object'].index:
    sns.countplot(y=feature, data=df)
    plt.show()

png

png

png

png

png

png

png

png

# Segment tx_price by property_type and plot distributions
plt.subplots(figsize=(20,15))
sns.boxplot(y='Engine Fuel Type', x='MSRP', data=df)
<matplotlib.axes._subplots.AxesSubplot at 0x1a140cf780>

png

# Segment by Engine fuel Type and display the means within each class
# Maybe sue city/ Highway mpg to compare fuel type
df.groupby('Engine Fuel Type').mean()
Year Engine HP Engine Cylinders Number of Doors highway MPG city mpg Popularity MSRP
Engine Fuel Type
diesel 2013.360000 184.100671 4.806667 3.720000 36.473333 26.346667 1649.240000 40449.680000
electric 2015.318182 145.318182 0.000000 3.901639 99.590909 112.696970 1773.454545 47943.030303
flex-fuel (premium unleaded recommended/E85) 2012.961538 283.346154 5.384615 3.307692 25.346154 16.923077 1332.807692 48641.923077
flex-fuel (premium unleaded required/E85) 2013.849057 514.716981 9.396226 3.358491 19.943396 13.283019 376.641509 160692.264151
flex-fuel (unleaded/E85) 2013.714769 286.213078 6.626832 3.523112 22.624577 16.160090 2278.855693 36279.217587
flex-fuel (unleaded/natural gas) 2016.000000 NaN 6.000000 4.000000 25.000000 17.000000 1385.000000 39194.166667
natural gas 2015.000000 110.000000 4.000000 4.000000 38.000000 27.000000 2202.000000 28065.000000
premium unleaded (recommended) 2014.686782 276.525937 5.173851 3.377155 28.407328 20.190374 1227.055316 41812.512213
premium unleaded (required) 2012.688650 375.906953 7.005157 3.062916 23.856851 16.649796 1449.656442 102814.088957
regular unleaded 2008.762391 207.901114 5.289106 3.566236 26.686092 20.010514 1570.338690 23833.156053

Data cleaning

df.isnull().sum()
Make                    0
Model                   0
Year                    0
Engine Fuel Type        3
Engine HP              69
Engine Cylinders       30
Transmission Type       0
Driven_Wheels           0
Number of Doors         6
Market Category      3376
Vehicle Size            0
Vehicle Style           0
highway MPG             0
city mpg                0
Popularity              0
MSRP                    0
dtype: int64

Examine how to deal with null values

# shows all null rows information 
df.loc[(df['Market Category'].isnull()) |
              (df['Engine HP'].isnull()) |
              (df['Engine Cylinders'].isnull()) |
              (df['Number of Doors'].isnull()) |
              (df['Engine Fuel Type'].isnull())]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Market Category Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
87 Nissan 200SX 1996 regular unleaded 115.0 4.0 MANUAL front wheel drive 2.0 NaN Compact Coupe 36 26 2009 2000
91 Nissan 200SX 1997 regular unleaded 115.0 4.0 MANUAL front wheel drive 2.0 NaN Compact Coupe 35 25 2009 2000
93 Nissan 200SX 1998 regular unleaded 115.0 4.0 MANUAL front wheel drive 2.0 NaN Compact Coupe 35 25 2009 2000
203 Chrysler 300 2015 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 37570
204 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 31695
205 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 38070
206 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 44895
209 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 34195
210 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 40570
211 Chrysler 300 2016 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 38095
213 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 45190
214 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 32260
215 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 37755
216 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 41055
219 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 38555
220 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 35255
221 Chrysler 300 2016 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 38590
222 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 34760
223 Chrysler 300 2017 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 41135
224 Chrysler 300 2017 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 45270
225 Chrysler 300 2017 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 38670
228 Chrysler 300 2017 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 38175
229 Chrysler 300 2017 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 30 19 1013 32340
231 Chrysler 300 2017 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 34840
360 Mazda 3 2015 regular unleaded 155.0 4.0 AUTOMATIC front wheel drive 4.0 NaN Compact Sedan 41 30 586 23795
361 Mazda 3 2015 regular unleaded 155.0 4.0 MANUAL front wheel drive 4.0 NaN Compact Sedan 41 29 586 19595
362 Mazda 3 2015 regular unleaded 155.0 4.0 MANUAL front wheel drive 4.0 NaN Compact Sedan 41 29 586 18445
368 Mazda 3 2015 regular unleaded 155.0 4.0 AUTOMATIC front wheel drive 4.0 NaN Compact Sedan 41 30 586 19495
373 Mazda 3 2015 regular unleaded 155.0 4.0 MANUAL front wheel drive 4.0 NaN Compact Sedan 41 29 586 16945
375 Mazda 3 2015 regular unleaded 155.0 4.0 AUTOMATIC front wheel drive 4.0 NaN Compact Sedan 41 30 586 20645
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
11686 Suzuki XL-7 2006 regular unleaded 185.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 21 16 481 25499
11687 Suzuki XL-7 2006 regular unleaded 185.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 21 16 481 21999
11744 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 26900
11745 Nissan Xterra 2013 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 16 2009 29440
11746 Nissan Xterra 2013 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 16 2009 25850
11747 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 30490
11748 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 24850
11749 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 24990
11750 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 22940
11751 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 31370
11752 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 25300
11753 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 27350
11754 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 25440
11755 Nissan Xterra 2014 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 16 2009 26300
11756 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 23390
11757 Nissan Xterra 2014 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 16 2009 30320
11758 Nissan Xterra 2015 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 26670
11759 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 27720
11760 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 25710
11761 Nissan Xterra 2015 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 30590
11762 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 23660
11763 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 31640
11764 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 25670
11792 Subaru XT 1991 regular unleaded 97.0 4.0 MANUAL front wheel drive 2.0 NaN Compact Coupe 29 22 640 2000
11793 Subaru XT 1991 regular unleaded 145.0 6.0 AUTOMATIC front wheel drive 2.0 NaN Compact Coupe 26 18 640 2000
11794 Subaru XT 1991 regular unleaded 145.0 6.0 MANUAL all wheel drive 2.0 NaN Compact Coupe 23 16 640 2000
11809 Toyota Yaris iA 2017 regular unleaded 106.0 4.0 MANUAL front wheel drive 4.0 NaN Compact Sedan 39 30 2031 15950
11810 Toyota Yaris iA 2017 regular unleaded 106.0 4.0 AUTOMATIC front wheel drive 4.0 NaN Compact Sedan 40 32 2031 17050
11867 GMC Yukon 2015 premium unleaded (recommended) 420.0 8.0 AUTOMATIC rear wheel drive 4.0 NaN Large 4dr SUV 21 15 549 64520
11868 GMC Yukon 2015 premium unleaded (recommended) 420.0 8.0 AUTOMATIC four wheel drive 4.0 NaN Large 4dr SUV 21 14 549 67520

3464 rows × 16 columns

Null values in Market Category

# Examine the null values of Market Category 
df[df['Market Category'].isnull()]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Market Category Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
87 Nissan 200SX 1996 regular unleaded 115.0 4.0 MANUAL front wheel drive 2.0 NaN Compact Coupe 36 26 2009 2000
91 Nissan 200SX 1997 regular unleaded 115.0 4.0 MANUAL front wheel drive 2.0 NaN Compact Coupe 35 25 2009 2000
93 Nissan 200SX 1998 regular unleaded 115.0 4.0 MANUAL front wheel drive 2.0 NaN Compact Coupe 35 25 2009 2000
203 Chrysler 300 2015 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 37570
204 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 31695
205 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 38070
206 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 44895
209 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 34195
210 Chrysler 300 2015 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 40570
211 Chrysler 300 2016 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 38095
213 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 45190
214 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 32260
215 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 37755
216 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 41055
219 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 38555
220 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 31 19 1013 35255
221 Chrysler 300 2016 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 38590
222 Chrysler 300 2016 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 34760
223 Chrysler 300 2017 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 41135
224 Chrysler 300 2017 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 45270
225 Chrysler 300 2017 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 38670
228 Chrysler 300 2017 regular unleaded 300.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 38175
229 Chrysler 300 2017 regular unleaded 292.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Large Sedan 30 19 1013 32340
231 Chrysler 300 2017 regular unleaded 292.0 6.0 AUTOMATIC all wheel drive 4.0 NaN Large Sedan 27 18 1013 34840
360 Mazda 3 2015 regular unleaded 155.0 4.0 AUTOMATIC front wheel drive 4.0 NaN Compact Sedan 41 30 586 23795
361 Mazda 3 2015 regular unleaded 155.0 4.0 MANUAL front wheel drive 4.0 NaN Compact Sedan 41 29 586 19595
362 Mazda 3 2015 regular unleaded 155.0 4.0 MANUAL front wheel drive 4.0 NaN Compact Sedan 41 29 586 18445
368 Mazda 3 2015 regular unleaded 155.0 4.0 AUTOMATIC front wheel drive 4.0 NaN Compact Sedan 41 30 586 19495
373 Mazda 3 2015 regular unleaded 155.0 4.0 MANUAL front wheel drive 4.0 NaN Compact Sedan 41 29 586 16945
375 Mazda 3 2015 regular unleaded 155.0 4.0 AUTOMATIC front wheel drive 4.0 NaN Compact Sedan 41 30 586 20645
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
11686 Suzuki XL-7 2006 regular unleaded 185.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 21 16 481 25499
11687 Suzuki XL-7 2006 regular unleaded 185.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 21 16 481 21999
11744 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 26900
11745 Nissan Xterra 2013 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 16 2009 29440
11746 Nissan Xterra 2013 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 16 2009 25850
11747 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 30490
11748 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 24850
11749 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 24990
11750 Nissan Xterra 2013 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 22940
11751 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 31370
11752 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 25300
11753 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 27350
11754 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 25440
11755 Nissan Xterra 2014 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 16 2009 26300
11756 Nissan Xterra 2014 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 23390
11757 Nissan Xterra 2014 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 16 2009 30320
11758 Nissan Xterra 2015 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 26670
11759 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 27720
11760 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 25710
11761 Nissan Xterra 2015 regular unleaded 261.0 6.0 MANUAL four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 30590
11762 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 23660
11763 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC four wheel drive 4.0 NaN Midsize 4dr SUV 20 15 2009 31640
11764 Nissan Xterra 2015 regular unleaded 261.0 6.0 AUTOMATIC rear wheel drive 4.0 NaN Midsize 4dr SUV 22 16 2009 25670
11792 Subaru XT 1991 regular unleaded 97.0 4.0 MANUAL front wheel drive 2.0 NaN Compact Coupe 29 22 640 2000
11793 Subaru XT 1991 regular unleaded 145.0 6.0 AUTOMATIC front wheel drive 2.0 NaN Compact Coupe 26 18 640 2000
11794 Subaru XT 1991 regular unleaded 145.0 6.0 MANUAL all wheel drive 2.0 NaN Compact Coupe 23 16 640 2000
11809 Toyota Yaris iA 2017 regular unleaded 106.0 4.0 MANUAL front wheel drive 4.0 NaN Compact Sedan 39 30 2031 15950
11810 Toyota Yaris iA 2017 regular unleaded 106.0 4.0 AUTOMATIC front wheel drive 4.0 NaN Compact Sedan 40 32 2031 17050
11867 GMC Yukon 2015 premium unleaded (recommended) 420.0 8.0 AUTOMATIC rear wheel drive 4.0 NaN Large 4dr SUV 21 15 549 64520
11868 GMC Yukon 2015 premium unleaded (recommended) 420.0 8.0 AUTOMATIC four wheel drive 4.0 NaN Large 4dr SUV 21 14 549 67520

3376 rows × 16 columns

list(df['Market Category'].unique())
['Factory Tuner,Luxury,High-Performance',
 'Luxury,Performance',
 'Luxury,High-Performance',
 'Luxury',
 'Performance',
 'Flex Fuel',
 'Flex Fuel,Performance',
 nan,
 'Hatchback',
 'Hatchback,Luxury,Performance',
 'Hatchback,Luxury',
 'Luxury,High-Performance,Hybrid',
 'Diesel,Luxury',
 'Hatchback,Performance',
 'Hatchback,Factory Tuner,Performance',
 'High-Performance',
 'Factory Tuner,High-Performance',
 'Exotic,High-Performance',
 'Exotic,Factory Tuner,High-Performance',
 'Factory Tuner,Performance',
 'Crossover',
 'Exotic,Luxury',
 'Exotic,Luxury,High-Performance',
 'Exotic,Luxury,Performance',
 'Factory Tuner,Luxury,Performance',
 'Flex Fuel,Luxury',
 'Crossover,Luxury',
 'Hatchback,Factory Tuner,Luxury,Performance',
 'Crossover,Hatchback',
 'Hybrid',
 'Luxury,Performance,Hybrid',
 'Crossover,Luxury,Performance,Hybrid',
 'Crossover,Luxury,Performance',
 'Exotic,Factory Tuner,Luxury,High-Performance',
 'Flex Fuel,Luxury,High-Performance',
 'Crossover,Flex Fuel',
 'Diesel',
 'Hatchback,Diesel',
 'Crossover,Luxury,Diesel',
 'Crossover,Luxury,High-Performance',
 'Exotic,Flex Fuel,Factory Tuner,Luxury,High-Performance',
 'Exotic,Flex Fuel,Luxury,High-Performance',
 'Exotic,Factory Tuner,Luxury,Performance',
 'Hatchback,Hybrid',
 'Crossover,Hybrid',
 'Hatchback,Luxury,Hybrid',
 'Flex Fuel,Luxury,Performance',
 'Crossover,Performance',
 'Luxury,Hybrid',
 'Crossover,Flex Fuel,Luxury,Performance',
 'Crossover,Flex Fuel,Luxury',
 'Crossover,Flex Fuel,Performance',
 'Hatchback,Factory Tuner,High-Performance',
 'Hatchback,Flex Fuel',
 'Factory Tuner,Luxury',
 'Crossover,Factory Tuner,Luxury,High-Performance',
 'Crossover,Factory Tuner,Luxury,Performance',
 'Crossover,Hatchback,Factory Tuner,Performance',
 'Crossover,Hatchback,Performance',
 'Flex Fuel,Hybrid',
 'Flex Fuel,Performance,Hybrid',
 'Crossover,Exotic,Luxury,High-Performance',
 'Crossover,Exotic,Luxury,Performance',
 'Exotic,Performance',
 'Exotic,Luxury,High-Performance,Hybrid',
 'Crossover,Luxury,Hybrid',
 'Flex Fuel,Factory Tuner,Luxury,High-Performance',
 'Performance,Hybrid',
 'Crossover,Factory Tuner,Performance',
 'Crossover,Diesel',
 'Flex Fuel,Diesel',
 'Crossover,Hatchback,Luxury']
# Decided to drop column becuse there are too many rows missing 
# Plus other features can still describe the market Category 
df.drop('Market Category', axis = 1, inplace=True) 
df.head()
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
0 BMW 1 Series M 2011 premium unleaded (required) 335.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 26 19 3916 46135
1 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 19 3916 40650
2 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 20 3916 36350
3 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 18 3916 29450
4 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 18 3916 34500

All Null values in Engine HP

# Examine the null values of Engine HP
df[df['Engine HP'].isnull()]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
539 FIAT 500e 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 108 122 819 31800
540 FIAT 500e 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 103 121 819 31800
541 FIAT 500e 2017 electric NaN 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 103 121 819 31800
2905 Lincoln Continental 2017 premium unleaded (recommended) NaN 6.0 AUTOMATIC all wheel drive 4.0 Large Sedan 25 17 61 55915
2906 Lincoln Continental 2017 premium unleaded (recommended) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 27 18 61 62915
2907 Lincoln Continental 2017 premium unleaded (recommended) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 27 18 61 53915
2908 Lincoln Continental 2017 premium unleaded (recommended) NaN 6.0 AUTOMATIC all wheel drive 4.0 Large Sedan 25 17 61 64915
4203 Ford Escape 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 30 23 5657 29100
4204 Ford Escape 2017 regular unleaded NaN 4.0 AUTOMATIC all wheel drive 4.0 Compact 4dr SUV 28 22 5657 30850
4205 Ford Escape 2017 regular unleaded NaN 4.0 AUTOMATIC all wheel drive 4.0 Compact 4dr SUV 28 22 5657 26850
4206 Ford Escape 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 30 23 5657 25100
4705 Honda Fit EV 2013 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 132 2202 36625
4706 Honda Fit EV 2014 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 132 2202 36625
4785 Ford Focus 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29170
4789 Ford Focus 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29170
4798 Ford Focus 2017 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29120
4914 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 22 16 5657 28030
4915 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 22 16 5657 23930
4916 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Cargo Minivan 22 16 5657 21630
4917 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 22 16 5657 26530
4918 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 16 5657 29030
4919 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 16 5657 32755
5778 Mitsubishi i-MiEV 2014 electric NaN NaN DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 99 126 436 22995
5825 Chevrolet Impala 2015 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 40660
5830 Chevrolet Impala 2015 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 37535
5831 Chevrolet Impala 2016 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 40810
5833 Chevrolet Impala 2016 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 37570
5839 Chevrolet Impala 2017 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 37675
5840 Chevrolet Impala 2017 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 40915
6385 Nissan Leaf 2014 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 35020
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
6578 Mercedes-Benz M-Class 2015 diesel NaN 4.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 29 22 617 49800
6908 Lincoln MKZ 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 38 41 61 35010
6910 Lincoln MKZ 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 38 41 61 39510
6916 Lincoln MKZ 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 38 41 61 36760
6918 Lincoln MKZ 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 38 41 61 47670
6921 Tesla Model S 2014 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 90 88 1391 79900
6922 Tesla Model S 2014 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 97 94 1391 69900
6923 Tesla Model S 2014 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 94 86 1391 104500
6924 Tesla Model S 2014 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 90 88 1391 93400
6925 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 97 94 1391 69900
6926 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 102 101 1391 75000
6927 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 106 95 1391 85000
6928 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 98 89 1391 105000
6929 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 90 88 1391 80000
6930 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 105 102 1391 79500
6931 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 101 98 1391 66000
6932 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 105 92 1391 134500
6933 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE rear wheel drive NaN Large Sedan 100 97 1391 74500
6934 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 107 101 1391 71000
6935 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 102 101 1391 75000
6936 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 107 101 1391 89500
6937 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 100 91 1391 112000
6938 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 90 88 1391 70000
8374 Toyota RAV4 EV 2013 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Midsize 4dr SUV 74 78 2031 49800
8375 Toyota RAV4 EV 2014 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Midsize 4dr SUV 74 78 2031 49800
9850 Kia Soul EV 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 35700
9851 Kia Soul EV 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 33700
9852 Kia Soul EV 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 33950
9853 Kia Soul EV 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 31950
9854 Kia Soul EV 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 35950

69 rows × 15 columns

Null values for model Fiat model 500e

Fill in Engine HP

# Couldn't compare to anything else provided in data
df[df['Model'] == '500e']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
539 FIAT 500e 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 108 122 819 31800
540 FIAT 500e 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 103 121 819 31800
541 FIAT 500e 2017 electric NaN 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 103 121 819 31800
# Searched Web for Engine HP and all years are the same 

for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Make'][i] == 'FIAT':
            df['Engine HP'][i] = 111
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:7: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
df[df['Model'] == '500e']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
539 FIAT 500e 2015 electric 111.0 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 108 122 819 31800
540 FIAT 500e 2016 electric 111.0 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 103 121 819 31800
541 FIAT 500e 2017 electric 111.0 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 103 121 819 31800
df['Engine HP'].isnull().sum()
66

model Continental null values

Fill in Engine HP

df[df['Model'] == 'Continental']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
2891 Bentley Continental 2001 premium unleaded (required) 420.0 8.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 15 10 520 299900
2892 Bentley Continental 2001 premium unleaded (required) 400.0 8.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 15 10 520 279900
2893 Bentley Continental 2001 premium unleaded (required) 420.0 8.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 15 10 520 309900
2894 Bentley Continental 2001 premium unleaded (required) 420.0 8.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 15 10 520 319900
2895 Bentley Continental 2003 premium unleaded (required) 420.0 8.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 15 10 520 328990
2896 Bentley Continental 2003 premium unleaded (required) 420.0 8.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 15 10 520 318990
2897 Lincoln Continental 2001 regular unleaded 275.0 8.0 AUTOMATIC front wheel drive 4.0 Large Sedan 23 15 61 39660
2898 Lincoln Continental 2002 premium unleaded (required) 275.0 8.0 AUTOMATIC front wheel drive 4.0 Large Sedan 23 15 61 39895
2899 Lincoln Continental 2002 premium unleaded (required) 275.0 8.0 AUTOMATIC front wheel drive 4.0 Large Sedan 23 15 61 38185
2900 Lincoln Continental 2002 premium unleaded (required) 275.0 8.0 AUTOMATIC front wheel drive 4.0 Large Sedan 23 15 61 38790
2901 Lincoln Continental 2002 premium unleaded (required) 275.0 8.0 AUTOMATIC front wheel drive 4.0 Large Sedan 23 15 61 39775
2902 Lincoln Continental 2017 regular unleaded 305.0 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 26 17 61 44560
2903 Lincoln Continental 2017 regular unleaded 305.0 6.0 AUTOMATIC all wheel drive 4.0 Large Sedan 24 16 61 46560
2904 Lincoln Continental 2017 regular unleaded 305.0 6.0 AUTOMATIC all wheel drive 4.0 Large Sedan 24 16 61 49515
2905 Lincoln Continental 2017 premium unleaded (recommended) NaN 6.0 AUTOMATIC all wheel drive 4.0 Large Sedan 25 17 61 55915
2906 Lincoln Continental 2017 premium unleaded (recommended) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 27 18 61 62915
2907 Lincoln Continental 2017 premium unleaded (recommended) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 27 18 61 53915
2908 Lincoln Continental 2017 premium unleaded (recommended) NaN 6.0 AUTOMATIC all wheel drive 4.0 Large Sedan 25 17 61 64915
2909 Lincoln Continental 2017 regular unleaded 305.0 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 26 17 61 47515
df.loc[2905,'Model'] = 'Continental R'
df.loc[2906,'Model'] = 'Continental SR'
df.loc[2907,'Model'] = 'Continental SR'
df.loc[2908,'Model'] = 'Continental R'
df.loc[2905]
Make                                        Lincoln
Model                                 Continental R
Year                                           2017
Engine Fuel Type     premium unleaded (recommended)
Engine HP                                       NaN
Engine Cylinders                                  6
Transmission Type                         AUTOMATIC
Driven_Wheels                       all wheel drive
Number of Doors                                   4
Vehicle Size                                  Large
Vehicle Style                                 Sedan
highway MPG                                      25
city mpg                                         17
Popularity                                       61
MSRP                                          55915
Name: 2905, dtype: object
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Model'][i] == 'Continental R':
            df['Engine HP'][i] = 400
        elif df['Model'][i] == 'Continental SR':
            df['Engine HP'][i] = 335
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:7: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
df[df['Model'] == 'Continental R']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
2905 Lincoln Continental R 2017 premium unleaded (recommended) 400.0 6.0 AUTOMATIC all wheel drive 4.0 Large Sedan 25 17 61 55915
2908 Lincoln Continental R 2017 premium unleaded (recommended) 400.0 6.0 AUTOMATIC all wheel drive 4.0 Large Sedan 25 17 61 64915
# Number is still going down
df['Engine HP'].isnull().sum()
62

model Escape null values

Fill in Engine HP

df[df['Model'] == 'Escape']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
4192 Ford Escape 2015 premium unleaded (recommended) 178.0 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 32 23 5657 29735
4193 Ford Escape 2015 premium unleaded (recommended) 178.0 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 32 23 5657 25650
4194 Ford Escape 2015 premium unleaded (recommended) 178.0 4.0 AUTOMATIC all wheel drive 4.0 Compact 4dr SUV 30 22 5657 27400
4195 Ford Escape 2015 regular unleaded 168.0 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 31 22 5657 23450
4196 Ford Escape 2015 premium unleaded (recommended) 178.0 4.0 AUTOMATIC all wheel drive 4.0 Compact 4dr SUV 30 22 5657 31485
4197 Ford Escape 2016 premium unleaded (recommended) 178.0 4.0 AUTOMATIC all wheel drive 4.0 Compact 4dr SUV 29 22 5657 27540
4198 Ford Escape 2016 premium unleaded (recommended) 178.0 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 32 23 5657 25790
4199 Ford Escape 2016 premium unleaded (recommended) 178.0 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 32 23 5657 29995
4200 Ford Escape 2016 regular unleaded 168.0 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 31 22 5657 23590
4201 Ford Escape 2016 premium unleaded (recommended) 178.0 4.0 AUTOMATIC all wheel drive 4.0 Compact 4dr SUV 29 22 5657 31745
4202 Ford Escape 2017 regular unleaded 168.0 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 29 21 5657 23600
4203 Ford Escape 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 30 23 5657 29100
4204 Ford Escape 2017 regular unleaded NaN 4.0 AUTOMATIC all wheel drive 4.0 Compact 4dr SUV 28 22 5657 30850
4205 Ford Escape 2017 regular unleaded NaN 4.0 AUTOMATIC all wheel drive 4.0 Compact 4dr SUV 28 22 5657 26850
4206 Ford Escape 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Compact 4dr SUV 30 23 5657 25100
df.loc[4203,'Model'] = 'Escape S'
df.loc[4204,'Model'] = 'Escape SE'
df.loc[4205,'Model'] = 'Escape SE'
df.loc[4206,'Model'] = 'Escape S'
df.loc[4205]
Make                             Ford
Model                       Escape SE
Year                             2017
Engine Fuel Type     regular unleaded
Engine HP                         NaN
Engine Cylinders                    4
Transmission Type           AUTOMATIC
Driven_Wheels         all wheel drive
Number of Doors                     4
Vehicle Size                  Compact
Vehicle Style                 4dr SUV
highway MPG                        28
city mpg                           22
Popularity                       5657
MSRP                            26850
Name: 4205, dtype: object
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Model'][i] == 'Escape S':
            df['Engine HP'][i] = 168
        elif df['Model'][i] == 'Escape SE':
            df['Engine HP'][i] = 179
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:7: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
58

model Fit EV null values

Fill in Engine HP

df[df['Model'] == 'Fit EV']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
4705 Honda Fit EV 2013 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 132 2202 36625
4706 Honda Fit EV 2014 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 132 2202 36625
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Model'][i] == 'Fit EV':
            df['Engine HP'][i] = 189
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
df[df['Model'] == 'Fit EV']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
4705 Honda Fit EV 2013 electric 189.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 132 2202 36625
4706 Honda Fit EV 2014 electric 189.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 132 2202 36625
# Number is still going down
df['Engine HP'].isnull().sum()
56

model Focus null values

Fill in Engine HP

df[df['Model'] == 'Focus']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
4780 Ford Focus 2015 flex-fuel (unleaded/E85) 160.0 4.0 MANUAL front wheel drive 4.0 Compact Sedan 36 26 5657 18460
4781 Ford Focus 2015 flex-fuel (unleaded/E85) 160.0 4.0 MANUAL front wheel drive 4.0 Compact 4dr Hatchback 36 26 5657 18960
4782 Ford Focus 2015 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact Sedan 40 27 5657 23170
4783 Ford Focus 2015 flex-fuel (unleaded/E85) 160.0 4.0 MANUAL front wheel drive 4.0 Compact Sedan 36 26 5657 17170
4784 Ford Focus 2015 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact 4dr Hatchback 40 27 5657 23670
4785 Ford Focus 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29170
4786 Ford Focus 2016 flex-fuel (unleaded/E85) 160.0 4.0 MANUAL front wheel drive 4.0 Compact Sedan 36 26 5657 18515
4787 Ford Focus 2016 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact 4dr Hatchback 40 27 5657 23725
4788 Ford Focus 2016 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact Sedan 40 27 5657 23225
4789 Ford Focus 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29170
4790 Ford Focus 2016 flex-fuel (unleaded/E85) 160.0 4.0 MANUAL front wheel drive 4.0 Compact 4dr Hatchback 36 26 5657 19015
4791 Ford Focus 2016 flex-fuel (unleaded/E85) 160.0 4.0 MANUAL front wheel drive 4.0 Compact Sedan 36 26 5657 17225
4792 Ford Focus 2017 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact 4dr Hatchback 40 27 5657 21675
4793 Ford Focus 2017 regular unleaded 123.0 3.0 MANUAL front wheel drive 4.0 Compact Sedan 42 30 5657 18175
4794 Ford Focus 2017 flex-fuel (unleaded/E85) 160.0 4.0 MANUAL front wheel drive 4.0 Compact Sedan 36 26 5657 16775
4795 Ford Focus 2017 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact 4dr Hatchback 40 27 5657 24075
4796 Ford Focus 2017 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact Sedan 40 27 5657 23575
4797 Ford Focus 2017 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact Sedan 40 27 5657 21175
4798 Ford Focus 2017 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29120
4799 Ford Focus 2017 flex-fuel (unleaded/E85) 160.0 4.0 AUTOMATED_MANUAL front wheel drive 4.0 Compact 4dr Hatchback 40 27 5657 19765
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Model'][i] == 'Focus':
            df['Engine HP'][i] = 143
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
53

model Freestar null values

Fill in Engine HP

df[df['Model'] == 'Freestar']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
4914 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 22 16 5657 28030
4915 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 22 16 5657 23930
4916 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Cargo Minivan 22 16 5657 21630
4917 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 22 16 5657 26530
4918 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 16 5657 29030
4919 Ford Freestar 2005 regular unleaded NaN 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 16 5657 32755
4920 Ford Freestar 2006 regular unleaded 193.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Cargo Minivan 22 16 5657 19650
4921 Ford Freestar 2006 regular unleaded 201.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 15 5657 29575
4922 Ford Freestar 2006 regular unleaded 193.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 22 16 5657 23655
4923 Ford Freestar 2006 regular unleaded 201.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 15 5657 26615
4924 Ford Freestar 2007 regular unleaded 201.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 15 5657 26665
4925 Ford Freestar 2007 regular unleaded 201.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 15 5657 23705
4926 Ford Freestar 2007 regular unleaded 201.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Passenger Minivan 21 15 5657 29575
4927 Ford Freestar 2007 regular unleaded 201.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Cargo Minivan 21 15 5657 19700
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Model'][i] == 'Freestar':
            df['Engine HP'][i] = 201
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
47

model I-MIEV null values

Fill in Engine HP

df[df['Model'] == 'i-MiEV']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
5778 Mitsubishi i-MiEV 2014 electric NaN NaN DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 99 126 436 22995
5779 Mitsubishi i-MiEV 2016 electric 66.0 NaN DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 99 126 436 22995
5780 Mitsubishi i-MiEV 2017 electric 66.0 NaN DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 102 121 436 22995
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Model'][i] == 'i-MiEV':
            df['Engine HP'][i] = 201
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
46

model Impala null values

Fill in Engine HP

# All years have the same HP for flex fuel v6
df[df['Model'] == 'Impala']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
5823 Chevrolet Impala 2015 regular unleaded 195.0 4.0 AUTOMATIC front wheel drive 4.0 Large Sedan 31 21 1385 34465
5824 Chevrolet Impala 2015 regular unleaded 195.0 4.0 AUTOMATIC front wheel drive 4.0 Large Sedan 31 21 1385 27060
5825 Chevrolet Impala 2015 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 40660
5826 Chevrolet Impala 2015 flex-fuel (unleaded/E85) 305.0 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 29 19 1385 35440
5827 Chevrolet Impala 2015 flex-fuel (unleaded/E85) 305.0 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 29 19 1385 30285
5828 Chevrolet Impala 2015 regular unleaded 195.0 4.0 AUTOMATIC front wheel drive 4.0 Large Sedan 31 21 1385 29310
5830 Chevrolet Impala 2015 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 37535
5831 Chevrolet Impala 2016 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 40810
5832 Chevrolet Impala 2016 flex-fuel (unleaded/E85) 305.0 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 29 19 1385 35540
5833 Chevrolet Impala 2016 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 37570
5834 Chevrolet Impala 2016 flex-fuel (unleaded/E85) 305.0 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 29 19 1385 30435
5835 Chevrolet Impala 2016 regular unleaded 195.0 4.0 AUTOMATIC front wheel drive 4.0 Large Sedan 31 22 1385 27095
5836 Chevrolet Impala 2016 regular unleaded 195.0 4.0 AUTOMATIC front wheel drive 4.0 Large Sedan 31 22 1385 29460
5838 Chevrolet Impala 2017 flex-fuel (unleaded/E85) 305.0 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 28 19 1385 35645
5839 Chevrolet Impala 2017 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 37675
5840 Chevrolet Impala 2017 flex-fuel (unleaded/natural gas) NaN 6.0 AUTOMATIC front wheel drive 4.0 Large Sedan 25 17 1385 40915
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
        if df['Model'][i] == 'Impala':
            df['Engine HP'][i] = 305
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:4: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
40

model Leaf null values

Fill in Engine HP

df[df['Model'] == 'Leaf']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
6385 Nissan Leaf 2014 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 35020
6386 Nissan Leaf 2014 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 32000
6387 Nissan Leaf 2014 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 28980
6388 Nissan Leaf 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 32100
6389 Nissan Leaf 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 35120
6390 Nissan Leaf 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 29010
6391 Nissan Leaf 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 32000
6392 Nissan Leaf 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 29010
6393 Nissan Leaf 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 124 2009 34200
6394 Nissan Leaf 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 124 2009 36790
# All leaf models are 110 HP
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
        if df['Model'][i] == 'Leaf':
            df['Engine HP'][i] = 110
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
30

Null value for M-Class

df[df['Model'] == 'M-Class']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
6566 Mercedes-Benz M-Class 2013 diesel 240.0 6.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 28 20 617 51270
6567 Mercedes-Benz M-Class 2013 premium unleaded (required) 518.0 8.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 17 13 617 96100
6568 Mercedes-Benz M-Class 2013 premium unleaded (required) 402.0 8.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 20 14 617 58800
6569 Mercedes-Benz M-Class 2013 premium unleaded (required) 302.0 6.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 23 18 617 49770
6570 Mercedes-Benz M-Class 2013 premium unleaded (required) 302.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 23 18 617 47270
6571 Mercedes-Benz M-Class 2014 premium unleaded (required) 518.0 8.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 17 13 617 97250
6572 Mercedes-Benz M-Class 2014 diesel 240.0 6.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 28 20 617 51790
6573 Mercedes-Benz M-Class 2014 premium unleaded (required) 302.0 6.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 22 17 617 50290
6574 Mercedes-Benz M-Class 2014 premium unleaded (required) 402.0 8.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 19 14 617 59450
6575 Mercedes-Benz M-Class 2014 premium unleaded (required) 302.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 24 18 617 47790
6576 Mercedes-Benz M-Class 2015 premium unleaded (required) 329.0 6.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 22 18 617 62900
6577 Mercedes-Benz M-Class 2015 premium unleaded (required) 302.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 24 18 617 48300
6578 Mercedes-Benz M-Class 2015 diesel NaN 4.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 29 22 617 49800
6579 Mercedes-Benz M-Class 2015 premium unleaded (required) 518.0 8.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 17 13 617 98400
6580 Mercedes-Benz M-Class 2015 premium unleaded (required) 302.0 6.0 AUTOMATIC all wheel drive 4.0 Midsize 4dr SUV 22 17 617 50800
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
        if df['Model'][i] == 'M-Class':
            df['Engine HP'][i] = 240
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:4: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
29

Model MKZ

Fill in null Engine HP

# Only difference are the fuel type and Drivn_wheels
# 2.0L version can be front or all wheel drive 
# Would still use 245 HP for year 2017
df[df['Model'] == 'MKZ']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
6896 Lincoln MKZ 2015 regular unleaded 231.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 33 22 61 45555
6897 Lincoln MKZ 2015 regular unleaded 231.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 33 22 61 35190
6898 Lincoln MKZ 2015 regular unleaded 188.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 39 41 61 35190
6899 Lincoln MKZ 2015 regular unleaded 231.0 4.0 AUTOMATIC all wheel drive 4.0 Midsize Sedan 31 22 61 37080
6900 Lincoln MKZ 2015 regular unleaded 188.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 39 41 61 45555
6901 Lincoln MKZ 2015 regular unleaded 231.0 4.0 AUTOMATIC all wheel drive 4.0 Midsize Sedan 31 22 61 47445
6902 Lincoln MKZ 2016 regular unleaded 231.0 4.0 AUTOMATIC all wheel drive 4.0 Midsize Sedan 31 22 61 37080
6903 Lincoln MKZ 2016 regular unleaded 188.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 39 41 61 45605
6904 Lincoln MKZ 2016 regular unleaded 231.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 33 22 61 45605
6905 Lincoln MKZ 2016 regular unleaded 231.0 4.0 AUTOMATIC all wheel drive 4.0 Midsize Sedan 31 22 61 47495
6906 Lincoln MKZ 2016 regular unleaded 188.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 39 41 61 35190
6907 Lincoln MKZ 2016 regular unleaded 231.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 33 22 61 35190
6908 Lincoln MKZ 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 38 41 61 35010
6909 Lincoln MKZ 2017 premium unleaded (recommended) 245.0 4.0 AUTOMATIC all wheel drive 4.0 Midsize Sedan 28 20 61 36900
6910 Lincoln MKZ 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 38 41 61 39510
6911 Lincoln MKZ 2017 premium unleaded (recommended) 245.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 31 21 61 39510
6912 Lincoln MKZ 2017 premium unleaded (recommended) 245.0 4.0 AUTOMATIC all wheel drive 4.0 Midsize Sedan 28 20 61 49560
6913 Lincoln MKZ 2017 premium unleaded (recommended) 245.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 31 21 61 35010
6914 Lincoln MKZ 2017 premium unleaded (recommended) 245.0 4.0 AUTOMATIC all wheel drive 4.0 Midsize Sedan 28 20 61 41400
6915 Lincoln MKZ 2017 premium unleaded (recommended) 245.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 31 21 61 47670
6916 Lincoln MKZ 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 38 41 61 36760
6917 Lincoln MKZ 2017 premium unleaded (recommended) 245.0 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 31 21 61 36760
6918 Lincoln MKZ 2017 regular unleaded NaN 4.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 38 41 61 47670
6919 Lincoln MKZ 2017 premium unleaded (recommended) 245.0 4.0 AUTOMATIC all wheel drive 4.0 Midsize Sedan 28 20 61 38650
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Model'][i] == 'MKZ':
            df['Engine HP'][i] = 245
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
25

Model RAV4 EV

Fill in null Engine HP

# All model years are the same HP
df[df['Model'] == 'RAV4 EV']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
8373 Toyota RAV4 EV 2012 electric 154.0 NaN DIRECT_DRIVE front wheel drive 4.0 Midsize 4dr SUV 74 78 2031 49800
8374 Toyota RAV4 EV 2013 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Midsize 4dr SUV 74 78 2031 49800
8375 Toyota RAV4 EV 2014 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Midsize 4dr SUV 74 78 2031 49800
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
        if df['Model'][i] == 'RAV4 EV':
            df['Engine HP'][i] = 154
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:4: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
23

Model Soul S

Fill in null Engine HP

df[df['Model'] == 'Soul EV']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
9850 Kia Soul EV 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 35700
9851 Kia Soul EV 2015 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 33700
9852 Kia Soul EV 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 33950
9853 Kia Soul EV 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 31950
9854 Kia Soul EV 2016 electric NaN 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 35950
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
        if df['Model'][i] == 'Soul EV':
            df['Engine HP'][i] = 109
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:4: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Number is still going down
df['Engine HP'].isnull().sum()
18

Model S

Fill in null Engine HP

df[df['Model'] == 'Model S']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
6921 Tesla Model S 2014 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 90 88 1391 79900
6922 Tesla Model S 2014 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 97 94 1391 69900
6923 Tesla Model S 2014 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 94 86 1391 104500
6924 Tesla Model S 2014 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 90 88 1391 93400
6925 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 97 94 1391 69900
6926 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 102 101 1391 75000
6927 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 106 95 1391 85000
6928 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 98 89 1391 105000
6929 Tesla Model S 2015 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 90 88 1391 80000
6930 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 105 102 1391 79500
6931 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 101 98 1391 66000
6932 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 105 92 1391 134500
6933 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE rear wheel drive NaN Large Sedan 100 97 1391 74500
6934 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 107 101 1391 71000
6935 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 102 101 1391 75000
6936 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 107 101 1391 89500
6937 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 100 91 1391 112000
6938 Tesla Model S 2016 electric NaN 0.0 DIRECT_DRIVE rear wheel drive 4.0 Large Sedan 90 88 1391 70000
# Change model name by the driven wheels

for i, j in df['Model'].iteritems():
    if np.isnan(df['Engine HP'][i]):
#         print (i,j)
        if df['Driven_Wheels'][i] == 'all wheel drive':
            df['Model'][i] = 'Model D'
        elif df['Driven_Wheels'][i] == 'rear wheel drive':
            df['Model'][i] = 'Model S'
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:9: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:7: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
df[df['Model'] == 'Model D']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
6923 Tesla Model D 2014 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 94 86 1391 104500
6926 Tesla Model D 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 102 101 1391 75000
6927 Tesla Model D 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 106 95 1391 85000
6928 Tesla Model D 2015 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 98 89 1391 105000
6930 Tesla Model D 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 105 102 1391 79500
6931 Tesla Model D 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 101 98 1391 66000
6932 Tesla Model D 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 105 92 1391 134500
6934 Tesla Model D 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 107 101 1391 71000
6935 Tesla Model D 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 102 101 1391 75000
6936 Tesla Model D 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 107 101 1391 89500
6937 Tesla Model D 2016 electric NaN 0.0 DIRECT_DRIVE all wheel drive 4.0 Large Sedan 100 91 1391 112000
for i, j in df['Engine HP'].iteritems():
    if np.isnan(df['Engine HP'][i]):
        if df['Model'][i] == 'Model S':
            df['Engine HP'][i] = 362
        elif df['Model'][i] == 'Model D':
            df['Engine HP'][i] = 259
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:4: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:6: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
# Down to Zero
df['Engine HP'].isnull().sum()
0

NUll values in Engine Cylinders

# Examine the null values of Engine Cylinder 
df[df['Engine Cylinders'].isnull()]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
1983 Chevrolet Bolt EV 2017 electric 200.0 NaN DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 110 128 1385 40905
1984 Chevrolet Bolt EV 2017 electric 200.0 NaN DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 110 128 1385 36620
3716 Volkswagen e-Golf 2015 electric 115.0 NaN DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 126 873 33450
3717 Volkswagen e-Golf 2015 electric 115.0 NaN DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 126 873 35445
3718 Volkswagen e-Golf 2016 electric 115.0 NaN DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 126 873 28995
3719 Volkswagen e-Golf 2016 electric 115.0 NaN DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 126 873 35595
5778 Mitsubishi i-MiEV 2014 electric 201.0 NaN DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 99 126 436 22995
5779 Mitsubishi i-MiEV 2016 electric 66.0 NaN DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 99 126 436 22995
5780 Mitsubishi i-MiEV 2017 electric 66.0 NaN DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 102 121 436 22995
8373 Toyota RAV4 EV 2012 electric 154.0 NaN DIRECT_DRIVE front wheel drive 4.0 Midsize 4dr SUV 74 78 2031 49800
8695 Mazda RX-7 1993 regular unleaded 255.0 NaN MANUAL rear wheel drive 2.0 Compact Coupe 23 15 586 7523
8696 Mazda RX-7 1994 regular unleaded 255.0 NaN MANUAL rear wheel drive 2.0 Compact Coupe 23 15 586 8147
8697 Mazda RX-7 1995 regular unleaded 255.0 NaN MANUAL rear wheel drive 2.0 Compact Coupe 23 15 586 8839
8698 Mazda RX-8 2009 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 31930
8699 Mazda RX-8 2009 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26435
8700 Mazda RX-8 2009 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 27860
8701 Mazda RX-8 2009 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 31000
8702 Mazda RX-8 2009 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26435
8703 Mazda RX-8 2009 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 31700
8704 Mazda RX-8 2009 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 28560
8705 Mazda RX-8 2010 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32140
8706 Mazda RX-8 2010 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26645
8707 Mazda RX-8 2010 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 32810
8708 Mazda RX-8 2010 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26645
8709 Mazda RX-8 2010 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32110
8710 Mazda RX-8 2011 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 32960
8711 Mazda RX-8 2011 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32260
8712 Mazda RX-8 2011 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32290
8713 Mazda RX-8 2011 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26795
8714 Mazda RX-8 2011 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26795
# from what I can see this model is a rotary engine which means it have no cylinders 
df[df['Model'] == 'RX-7']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
8695 Mazda RX-7 1993 regular unleaded 255.0 NaN MANUAL rear wheel drive 2.0 Compact Coupe 23 15 586 7523
8696 Mazda RX-7 1994 regular unleaded 255.0 NaN MANUAL rear wheel drive 2.0 Compact Coupe 23 15 586 8147
8697 Mazda RX-7 1995 regular unleaded 255.0 NaN MANUAL rear wheel drive 2.0 Compact Coupe 23 15 586 8839
# from what I can see this model is a rotary engine which means it have no cylinders 
df[df['Model'] == 'RX-8']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
8698 Mazda RX-8 2009 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 31930
8699 Mazda RX-8 2009 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26435
8700 Mazda RX-8 2009 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 27860
8701 Mazda RX-8 2009 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 31000
8702 Mazda RX-8 2009 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26435
8703 Mazda RX-8 2009 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 31700
8704 Mazda RX-8 2009 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 28560
8705 Mazda RX-8 2010 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32140
8706 Mazda RX-8 2010 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26645
8707 Mazda RX-8 2010 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 32810
8708 Mazda RX-8 2010 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26645
8709 Mazda RX-8 2010 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32110
8710 Mazda RX-8 2011 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 32960
8711 Mazda RX-8 2011 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32260
8712 Mazda RX-8 2011 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32290
8713 Mazda RX-8 2011 premium unleaded (required) 232.0 NaN MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26795
8714 Mazda RX-8 2011 premium unleaded (required) 212.0 NaN AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26795
# Also no electric cars have cylinders
# was able to repalce all nan values with 0
for i, j in df['Engine Cylinders'].iteritems():
    if np.isnan(df['Engine Cylinders'][i]):
            df['Engine Cylinders'][i] = 0
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:5: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
df[df['Engine Cylinders'] <=0]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
539 FIAT 500e 2015 electric 111.0 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 108 122 819 31800
540 FIAT 500e 2016 electric 111.0 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 103 121 819 31800
541 FIAT 500e 2017 electric 111.0 0.0 DIRECT_DRIVE front wheel drive 2.0 Compact 2dr Hatchback 103 121 819 31800
1680 Mercedes-Benz B-Class Electric Drive 2015 electric 177.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 82 85 617 41450
1681 Mercedes-Benz B-Class Electric Drive 2016 electric 177.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 82 85 617 41450
1682 Mercedes-Benz B-Class Electric Drive 2017 electric 177.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 82 85 617 39900
1983 Chevrolet Bolt EV 2017 electric 200.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 110 128 1385 40905
1984 Chevrolet Bolt EV 2017 electric 200.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 110 128 1385 36620
3716 Volkswagen e-Golf 2015 electric 115.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 126 873 33450
3717 Volkswagen e-Golf 2015 electric 115.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 126 873 35445
3718 Volkswagen e-Golf 2016 electric 115.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 126 873 28995
3719 Volkswagen e-Golf 2016 electric 115.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 126 873 35595
4705 Honda Fit EV 2013 electric 189.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 132 2202 36625
4706 Honda Fit EV 2014 electric 189.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 105 132 2202 36625
4785 Ford Focus 2015 electric 143.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29170
4789 Ford Focus 2016 electric 143.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29170
4798 Ford Focus 2017 electric 143.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 99 110 5657 29120
5778 Mitsubishi i-MiEV 2014 electric 201.0 0.0 DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 99 126 436 22995
5779 Mitsubishi i-MiEV 2016 electric 66.0 0.0 DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 99 126 436 22995
5780 Mitsubishi i-MiEV 2017 electric 66.0 0.0 DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 102 121 436 22995
5790 BMW i3 2015 electric 170.0 0.0 DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 111 137 3916 42400
5791 BMW i3 2016 electric 170.0 0.0 DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 111 137 3916 42400
5792 BMW i3 2017 electric 170.0 0.0 DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 111 137 3916 42400
5793 BMW i3 2017 electric 170.0 0.0 DIRECT_DRIVE rear wheel drive 4.0 Compact 4dr Hatchback 106 129 3916 43600
6385 Nissan Leaf 2014 electric 110.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 35020
6386 Nissan Leaf 2014 electric 110.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 32000
6387 Nissan Leaf 2014 electric 110.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 28980
6388 Nissan Leaf 2015 electric 110.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 32100
6389 Nissan Leaf 2015 electric 110.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 35120
6390 Nissan Leaf 2015 electric 110.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 101 126 2009 29010
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
8696 Mazda RX-7 1994 regular unleaded 255.0 0.0 MANUAL rear wheel drive 2.0 Compact Coupe 23 15 586 8147
8697 Mazda RX-7 1995 regular unleaded 255.0 0.0 MANUAL rear wheel drive 2.0 Compact Coupe 23 15 586 8839
8698 Mazda RX-8 2009 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 31930
8699 Mazda RX-8 2009 premium unleaded (required) 212.0 0.0 AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26435
8700 Mazda RX-8 2009 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 27860
8701 Mazda RX-8 2009 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 31000
8702 Mazda RX-8 2009 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26435
8703 Mazda RX-8 2009 premium unleaded (required) 212.0 0.0 AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 31700
8704 Mazda RX-8 2009 premium unleaded (required) 212.0 0.0 AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 28560
8705 Mazda RX-8 2010 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32140
8706 Mazda RX-8 2010 premium unleaded (required) 212.0 0.0 AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26645
8707 Mazda RX-8 2010 premium unleaded (required) 212.0 0.0 AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 32810
8708 Mazda RX-8 2010 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26645
8709 Mazda RX-8 2010 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32110
8710 Mazda RX-8 2011 premium unleaded (required) 212.0 0.0 AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 32960
8711 Mazda RX-8 2011 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32260
8712 Mazda RX-8 2011 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 32290
8713 Mazda RX-8 2011 premium unleaded (required) 232.0 0.0 MANUAL rear wheel drive 4.0 Compact Coupe 22 16 586 26795
8714 Mazda RX-8 2011 premium unleaded (required) 212.0 0.0 AUTOMATIC rear wheel drive 4.0 Compact Coupe 23 16 586 26795
9850 Kia Soul EV 2015 electric 109.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 35700
9851 Kia Soul EV 2015 electric 109.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 33700
9852 Kia Soul EV 2016 electric 109.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 33950
9853 Kia Soul EV 2016 electric 109.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 31950
9854 Kia Soul EV 2016 electric 109.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact Wagon 92 120 1720 35950
9867 Chevrolet Spark EV 2014 electric 140.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 109 128 1385 26685
9868 Chevrolet Spark EV 2014 electric 140.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 109 128 1385 27010
9869 Chevrolet Spark EV 2015 electric 140.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 109 128 1385 25170
9870 Chevrolet Spark EV 2015 electric 140.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 109 128 1385 25560
9871 Chevrolet Spark EV 2016 electric 140.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 109 128 1385 25510
9872 Chevrolet Spark EV 2016 electric 140.0 0.0 DIRECT_DRIVE front wheel drive 4.0 Compact 4dr Hatchback 109 128 1385 25120

86 rows × 15 columns

df.groupby(['Make','Model', 'Engine Cylinders']).count()
Year Engine Fuel Type Engine HP Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
Make Model Engine Cylinders
Acura CL 6.0 9 9 9 9 9 9 9 9 9 9 9 9
ILX 4.0 16 16 16 16 16 16 16 16 16 16 16 16
ILX Hybrid 4.0 2 2 2 2 2 2 2 2 2 2 2 2
Integra 4.0 24 24 24 24 24 24 24 24 24 24 24 24
Legend 6.0 16 16 16 16 16 16 16 16 16 16 16 16
MDX 6.0 34 34 34 34 34 34 34 34 34 34 34 34
NSX 6.0 5 5 5 5 5 5 5 5 5 5 5 5
RDX 6.0 24 24 24 24 24 24 24 24 24 24 24 24
RL 6.0 9 9 9 9 9 9 9 9 9 9 9 9
RLX 6.0 12 12 12 12 12 12 12 12 12 12 12 12
RSX 4.0 15 15 15 15 15 15 15 15 15 15 15 15
SLX 6.0 4 4 4 4 4 4 4 4 4 4 4 4
TL 6.0 23 23 23 23 23 23 23 23 23 23 23 23
TLX 4.0 6 6 6 6 6 6 6 6 6 6 6 6
6.0 15 15 15 15 15 15 15 15 15 15 15 15
TSX 4.0 12 12 12 12 12 12 12 12 12 12 12 12
6.0 4 4 4 4 4 4 4 4 4 4 4 4
TSX Sport Wagon 4.0 6 6 6 6 6 6 6 6 6 6 6 6
Vigor 5.0 3 3 3 3 3 3 3 3 3 3 3 3
ZDX 6.0 7 7 7 7 7 7 7 7 7 7 7 7
Alfa Romeo 4C 4.0 5 5 5 5 5 5 5 5 5 5 5 5
Aston Martin DB7 12.0 4 4 4 4 4 4 4 4 4 4 4 4
DB9 12.0 8 8 8 8 8 8 8 8 8 8 8 8
DB9 GT 12.0 3 3 3 3 3 3 3 3 3 3 3 3
DBS 12.0 16 16 16 16 16 16 16 16 16 16 16 16
Rapide 12.0 4 4 4 4 4 4 4 4 4 4 4 4
Rapide S 12.0 3 3 3 3 3 3 3 3 3 3 3 3
V12 Vanquish 12.0 4 4 4 4 4 4 4 4 4 4 4 4
V12 Vantage 12.0 4 4 4 4 4 4 4 4 4 4 4 4
V12 Vantage S 12.0 3 3 3 3 3 3 3 3 3 3 3 3
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
Volvo C70 5.0 3 3 3 3 3 3 3 3 3 3 3 3
Coupe 4.0 1 1 1 1 1 1 1 1 1 1 1 1
S40 5.0 8 8 8 8 8 8 8 8 8 8 8 8
S60 4.0 16 16 16 16 16 16 16 16 16 16 16 16
5.0 7 7 7 7 7 7 7 7 7 7 7 7
6.0 5 5 5 5 5 5 5 5 5 5 5 5
S60 Cross Country 4.0 1 1 1 1 1 1 1 1 1 1 1 1
S70 5.0 13 13 13 13 13 13 13 13 13 13 13 13
S80 4.0 4 4 4 4 4 4 4 4 4 4 4 4
6.0 4 4 4 4 4 4 4 4 4 4 4 4
S90 4.0 4 4 4 4 4 4 4 4 4 4 4 4
6.0 1 1 1 1 1 1 1 1 1 1 1 1
V40 4.0 4 4 4 4 4 4 4 4 4 4 4 4
V50 5.0 6 6 6 6 6 6 6 6 6 6 6 6
V60 4.0 11 11 11 11 11 11 11 11 11 11 11 11
5.0 5 5 5 5 5 5 5 5 5 5 5 5
6.0 5 5 5 5 5 5 5 5 5 5 5 5
V60 Cross Country 4.0 2 2 2 2 2 2 2 2 2 2 2 2
5.0 4 4 4 4 4 4 4 4 4 4 4 4
V70 6.0 4 4 4 4 4 4 4 4 4 4 4 4
V90 6.0 1 1 1 1 1 1 1 1 1 1 1 1
XC 5.0 1 1 1 1 1 1 1 1 1 1 1 1
XC60 4.0 26 26 26 26 26 26 26 26 26 26 26 26
5.0 6 6 6 6 6 6 6 6 6 6 6 6
6.0 20 20 20 20 20 20 20 20 20 20 20 20
XC70 4.0 7 7 7 7 7 7 7 7 7 7 7 7
5.0 5 5 5 5 5 5 5 5 5 5 5 5
6.0 6 6 6 6 6 6 6 6 6 6 6 6
XC90 4.0 15 15 15 15 15 15 15 15 15 15 15 15
6.0 2 2 2 2 2 2 2 2 2 2 2 2

1160 rows × 12 columns

grouped = df.groupby('Year')
print(grouped.get_group(2014))
              Make                  Model  Year             Engine Fuel Type  \
120          Mazda                      2  2014             regular unleaded   
121          Mazda                      2  2014             regular unleaded   
122          Mazda                      2  2014             regular unleaded   
123          Mazda                      2  2014             regular unleaded   
468        Ferrari             458 Italia  2014  premium unleaded (required)   
469        Ferrari             458 Italia  2014  premium unleaded (required)   
470        Ferrari             458 Italia  2014  premium unleaded (required)   
479         Toyota                4Runner  2014             regular unleaded   
480         Toyota                4Runner  2014             regular unleaded   
481         Toyota                4Runner  2014             regular unleaded   
482         Toyota                4Runner  2014             regular unleaded   
483         Toyota                4Runner  2014             regular unleaded   
484         Toyota                4Runner  2014             regular unleaded   
485         Toyota                4Runner  2014             regular unleaded   
486         Toyota                4Runner  2014             regular unleaded   
627          Mazda                      5  2014             regular unleaded   
628          Mazda                      5  2014             regular unleaded   
629          Mazda                      5  2014             regular unleaded   
630          Mazda                      5  2014             regular unleaded   
1171       Hyundai                 Accent  2014             regular unleaded   
1172       Hyundai                 Accent  2014             regular unleaded   
1173       Hyundai                 Accent  2014             regular unleaded   
1174       Hyundai                 Accent  2014             regular unleaded   
1175       Hyundai                 Accent  2014             regular unleaded   
1176       Hyundai                 Accent  2014             regular unleaded   
1202         Honda          Accord Hybrid  2014             regular unleaded   
1203         Honda          Accord Hybrid  2014             regular unleaded   
1204         Honda          Accord Hybrid  2014             regular unleaded   
1211         Honda  Accord Plug-In Hybrid  2014             regular unleaded   
1292           BMW         ActiveHybrid 5  2014  premium unleaded (required)   
...            ...                    ...   ...                          ...   
11283       Toyota                  Venza  2014             regular unleaded   
11284       Toyota                  Venza  2014             regular unleaded   
11285       Toyota                  Venza  2014             regular unleaded   
11286       Toyota                  Venza  2014             regular unleaded   
11287       Toyota                  Venza  2014             regular unleaded   
11448  Rolls-Royce                 Wraith  2014  premium unleaded (required)   
11545        Scion                     xB  2014             regular unleaded   
11546        Scion                     xB  2014             regular unleaded   
11547        Scion                     xB  2014             regular unleaded   
11605        Volvo                   XC70  2014             regular unleaded   
11606        Volvo                   XC70  2014             regular unleaded   
11623        Volvo                   XC90  2014             regular unleaded   
11624        Volvo                   XC90  2014             regular unleaded   
11649        Scion                     xD  2014             regular unleaded   
11650        Scion                     xD  2014             regular unleaded   
11751       Nissan                 Xterra  2014             regular unleaded   
11752       Nissan                 Xterra  2014             regular unleaded   
11753       Nissan                 Xterra  2014             regular unleaded   
11754       Nissan                 Xterra  2014             regular unleaded   
11755       Nissan                 Xterra  2014             regular unleaded   
11756       Nissan                 Xterra  2014             regular unleaded   
11757       Nissan                 Xterra  2014             regular unleaded   
11798       Subaru           XV Crosstrek  2014             regular unleaded   
11799       Subaru           XV Crosstrek  2014             regular unleaded   
11800       Subaru           XV Crosstrek  2014             regular unleaded   
11801       Subaru           XV Crosstrek  2014             regular unleaded   
11802       Subaru           XV Crosstrek  2014             regular unleaded   
11894          BMW                     Z4  2014  premium unleaded (required)   
11895          BMW                     Z4  2014  premium unleaded (required)   
11896          BMW                     Z4  2014  premium unleaded (required)   

       Engine HP  Engine Cylinders Transmission Type      Driven_Wheels  \
120        100.0               4.0         AUTOMATIC  front wheel drive   
121        100.0               4.0         AUTOMATIC  front wheel drive   
122        100.0               4.0            MANUAL  front wheel drive   
123        100.0               4.0            MANUAL  front wheel drive   
468        562.0               8.0  AUTOMATED_MANUAL   rear wheel drive   
469        597.0               8.0  AUTOMATED_MANUAL   rear wheel drive   
470        562.0               8.0  AUTOMATED_MANUAL   rear wheel drive   
479        270.0               6.0         AUTOMATIC   rear wheel drive   
480        270.0               6.0         AUTOMATIC   rear wheel drive   
481        270.0               6.0         AUTOMATIC   four wheel drive   
482        270.0               6.0         AUTOMATIC   four wheel drive   
483        270.0               6.0         AUTOMATIC   four wheel drive   
484        270.0               6.0         AUTOMATIC   four wheel drive   
485        270.0               6.0         AUTOMATIC   rear wheel drive   
486        270.0               6.0         AUTOMATIC   four wheel drive   
627        157.0               4.0            MANUAL  front wheel drive   
628        157.0               4.0         AUTOMATIC  front wheel drive   
629        157.0               4.0         AUTOMATIC  front wheel drive   
630        157.0               4.0         AUTOMATIC  front wheel drive   
1171       138.0               4.0         AUTOMATIC  front wheel drive   
1172       138.0               4.0            MANUAL  front wheel drive   
1173       138.0               4.0         AUTOMATIC  front wheel drive   
1174       138.0               4.0         AUTOMATIC  front wheel drive   
1175       138.0               4.0            MANUAL  front wheel drive   
1176       138.0               4.0            MANUAL  front wheel drive   
1202       195.0               4.0         AUTOMATIC  front wheel drive   
1203       195.0               4.0         AUTOMATIC  front wheel drive   
1204       195.0               4.0         AUTOMATIC  front wheel drive   
1211       196.0               4.0         AUTOMATIC  front wheel drive   
1292       335.0               6.0         AUTOMATIC   rear wheel drive   
...          ...               ...               ...                ...   
11283      268.0               6.0         AUTOMATIC    all wheel drive   
11284      181.0               4.0         AUTOMATIC  front wheel drive   
11285      268.0               6.0         AUTOMATIC  front wheel drive   
11286      181.0               4.0         AUTOMATIC  front wheel drive   
11287      181.0               4.0         AUTOMATIC    all wheel drive   
11448      624.0              12.0         AUTOMATIC   rear wheel drive   
11545      158.0               4.0            MANUAL  front wheel drive   
11546      158.0               4.0         AUTOMATIC  front wheel drive   
11547      158.0               4.0         AUTOMATIC  front wheel drive   
11605      240.0               6.0         AUTOMATIC  front wheel drive   
11606      300.0               6.0         AUTOMATIC    all wheel drive   
11623      240.0               6.0         AUTOMATIC  front wheel drive   
11624      240.0               6.0         AUTOMATIC  front wheel drive   
11649      128.0               4.0            MANUAL  front wheel drive   
11650      128.0               4.0         AUTOMATIC  front wheel drive   
11751      261.0               6.0         AUTOMATIC   four wheel drive   
11752      261.0               6.0         AUTOMATIC   rear wheel drive   
11753      261.0               6.0         AUTOMATIC   four wheel drive   
11754      261.0               6.0         AUTOMATIC   four wheel drive   
11755      261.0               6.0            MANUAL   four wheel drive   
11756      261.0               6.0         AUTOMATIC   rear wheel drive   
11757      261.0               6.0            MANUAL   four wheel drive   
11798      160.0               4.0         AUTOMATIC    all wheel drive   
11799      160.0               4.0         AUTOMATIC    all wheel drive   
11800      148.0               4.0         AUTOMATIC    all wheel drive   
11801      148.0               4.0         AUTOMATIC    all wheel drive   
11802      148.0               4.0            MANUAL    all wheel drive   
11894      240.0               4.0            MANUAL   rear wheel drive   
11895      300.0               6.0            MANUAL   rear wheel drive   
11896      335.0               6.0  AUTOMATED_MANUAL   rear wheel drive   

       Number of Doors Vehicle Size      Vehicle Style  highway MPG  city mpg  \
120                4.0      Compact      4dr Hatchback           34        28   
121                4.0      Compact      4dr Hatchback           34        28   
122                4.0      Compact      4dr Hatchback           35        29   
123                4.0      Compact      4dr Hatchback           35        29   
468                2.0      Compact              Coupe           17        13   
469                2.0      Compact              Coupe           17        13   
470                2.0      Compact        Convertible           17        13   
479                4.0      Midsize            4dr SUV           23        17   
480                4.0      Midsize            4dr SUV           23        17   
481                4.0      Midsize            4dr SUV           22        17   
482                4.0      Midsize            4dr SUV           22        17   
483                4.0      Midsize            4dr SUV           22        17   
484                4.0      Midsize            4dr SUV           22        17   
485                4.0      Midsize            4dr SUV           23        17   
486                4.0      Midsize            4dr SUV           22        17   
627                4.0      Compact  Passenger Minivan           28        21   
628                4.0      Compact  Passenger Minivan           28        22   
629                4.0      Compact  Passenger Minivan           28        22   
630                4.0      Compact  Passenger Minivan           28        22   
1171               4.0      Compact      4dr Hatchback           37        27   
1172               4.0      Compact      4dr Hatchback           38        27   
1173               4.0      Compact              Sedan           37        27   
1174               4.0      Compact      4dr Hatchback           37        27   
1175               4.0      Compact              Sedan           38        27   
1176               4.0      Compact      4dr Hatchback           38        27   
1202               4.0      Midsize              Sedan           45        50   
1203               4.0      Midsize              Sedan           45        50   
1204               4.0      Midsize              Sedan           45        50   
1211               4.0      Midsize              Sedan           46        47   
1292               4.0        Large              Sedan           30        23   
...                ...          ...                ...          ...       ...   
11283              4.0      Midsize              Wagon           25        18   
11284              4.0      Midsize              Wagon           26        20   
11285              4.0      Midsize              Wagon           26        19   
11286              4.0      Midsize              Wagon           26        20   
11287              4.0      Midsize              Wagon           26        20   
11448              2.0        Large              Coupe           21        13   
11545              4.0      Compact              Wagon           28        22   
11546              4.0      Compact              Wagon           28        22   
11547              4.0      Compact              Wagon           28        22   
11605              4.0      Midsize              Wagon           26        18   
11606              4.0      Midsize              Wagon           24        17   
11623              4.0      Midsize            4dr SUV           25        16   
11624              4.0      Midsize            4dr SUV           25        16   
11649              4.0      Compact      4dr Hatchback           33        27   
11650              4.0      Compact      4dr Hatchback           33        27   
11751              4.0      Midsize            4dr SUV           20        15   
11752              4.0      Midsize            4dr SUV           22        16   
11753              4.0      Midsize            4dr SUV           20        15   
11754              4.0      Midsize            4dr SUV           20        15   
11755              4.0      Midsize            4dr SUV           20        16   
11756              4.0      Midsize            4dr SUV           22        16   
11757              4.0      Midsize            4dr SUV           20        16   
11798              4.0      Compact            4dr SUV           33        29   
11799              4.0      Compact            4dr SUV           33        29   
11800              4.0      Compact            4dr SUV           33        25   
11801              4.0      Compact            4dr SUV           33        25   
11802              4.0      Compact            4dr SUV           30        23   
11894              2.0      Compact        Convertible           34        22   
11895              2.0      Compact        Convertible           26        19   
11896              2.0      Compact        Convertible           24        17   

       Popularity    MSRP  
120           586   17050  
121           586   15560  
122           586   16210  
123           586   14720  
468          2774  233509  
469          2774  288000  
470          2774  257412  
479          2031   41365  
480          2031   35740  
481          2031   37615  
482          2031   34695  
483          2031   35725  
484          2031   43400  
485          2031   32820  
486          2031   38645  
627           586   20140  
628           586   24670  
629           586   21140  
630           586   22270  
1171         1439   17395  
1172         1439   14895  
1173         1439   15645  
1174         1439   16095  
1175         1439   14645  
1176         1439   16395  
1202         2202   31905  
1203         2202   29155  
1204         2202   34905  
1211         2202   39780  
1292         3916   61400  
...           ...     ...  
11283        2031   31220  
11284        2031   27950  
11285        2031   38120  
11286        2031   31810  
11287        2031   33260  
11448          86  284900  
11545         105   16970  
11546         105   20420  
11547         105   17920  
11605         870   34500  
11606         870   40950  
11623         870   39700  
11624         870   42700  
11649         105   15920  
11650         105   16720  
11751        2009   31370  
11752        2009   25300  
11753        2009   27350  
11754        2009   25440  
11755        2009   26300  
11756        2009   23390  
11757        2009   30320  
11798         640   25995  
11799         640   29295  
11800         640   22995  
11801         640   24495  
11802         640   21995  
11894        3916   48950  
11895        3916   56950  
11896        3916   65800  

[554 rows x 15 columns]

Null values in Engine Fuel Type

# Examine the null values of Engine Fuel Type
df[df['Engine Fuel Type'].isnull()]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
11321 Suzuki Verona 2004 NaN 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 17 481 17199
11322 Suzuki Verona 2004 NaN 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 17 481 20199
11323 Suzuki Verona 2004 NaN 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 17 481 18499
# look at other models with the same model
# Ended up searching the web to get answer. Since the years didn't match
df[df['Model'] == 'Verona']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
11321 Suzuki Verona 2004 NaN 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 17 481 17199
11322 Suzuki Verona 2004 NaN 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 17 481 20199
11323 Suzuki Verona 2004 NaN 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 17 481 18499
11324 Suzuki Verona 2005 regular unleaded 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 18 481 19349
11325 Suzuki Verona 2005 regular unleaded 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 18 481 21049
11326 Suzuki Verona 2005 regular unleaded 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 18 481 17549
11327 Suzuki Verona 2005 regular unleaded 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 18 481 20549
11328 Suzuki Verona 2006 regular unleaded 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 17 481 20299
11329 Suzuki Verona 2006 regular unleaded 155.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 25 17 481 18299
# Couldn't get the for loop too work. 
# Took the long way to solve instead of using so much time trying to figure it out
# 
df.loc[11321,'Engine Fuel Type'] = 'regular unleaded'
df.loc[11322,'Engine Fuel Type'] = 'regular unleaded'
df.loc[11323,'Engine Fuel Type'] = 'regular unleaded'
df['Engine Fuel Type'].isnull().sum()
0

Null values in Number of Doors

# Examine the null values of number of Doors
df[df['Number of Doors'].isnull()]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
4666 Ferrari FF 2013 premium unleaded (required) 651.0 12.0 AUTOMATED_MANUAL all wheel drive NaN Large Coupe 16 11 2774 295000
6930 Tesla Model D 2016 electric 259.0 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 105 102 1391 79500
6931 Tesla Model D 2016 electric 259.0 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 101 98 1391 66000
6932 Tesla Model D 2016 electric 259.0 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 105 92 1391 134500
6933 Tesla Model S 2016 electric 362.0 0.0 DIRECT_DRIVE rear wheel drive NaN Large Sedan 100 97 1391 74500
6934 Tesla Model D 2016 electric 259.0 0.0 DIRECT_DRIVE all wheel drive NaN Large Sedan 107 101 1391 71000
# np.isnan(df['Number of Doors'][6930])
# i will iterate through index 
# j will show value of column 'Number of Doors'
# if statement will replace number of doors 

for i, j in df['Number of Doors'].iteritems():
    if np.isnan(df['Number of Doors'][i]):
#         print (i,j)
        if df['Vehicle Style'][i] == 'Coupe':
            df['Number of Doors'][i] = 2
        elif df['Vehicle Style'][i] == 'Sedan':
            df['Number of Doors'][i] = 4
            
            

        
#     print (i, j)
# if df['Number of Doors'].isnull():
#     df['Vehicle Style'] == 'Coupe'
    
#     else:
#     df['Vehicle Style'] == 'Sedan'
    
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:9: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
/anaconda3/lib/python3.6/site-packages/ipykernel/__main__.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
df['Number of Doors'].isnull().sum()
0
df.isnull().sum()
Make                 0
Model                0
Year                 0
Engine Fuel Type     0
Engine HP            0
Engine Cylinders     0
Transmission Type    0
Driven_Wheels        0
Number of Doors      0
Vehicle Size         0
Vehicle Style        0
highway MPG          0
city mpg             0
Popularity           0
MSRP                 0
dtype: int64
df.head()
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
0 BMW 1 Series M 2011 premium unleaded (required) 335.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 26 19 3916 46135
1 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 19 3916 40650
2 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 20 3916 36350
3 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 18 3916 29450
4 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 18 3916 34500

Examine transmission type Unknown

df[df['Transmission Type'] == 'UNKNOWN']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
1289 Oldsmobile Achieva 1997 regular unleaded 150.0 4.0 UNKNOWN front wheel drive 2.0 Midsize Coupe 29 19 26 2000
1290 Oldsmobile Achieva 1997 regular unleaded 150.0 4.0 UNKNOWN front wheel drive 4.0 Midsize Sedan 29 19 26 2000
4691 Pontiac Firebird 2000 regular unleaded 305.0 8.0 UNKNOWN rear wheel drive 2.0 Midsize 2dr Hatchback 23 15 210 6175
4692 Pontiac Firebird 2000 regular unleaded 305.0 8.0 UNKNOWN rear wheel drive 2.0 Midsize 2dr Hatchback 23 15 210 8548
4693 Pontiac Firebird 2000 regular unleaded 305.0 8.0 UNKNOWN rear wheel drive 2.0 Midsize Convertible 23 15 210 9567
6158 GMC Jimmy 1999 regular unleaded 190.0 6.0 UNKNOWN rear wheel drive 2.0 Compact 2dr SUV 19 14 549 2182
6160 GMC Jimmy 1999 regular unleaded 190.0 6.0 UNKNOWN four wheel drive 2.0 Compact 2dr SUV 19 14 549 2317
6165 GMC Jimmy 2000 regular unleaded 190.0 6.0 UNKNOWN rear wheel drive 2.0 Compact 2dr SUV 20 15 549 2407
6174 GMC Jimmy 2000 regular unleaded 190.0 6.0 UNKNOWN four wheel drive 2.0 Compact 2dr SUV 18 14 549 2578
6366 Chrysler Le Baron 1993 regular unleaded 100.0 4.0 UNKNOWN front wheel drive 2.0 Compact Coupe 26 21 1013 2000
6368 Chrysler Le Baron 1993 regular unleaded 100.0 4.0 UNKNOWN front wheel drive 2.0 Compact Convertible 24 18 1013 2000
8042 Dodge RAM 150 1991 regular unleaded 125.0 6.0 UNKNOWN rear wheel drive 2.0 Large Regular Cab Pickup 17 12 1851 2000
# Look through model firebird to see if I can use data to fill transmission type
df[df['Model'] == 'Firebird']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
4690 Pontiac Firebird 2000 regular unleaded 200.0 6.0 MANUAL rear wheel drive 2.0 Midsize 2dr Hatchback 28 17 210 4677
4691 Pontiac Firebird 2000 regular unleaded 305.0 8.0 UNKNOWN rear wheel drive 2.0 Midsize 2dr Hatchback 23 15 210 6175
4692 Pontiac Firebird 2000 regular unleaded 305.0 8.0 UNKNOWN rear wheel drive 2.0 Midsize 2dr Hatchback 23 15 210 8548
4693 Pontiac Firebird 2000 regular unleaded 305.0 8.0 UNKNOWN rear wheel drive 2.0 Midsize Convertible 23 15 210 9567
4694 Pontiac Firebird 2000 regular unleaded 200.0 6.0 MANUAL rear wheel drive 2.0 Midsize Convertible 28 17 210 5844
4695 Pontiac Firebird 2001 premium unleaded (required) 310.0 8.0 AUTOMATIC rear wheel drive 2.0 Midsize 2dr Hatchback 23 16 210 24035
4696 Pontiac Firebird 2001 regular unleaded 200.0 6.0 MANUAL rear wheel drive 2.0 Midsize Convertible 28 17 210 25475
4697 Pontiac Firebird 2001 premium unleaded (required) 310.0 8.0 AUTOMATIC rear wheel drive 2.0 Midsize Convertible 23 16 210 31215
4698 Pontiac Firebird 2001 regular unleaded 200.0 6.0 MANUAL rear wheel drive 2.0 Midsize 2dr Hatchback 28 17 210 18855
4699 Pontiac Firebird 2001 premium unleaded (required) 310.0 8.0 AUTOMATIC rear wheel drive 2.0 Midsize 2dr Hatchback 23 16 210 27145
4700 Pontiac Firebird 2002 premium unleaded (required) 310.0 8.0 AUTOMATIC rear wheel drive 2.0 Midsize Convertible 23 16 210 32095
4701 Pontiac Firebird 2002 premium unleaded (required) 310.0 8.0 AUTOMATIC rear wheel drive 2.0 Midsize 2dr Hatchback 23 16 210 25995
4702 Pontiac Firebird 2002 premium unleaded (required) 310.0 8.0 AUTOMATIC rear wheel drive 2.0 Midsize 2dr Hatchback 23 16 210 28025
4703 Pontiac Firebird 2002 regular unleaded 200.0 6.0 MANUAL rear wheel drive 2.0 Midsize 2dr Hatchback 29 17 210 20050
4704 Pontiac Firebird 2002 regular unleaded 200.0 6.0 AUTOMATIC rear wheel drive 2.0 Midsize Convertible 28 17 210 26965
df[df['Model'] == 'Achieva']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
1287 Oldsmobile Achieva 1996 regular unleaded 150.0 4.0 MANUAL front wheel drive 4.0 Midsize Sedan 30 20 26 2000
1288 Oldsmobile Achieva 1996 regular unleaded 150.0 4.0 MANUAL front wheel drive 2.0 Midsize Coupe 30 20 26 2000
1289 Oldsmobile Achieva 1997 regular unleaded 150.0 4.0 UNKNOWN front wheel drive 2.0 Midsize Coupe 29 19 26 2000
1290 Oldsmobile Achieva 1997 regular unleaded 150.0 4.0 UNKNOWN front wheel drive 4.0 Midsize Sedan 29 19 26 2000
1291 Oldsmobile Achieva 1998 regular unleaded 150.0 6.0 AUTOMATIC front wheel drive 4.0 Midsize Sedan 27 18 26 2000
df[df['Model'] == 'Jimmy']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
6155 GMC Jimmy 1999 regular unleaded 190.0 6.0 MANUAL four wheel drive 2.0 Compact 2dr SUV 16 13 549 2347
6156 GMC Jimmy 1999 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 19 14 549 2554
6157 GMC Jimmy 1999 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 19 14 549 2590
6158 GMC Jimmy 1999 regular unleaded 190.0 6.0 UNKNOWN rear wheel drive 2.0 Compact 2dr SUV 19 14 549 2182
6159 GMC Jimmy 1999 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 19 14 549 2691
6160 GMC Jimmy 1999 regular unleaded 190.0 6.0 UNKNOWN four wheel drive 2.0 Compact 2dr SUV 19 14 549 2317
6161 GMC Jimmy 1999 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 19 14 549 2368
6162 GMC Jimmy 1999 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 19 14 549 2377
6163 GMC Jimmy 1999 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 19 14 549 2251
6164 GMC Jimmy 1999 regular unleaded 190.0 6.0 MANUAL rear wheel drive 2.0 Compact 2dr SUV 21 15 549 2038
6165 GMC Jimmy 2000 regular unleaded 190.0 6.0 UNKNOWN rear wheel drive 2.0 Compact 2dr SUV 20 15 549 2407
6166 GMC Jimmy 2000 regular unleaded 190.0 6.0 MANUAL four wheel drive 2.0 Compact 2dr SUV 16 13 549 2463
6167 GMC Jimmy 2000 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 18 14 549 2773
6168 GMC Jimmy 2000 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 20 15 549 2756
6169 GMC Jimmy 2000 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 20 15 549 2590
6170 GMC Jimmy 2000 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 18 14 549 2916
6171 GMC Jimmy 2000 regular unleaded 190.0 6.0 MANUAL rear wheel drive 2.0 Compact 2dr SUV 21 15 549 2322
6172 GMC Jimmy 2000 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 20 15 549 2623
6173 GMC Jimmy 2000 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 18 14 549 2655
6174 GMC Jimmy 2000 regular unleaded 190.0 6.0 UNKNOWN four wheel drive 2.0 Compact 2dr SUV 18 14 549 2578
6175 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 20 15 549 26770
6176 GMC Jimmy 2001 regular unleaded 190.0 6.0 MANUAL four wheel drive 2.0 Compact 2dr SUV 16 13 549 22270
6177 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 2.0 Compact 2dr SUV 18 14 549 25170
6178 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 18 14 549 31925
6179 GMC Jimmy 2001 regular unleaded 190.0 6.0 MANUAL rear wheel drive 2.0 Compact 2dr SUV 20 14 549 19270
6180 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 2.0 Compact 2dr SUV 20 15 549 22170
6181 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 18 14 549 30225
6182 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 20 15 549 28225
6183 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 18 14 549 33920
6184 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC four wheel drive 4.0 Midsize 4dr SUV 18 14 549 28770
6185 GMC Jimmy 2001 regular unleaded 190.0 6.0 AUTOMATIC rear wheel drive 4.0 Midsize 4dr SUV 20 15 549 29925
df[df['Model'] == 'Le Baron']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
6364 Chrysler Le Baron 1993 regular unleaded 141.0 6.0 MANUAL front wheel drive 2.0 Compact Coupe 26 17 1013 2000
6365 Chrysler Le Baron 1993 regular unleaded 141.0 6.0 AUTOMATIC front wheel drive 4.0 Compact Sedan 26 18 1013 2000
6366 Chrysler Le Baron 1993 regular unleaded 100.0 4.0 UNKNOWN front wheel drive 2.0 Compact Coupe 26 21 1013 2000
6367 Chrysler Le Baron 1993 regular unleaded 141.0 6.0 MANUAL front wheel drive 2.0 Compact Convertible 24 17 1013 2000
6368 Chrysler Le Baron 1993 regular unleaded 100.0 4.0 UNKNOWN front wheel drive 2.0 Compact Convertible 24 18 1013 2000
6369 Chrysler Le Baron 1993 regular unleaded 141.0 6.0 AUTOMATIC front wheel drive 2.0 Compact Coupe 26 18 1013 2000
6370 Chrysler Le Baron 1993 regular unleaded 100.0 4.0 AUTOMATIC front wheel drive 4.0 Compact Sedan 26 21 1013 2000
6371 Chrysler Le Baron 1993 regular unleaded 141.0 6.0 AUTOMATIC front wheel drive 2.0 Compact Convertible 26 18 1013 2000
6372 Chrysler Le Baron 1994 regular unleaded 141.0 6.0 AUTOMATIC front wheel drive 2.0 Compact Convertible 26 18 1013 2000
6373 Chrysler Le Baron 1994 regular unleaded 142.0 6.0 AUTOMATIC front wheel drive 4.0 Compact Sedan 24 18 1013 2000
6374 Chrysler Le Baron 1994 regular unleaded 142.0 6.0 AUTOMATIC front wheel drive 4.0 Compact Sedan 26 18 1013 2000
6375 Chrysler Le Baron 1995 regular unleaded 141.0 6.0 AUTOMATIC front wheel drive 2.0 Compact Convertible 26 18 1013 2000
df[df['Model'] == 'RAM 150']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
8042 Dodge RAM 150 1991 regular unleaded 125.0 6.0 UNKNOWN rear wheel drive 2.0 Large Regular Cab Pickup 17 12 1851 2000
8044 Dodge RAM 150 1991 regular unleaded 170.0 8.0 MANUAL four wheel drive 2.0 Large Extended Cab Pickup 13 10 1851 2000
8045 Dodge RAM 150 1991 regular unleaded 170.0 8.0 MANUAL rear wheel drive 2.0 Large Extended Cab Pickup 14 11 1851 2000
8054 Dodge RAM 150 1992 regular unleaded 180.0 6.0 MANUAL four wheel drive 2.0 Large Regular Cab Pickup 16 11 1851 2000
8055 Dodge RAM 150 1992 regular unleaded 230.0 8.0 MANUAL four wheel drive 2.0 Large Extended Cab Pickup 15 12 1851 2000
8056 Dodge RAM 150 1992 regular unleaded 180.0 6.0 MANUAL rear wheel drive 2.0 Large Regular Cab Pickup 17 14 1851 2000
8058 Dodge RAM 150 1992 regular unleaded 230.0 8.0 MANUAL rear wheel drive 2.0 Large Extended Cab Pickup 16 11 1851 2000
8068 Dodge RAM 150 1993 regular unleaded 180.0 6.0 MANUAL four wheel drive 2.0 Large Regular Cab Pickup 16 11 1851 2000
8071 Dodge RAM 150 1993 regular unleaded 230.0 8.0 MANUAL rear wheel drive 2.0 Large Extended Cab Pickup 16 12 1851 2000
8072 Dodge RAM 150 1993 regular unleaded 180.0 6.0 MANUAL rear wheel drive 2.0 Large Regular Cab Pickup 17 14 1851 2000
8077 Dodge RAM 150 1993 regular unleaded 230.0 8.0 MANUAL four wheel drive 2.0 Large Extended Cab Pickup 15 12 1851 2008
8078 Dodge RAM 150 1993 regular unleaded 230.0 8.0 MANUAL four wheel drive 2.0 Large Extended Cab Pickup 15 12 1851 2083
df.loc[1289,'Transmission Type'] = 'MANUAL'
df.loc[1290,'Transmission Type'] = 'MANUAL'
df.loc[4691,'Transmission Type'] = 'MANUAL'
df.loc[4692,'Transmission Type'] = 'MANUAL'
df.loc[4693,'Transmission Type'] = 'MANUAL'
df.loc[6158,'Transmission Type'] = 'AUTOMATIC'
df.loc[6160,'Transmission Type'] = 'AUTOMATIC'
df.loc[6165,'Transmission Type'] = 'MANUAL'
df.loc[6174,'Transmission Type'] = 'AUTOMATIC'
df.loc[6366,'Transmission Type'] = 'AUTOMATIC'
df.loc[6368,'Transmission Type'] = 'AUTOMATIC'
df.loc[8042,'Transmission Type'] = 'MANUAL'
df[df['Transmission Type'] == 'UNKNOWN']
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP

Visuals of clean data

df.head(10)
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP
0 BMW 1 Series M 2011 premium unleaded (required) 335.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 26 19 3916 46135
1 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 19 3916 40650
2 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 20 3916 36350
3 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 18 3916 29450
4 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 18 3916 34500
5 BMW 1 Series 2012 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 18 3916 31200
6 BMW 1 Series 2012 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 26 17 3916 44100
7 BMW 1 Series 2012 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 20 3916 39300
8 BMW 1 Series 2012 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 18 3916 36900
9 BMW 1 Series 2013 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 27 18 3916 37200
df.corr()
Year Engine HP Engine Cylinders Number of Doors highway MPG city mpg Popularity MSRP
Year 1.000000 0.334092 -0.033038 0.247648 0.244972 0.188417 0.085874 0.209635
Engine HP 0.334092 1.000000 0.771169 -0.129639 -0.374234 -0.373267 0.039185 0.658245
Engine Cylinders -0.033038 0.771169 1.000000 -0.152048 -0.610338 -0.585333 0.043010 0.533431
Number of Doors 0.247648 -0.129639 -0.152048 1.000000 0.115311 0.121194 -0.057379 -0.145179
highway MPG 0.244972 -0.374234 -0.610338 0.115311 1.000000 0.886299 -0.017159 -0.166631
city mpg 0.188417 -0.373267 -0.585333 0.121194 0.886299 1.000000 -0.000549 -0.162343
Popularity 0.085874 0.039185 0.043010 -0.057379 -0.017159 -0.000549 1.000000 -0.048371
MSRP 0.209635 0.658245 0.533431 -0.145179 -0.166631 -0.162343 -0.048371 1.000000
# Can see that Engine HP, Engine cylinders, and popularity have strongest correlation with price 
# Make the figsize 7 x 6
plt.figure(figsize=(7,6))

# Plot heatmap of correlations
#sns.heatmap(correlations)
sns.heatmap(df.corr(), annot = True)
<matplotlib.axes._subplots.AxesSubplot at 0x1a13def320>

png

EC = df['Engine Cylinders'].value_counts()
EC.plot.barh()
plt.xlabel('Count')
plt.ylabel('Engine Cylinders')
Text(0,0.5,'Engine Cylinders')

png

sns.set_style('whitegrid')
df['Popularity'].hist(bins=30)
plt.xlabel('Popularity')
plt.ylabel('Count')
Text(0,0.5,'Count')

png

# Create a jointplot showing MSRP versus Popularity.
sns.jointplot(x='Popularity',y='MSRP',data=df)
<seaborn.axisgrid.JointGrid at 0x1a13f45da0>

png

# plot showing the relationship between the independent
# and dependent variables.

sns.lmplot(x='Engine HP', y='MSRP', data=df)
plt.show()
sns.lmplot(x='Engine Cylinders', y='MSRP', data=df)
plt.show()
sns.lmplot(x='Popularity', y='MSRP', data=df)
plt.show()

png

png

png

# Create a jointplot showing MSRP versus engine cylinders.
sns.jointplot(x='Engine Cylinders',y='MSRP',data=df)
<seaborn.axisgrid.JointGrid at 0x1a11bc6c88>

png

# Create a jointplot showing MSRP versus Engine HP.
sns.jointplot(x='Engine HP',y='MSRP',data=df)
<seaborn.axisgrid.JointGrid at 0x1a136ceb70>

png

sns.set_style('whitegrid')
df['Engine HP'].hist(bins=30)
plt.xlabel('Engine HP')
Text(0.5,0,'Engine HP')

png

sns.set_style('whitegrid')
df['Engine HP'].hist(bins=30)
plt.xlabel('Engine HP')
Text(0.5,0,'Engine HP')

png

Create Engine HP squared column

Seeing if Engine HP squared would perform better fit in model

df['Engine HP^2'] = (df['Engine HP'] * df['Engine HP']).astype(int)
df.head()
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP Engine HP^2
0 BMW 1 Series M 2011 premium unleaded (required) 335.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 26 19 3916 46135 112225
1 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 19 3916 40650 90000
2 BMW 1 Series 2011 premium unleaded (required) 300.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 20 3916 36350 90000
3 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Coupe 28 18 3916 29450 52900
4 BMW 1 Series 2011 premium unleaded (required) 230.0 6.0 MANUAL rear wheel drive 2.0 Compact Convertible 28 18 3916 34500 52900
# Create a jointplot showing MSRP versus Engine HP.
sns.jointplot(x='Engine HP^2',y='MSRP',data=df)
<seaborn.axisgrid.JointGrid at 0x1a13e31128>

png

sns.set_style('whitegrid')
df['Engine HP^2'].hist(bins=30)
plt.xlabel('Engine HP^2')
Text(0.5,0,'Engine HP^2')

png

sns.lmplot(x='Engine HP^2', y='MSRP', data=df)
plt.show()

png

Identifying outliers

# outliers are cars such as the Bugatti which have 16 cylinders and 0ver a thousand HP
# which will have higher MSRP
df[df['Engine HP'] >= 1000]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP Engine HP^2
11362 Bugatti Veyron 16.4 2008 premium unleaded (required) 1001.0 16.0 AUTOMATED_MANUAL all wheel drive 2.0 Compact Coupe 14 8 820 2065902 1002001
11363 Bugatti Veyron 16.4 2008 premium unleaded (required) 1001.0 16.0 AUTOMATED_MANUAL all wheel drive 2.0 Compact Coupe 14 8 820 1500000 1002001
11364 Bugatti Veyron 16.4 2009 premium unleaded (required) 1001.0 16.0 AUTOMATED_MANUAL all wheel drive 2.0 Compact Coupe 14 8 820 1705769 1002001
df[df['MSRP'] >= 150000]
Make Model Year Engine Fuel Type Engine HP Engine Cylinders Transmission Type Driven_Wheels Number of Doors Vehicle Size Vehicle Style highway MPG city mpg Popularity MSRP Engine HP^2
294 Ferrari 360 2002 premium unleaded (required) 400.0 8.0 MANUAL rear wheel drive 2.0 Compact Convertible 15 10 2774 160829 160000
296 Ferrari 360 2002 premium unleaded (required) 400.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 15 10 2774 150694 160000
297 Ferrari 360 2002 premium unleaded (required) 400.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 15 10 2774 170829 160000
298 Ferrari 360 2003 premium unleaded (required) 400.0 8.0 MANUAL rear wheel drive 2.0 Compact Convertible 15 10 2774 165986 160000
299 Ferrari 360 2003 premium unleaded (required) 400.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 15 10 2774 154090 160000
301 Ferrari 360 2003 premium unleaded (required) 400.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 15 10 2774 176287 160000
302 Ferrari 360 2004 premium unleaded (required) 400.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 15 10 2774 157767 160000
303 Ferrari 360 2004 premium unleaded (required) 425.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 15 10 2774 187124 180625
305 Ferrari 360 2004 premium unleaded (required) 400.0 8.0 MANUAL rear wheel drive 2.0 Compact Convertible 15 10 2774 169900 160000
306 Ferrari 360 2004 premium unleaded (required) 400.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 15 10 2774 180408 160000
460 Ferrari 456M 2001 premium unleaded (required) 442.0 12.0 AUTOMATIC rear wheel drive 2.0 Compact Coupe 14 9 2774 223970 195364
461 Ferrari 456M 2001 premium unleaded (required) 442.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 15 9 2774 219775 195364
462 Ferrari 456M 2002 premium unleaded (required) 442.0 12.0 AUTOMATIC rear wheel drive 2.0 Compact Coupe 14 9 2774 228625 195364
463 Ferrari 456M 2002 premium unleaded (required) 442.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 15 9 2774 224585 195364
464 Ferrari 456M 2003 premium unleaded (required) 442.0 12.0 AUTOMATIC rear wheel drive 2.0 Compact Coupe 14 9 2774 228625 195364
465 Ferrari 456M 2003 premium unleaded (required) 442.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 15 9 2774 224585 195364
466 Ferrari 458 Italia 2013 premium unleaded (required) 562.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 17 13 2774 257412 315844
467 Ferrari 458 Italia 2013 premium unleaded (required) 562.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 17 13 2774 233509 315844
468 Ferrari 458 Italia 2014 premium unleaded (required) 562.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 17 13 2774 233509 315844
469 Ferrari 458 Italia 2014 premium unleaded (required) 597.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 17 13 2774 288000 356409
470 Ferrari 458 Italia 2014 premium unleaded (required) 562.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 17 13 2774 257412 315844
471 Ferrari 458 Italia 2015 premium unleaded (required) 562.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 17 13 2774 239340 315844
472 Ferrari 458 Italia 2015 premium unleaded (required) 562.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 17 13 2774 263553 315844
473 Ferrari 458 Italia 2015 premium unleaded (required) 597.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 17 13 2774 291744 356409
598 Ferrari 550 2001 premium unleaded (required) 485.0 12.0 MANUAL rear wheel drive 2.0 Compact Convertible 12 8 2774 248500 235225
599 Ferrari 550 2001 premium unleaded (required) 485.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 12 8 2774 205840 235225
604 McLaren 570S 2016 premium unleaded (required) 562.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 23 16 416 184900 315844
605 Ferrari 575M 2002 premium unleaded (required) 515.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 15 9 2774 214670 265225
606 Ferrari 575M 2002 premium unleaded (required) 515.0 12.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 16 9 2774 224670 265225
607 Ferrari 575M 2003 premium unleaded (required) 515.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 15 9 2774 217890 265225
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
11092 Aston Martin V12 Vanquish 2004 premium unleaded (required) 460.0 12.0 AUTOMATIC rear wheel drive 2.0 Compact Coupe 18 11 259 234260 211600
11093 Aston Martin V12 Vanquish 2005 premium unleaded (required) 460.0 12.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 16 10 259 234260 211600
11094 Aston Martin V12 Vanquish 2005 premium unleaded (required) 520.0 12.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 16 10 259 255000 270400
11095 Aston Martin V12 Vanquish 2006 premium unleaded (required) 520.0 12.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 16 10 259 260000 270400
11096 Aston Martin V12 Vantage S 2015 premium unleaded (required) 565.0 12.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 18 12 259 182395 319225
11097 Aston Martin V12 Vantage S 2016 premium unleaded (required) 565.0 12.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 18 12 259 198195 319225
11098 Aston Martin V12 Vantage S 2016 premium unleaded (required) 565.0 12.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Coupe 18 12 259 183695 319225
11099 Aston Martin V12 Vantage 2011 premium unleaded (required) 510.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 17 11 259 191995 260100
11100 Aston Martin V12 Vantage 2011 premium unleaded (required) 510.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 17 11 259 180535 260100
11101 Aston Martin V12 Vantage 2012 premium unleaded (required) 510.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 17 11 259 180535 260100
11102 Aston Martin V12 Vantage 2012 premium unleaded (required) 510.0 12.0 MANUAL rear wheel drive 2.0 Compact Coupe 17 11 259 195895 260100
11153 Aston Martin V8 Vantage 2014 premium unleaded (required) 430.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 21 14 259 150900 184900
11159 Aston Martin V8 Vantage 2015 premium unleaded (required) 430.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 21 14 259 153195 184900
11173 Aston Martin V8 Vantage 2016 premium unleaded (required) 430.0 8.0 AUTOMATED_MANUAL rear wheel drive 2.0 Compact Convertible 21 14 259 154495 184900
11206 Aston Martin Vanquish 2014 premium unleaded (required) 565.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Convertible 19 13 259 296295 319225
11207 Aston Martin Vanquish 2014 premium unleaded (required) 565.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Coupe 19 13 259 278295 319225
11208 Aston Martin Vanquish 2015 premium unleaded (required) 568.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Convertible 21 13 259 301695 322624
11209 Aston Martin Vanquish 2015 premium unleaded (required) 568.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Coupe 21 13 259 283695 322624
11210 Aston Martin Vanquish 2016 premium unleaded (required) 568.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Coupe 21 13 259 287650 322624
11211 Aston Martin Vanquish 2016 premium unleaded (required) 568.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Convertible 21 13 259 305650 322624
11212 Aston Martin Vanquish 2016 premium unleaded (required) 568.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Coupe 21 13 259 302695 322624
11213 Aston Martin Vanquish 2016 premium unleaded (required) 568.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Convertible 21 13 259 320695 322624
11362 Bugatti Veyron 16.4 2008 premium unleaded (required) 1001.0 16.0 AUTOMATED_MANUAL all wheel drive 2.0 Compact Coupe 14 8 820 2065902 1002001
11363 Bugatti Veyron 16.4 2008 premium unleaded (required) 1001.0 16.0 AUTOMATED_MANUAL all wheel drive 2.0 Compact Coupe 14 8 820 1500000 1002001
11364 Bugatti Veyron 16.4 2009 premium unleaded (required) 1001.0 16.0 AUTOMATED_MANUAL all wheel drive 2.0 Compact Coupe 14 8 820 1705769 1002001
11394 Aston Martin Virage 2012 premium unleaded (required) 490.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Coupe 18 13 259 208295 240100
11395 Aston Martin Virage 2012 premium unleaded (required) 490.0 12.0 AUTOMATIC rear wheel drive 2.0 Midsize Convertible 18 13 259 223295 240100
11448 Rolls-Royce Wraith 2014 premium unleaded (required) 624.0 12.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 21 13 86 284900 389376
11449 Rolls-Royce Wraith 2015 premium unleaded (required) 624.0 12.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 21 13 86 294025 389376
11450 Rolls-Royce Wraith 2016 premium unleaded (required) 624.0 12.0 AUTOMATIC rear wheel drive 2.0 Large Coupe 21 13 86 304350 389376

408 rows × 16 columns

Save data

# Save undummy data
df1 = df.to_csv('carnotdummied.csv')

Dummies for categorical columns

df = pd.get_dummies(df, columns=['Make','Model', 'Engine Fuel Type', 'Transmission Type', 'Driven_Wheels',
                            'Vehicle Size', 'Vehicle Style'])
df.head()
Year Engine HP Engine Cylinders Number of Doors highway MPG city mpg Popularity MSRP Engine HP^2 Make_Acura Make_Alfa Romeo Make_Aston Martin Make_Audi Make_BMW Make_Bentley Make_Bugatti Make_Buick Make_Cadillac Make_Chevrolet Make_Chrysler Make_Dodge Make_FIAT Make_Ferrari Make_Ford Make_GMC Make_Genesis Make_HUMMER Make_Honda Make_Hyundai Make_Infiniti Make_Kia Make_Lamborghini Make_Land Rover Make_Lexus Make_Lincoln Make_Lotus Make_Maserati Make_Maybach Make_Mazda Make_McLaren Make_Mercedes-Benz Make_Mitsubishi Make_Nissan Make_Oldsmobile Make_Plymouth Make_Pontiac Make_Porsche Make_Rolls-Royce Make_Saab Make_Scion ... Model_Zephyr Model_allroad Model_allroad quattro Model_e-Golf Model_i-MiEV Model_i3 Model_iA Model_iM Model_iQ Model_tC Model_xA Model_xB Model_xD Engine Fuel Type_diesel Engine Fuel Type_electric Engine Fuel Type_flex-fuel (premium unleaded recommended/E85) Engine Fuel Type_flex-fuel (premium unleaded required/E85) Engine Fuel Type_flex-fuel (unleaded/E85) Engine Fuel Type_flex-fuel (unleaded/natural gas) Engine Fuel Type_natural gas Engine Fuel Type_premium unleaded (recommended) Engine Fuel Type_premium unleaded (required) Engine Fuel Type_regular unleaded Transmission Type_AUTOMATED_MANUAL Transmission Type_AUTOMATIC Transmission Type_DIRECT_DRIVE Transmission Type_MANUAL Driven_Wheels_all wheel drive Driven_Wheels_four wheel drive Driven_Wheels_front wheel drive Driven_Wheels_rear wheel drive Vehicle Size_Compact Vehicle Size_Large Vehicle Size_Midsize Vehicle Style_2dr Hatchback Vehicle Style_2dr SUV Vehicle Style_4dr Hatchback Vehicle Style_4dr SUV Vehicle Style_Cargo Minivan Vehicle Style_Cargo Van Vehicle Style_Convertible Vehicle Style_Convertible SUV Vehicle Style_Coupe Vehicle Style_Crew Cab Pickup Vehicle Style_Extended Cab Pickup Vehicle Style_Passenger Minivan Vehicle Style_Passenger Van Vehicle Style_Regular Cab Pickup Vehicle Style_Sedan Vehicle Style_Wagon
0 2011 335.0 6.0 2.0 26 19 3916 46135 112225 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
1 2011 300.0 6.0 2.0 28 19 3916 40650 90000 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
2 2011 300.0 6.0 2.0 28 20 3916 36350 90000 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
3 2011 230.0 6.0 2.0 28 18 3916 29450 52900 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
4 2011 230.0 6.0 2.0 28 18 3916 34500 52900 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0

5 rows × 1014 columns

df.to_csv('cardummied.csv')

Train test spit

# Create separate object for target variable
y = df.MSRP

# Create separate object for input features
X = df.drop('MSRP', axis=1)
# Split X and y into train and test sets
X_train, X_test, y_train, y_test = train_test_split(X, y, 
                                                    test_size=0.2, # set aside 20% of observations for the test set.
                                                    random_state=1234)
# verify test and train set shape 
X_test.shape,y_train.shape
((2240, 1013), (8959,))
# Print number of observations in X_train, X_test, y_train, and y_test
print(len(X_train), len(X_test), len(y_train), len(y_test))
8959 2240 8959 2240
X_cols = df.drop('MSRP', axis=1).columns
# MSE - the average absolute difference between predicted and actual values for our target variable.
# R2 - The percentt of the variation in the target variable that can be explained by the model

Pipeline with Random Forest Model

#initialize randomforest and selectKbest
selector = SelectKBest(f_regression)  # select k best
clf = RandomForestRegressor() # Model I want to use 

#place SelectKbest transformer and RandomForest estimator into Pipeine
pipe = Pipeline(steps=[
#     ('poly', PolynomialFeatures()), # Did not need because I created dummies for categorial columns which made to many columns 
    ('selector', selector),  # feature selection
    ('clf', clf) # Model
])

#Create the parameter grid, entering the values to use for each parameter selected in the RandomForest estimator
parameters = {
    'selector__k':[50,100], # params to search through
#     'poly__degree': [2],
    'clf__n_estimators':[20, 100,150], # Start, stop, number of trees
    'clf__min_samples_split': [5], # max number of samples required to split an internal node:
    'clf__max_features': ['auto'], # max number of features considered for splitting a node
    'clf__max_depth': [ 3, 5, 7] # max number of splits per tree
} 


#Perform grid search on the classifier using 'scorer' as the scoring method using GridSearchCV()
g_search = GridSearchCV(pipe, parameters, cv=3, n_jobs=1, verbose=2)

#Fit the grid search object to the training data and find the optimal parameters using fit()
g_fit = g_search.fit(X_train, y_train)

#Get the best estimator and print out the estimator model
best_clf = g_fit.best_estimator_
print (best_clf)

#Use best estimator to make predictions on the test set
best_predictions = best_clf.predict(X_test)


#metrics
#print(mean_absolute_error(y_true = y_test, y_pred = best_predictions))
#print(r2_score(y_true = y_test, y_pred = best_predictions))


print("MAE: " + str(mean_absolute_error(y_true = y_test, y_pred = best_predictions)))
print("R2 Score: " + str(r2_score(y_true = y_test, y_pred = best_predictions)))
Fitting 3 folds for each of 18 candidates, totalling 54 fits
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)
[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    0.3s remaining:    0.0s


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.2s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.2s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   0.7s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   0.6s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   0.6s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   0.8s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   0.7s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   0.8s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   0.8s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   0.9s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   0.8s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   1.1s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   1.1s
[CV] clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=3, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   1.1s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.2s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.2s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.2s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   0.9s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   1.1s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   1.0s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   1.1s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   1.2s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   1.1s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   1.2s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   1.5s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   1.4s
[CV] clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=5, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   1.5s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.4s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=20, selector__k=100, total=   0.4s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   1.1s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   1.2s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=50, total=   1.1s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   1.6s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   1.4s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=100, selector__k=100, total=   1.3s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   1.4s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   1.4s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=50, total=   1.4s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   2.2s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   2.1s
[CV] clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__max_depth=7, clf__max_features=auto, clf__min_samples_split=5, clf__n_estimators=150, selector__k=100, total=   2.1s


[Parallel(n_jobs=1)]: Done  54 out of  54 | elapsed:   49.7s finished
/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


Pipeline(memory=None,
     steps=[('selector', SelectKBest(k=100, score_func=<function f_regression at 0x109eeb950>)), ('clf', RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=7,
           max_features='auto', max_leaf_nodes=None,
           min_impurity_decrease=0.0, min_impurity_split=None,
           min_samples_leaf=1, min_samples_split=5,
           min_weight_fraction_leaf=0.0, n_estimators=150, n_jobs=1,
           oob_score=False, random_state=None, verbose=0, warm_start=False))])
MAE: 6898.5361470355265
R2 Score: 0.9249219699040897
rf_pred = g_search.predict(X_test)
plt.scatter(rf_pred, y_test)
plt.plot(y_test, y_test)
plt.xlabel('predicted')
plt.ylabel('actual')
plt.show()

png

Pipeline with Gradient Boost

#initialize gradient boosting and selectKbest
selector = SelectKBest(f_regression)  # select k best
clf = GradientBoostingRegressor() # Model I want to use 

#place SelectKbest transformer and RandomForest estimator into Pipeine
pipe = Pipeline(steps=[
    ('Scale',StandardScaler()),
    #('poly', PolynomialFeatures()),
    ('selector', selector), 
    ('clf', clf)
])

#Create the parameter grid, entering the values to use for each parameter selected in the RandomForest estimator
parameters = {
    'selector__k':[50,100], # params to search through
    #'poly__degree': [2], 
    'clf__n_estimators': [20, 100], # num of boosting stages to perform. larger number usually better performance
    'clf__learning_rate':[0.05, 0.1, 0.2], # shrinks the contibution of each tree. trade off between n_estimators and learning rate
    'clf__max_depth': [1, 3, 5] # max depth of the individual regression estimators
}

#Perform grid search on the classifier using 'scorer' as the scoring method using GridSearchCV()
g_search = GridSearchCV(pipe, parameters, cv=3, n_jobs=1, verbose=2)

#Fit the grid search object to the training data and find the optimal parameters using fit()
g_fit = g_search.fit(X_train, y_train)

#Get the best estimator and print out the estimator model
best_clf = g_fit.best_estimator_
print (best_clf)

#Use best estimator to make predictions on the test set
best_predictions = best_clf.predict(X_test)


#metrics
#print(mean_absolute_error(y_true = y_test, y_pred = best_predictions))
#print(r2_score(y_true = y_test, y_pred = best_predictions))

print("MAE: " + str(mean_absolute_error(y_true = y_test, y_pred = best_predictions)))
print("R2 Score: " + str(r2_score(y_true = y_test, y_pred = best_predictions)))
Fitting 3 folds for each of 36 candidates, totalling 108 fits
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    0.5s remaining:    0.0s
/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.6s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.7s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.6s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.5s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.9s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.9s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.6s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.5s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.2s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.5s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.7s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.6s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   0.7s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   0.7s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   0.7s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.9s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.4s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.4s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.5s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.5s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.7s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.5s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.3s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.3s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.6s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   0.8s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   0.7s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   0.7s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.4s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.3s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.5s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.5s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.1s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.2s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=50, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.4s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=100, total=   0.4s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.5s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.5s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=50, total=   0.5s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.7s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.6s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=100, total=   0.6s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=50, total=   0.4s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=100, total=   0.5s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=50, total=   0.8s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.2s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.4s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=100, total=   1.2s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.6s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.6s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=50, total=   0.8s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   1.0s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   0.7s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=100, total=   0.9s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.7s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.4s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=50, total=   1.4s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.2s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.1s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=100 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=100, total=   2.4s


[Parallel(n_jobs=1)]: Done 108 out of 108 | elapsed:  1.7min finished
/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


Pipeline(memory=None,
     steps=[('Scale', StandardScaler(copy=True, with_mean=True, with_std=True)), ('selector', SelectKBest(k=50, score_func=<function f_regression at 0x109eeb950>)), ('clf', GradientBoostingRegressor(alpha=0.9, criterion='friedman_mse', init=None,
             learning_rate=0.2, loss='ls', max_depth=5, ma...s=100, presort='auto', random_state=None,
             subsample=1.0, verbose=0, warm_start=False))])
MAE: 4569.530409739521
R2 Score: 0.9531386762746651
len(best_clf.steps[1][1].get_support())
1013
feature = list(X_cols[best_clf.steps[1][1].get_support()])
X_cols = df.drop('MSRP', axis=1).columns
feature_import = best_clf.steps[2][1].feature_importances_
dict(zip(feature,feature_import))
{'Driven_Wheels_all wheel drive': 0.010180044520391722,
 'Driven_Wheels_front wheel drive': 0.0030040474201914486,
 'Driven_Wheels_rear wheel drive': 0.006939920130830467,
 'Engine Cylinders': 0.056492723143649226,
 'Engine Fuel Type_flex-fuel (premium unleaded required/E85)': 0.004622118920666116,
 'Engine Fuel Type_premium unleaded (required)': 0.02054458099422069,
 'Engine Fuel Type_regular unleaded': 0.009821706110858336,
 'Engine HP': 0.16784824407025872,
 'Engine HP^2': 0.19046619308817184,
 'Make_Aston Martin': 0.005356143350255724,
 'Make_Bentley': 0.012146657996343466,
 'Make_Bugatti': 0.0007619216530423492,
 'Make_Ferrari': 0.008570128324786444,
 'Make_Lamborghini': 0.004904571887663365,
 'Make_Maybach': 0.004338514012278021,
 'Make_Porsche': 0.008641787530394593,
 'Make_Rolls-Royce': 0.014741114807662128,
 'Model_458 Italia': 0.005405439308733585,
 'Model_57': 0.0018458020543991557,
 'Model_62': 0.005726411807380986,
 'Model_911': 0.0028952290716332068,
 'Model_Arnage': 0.0013392577032392242,
 'Model_Aventador': 0.0018176714628395,
 'Model_Carrera GT': 5.697533669976291e-06,
 'Model_Continental GT': 0.0004635586330599047,
 'Model_DBS': 0.010426194135688379,
 'Model_Enzo': 0.0009188950381704875,
 'Model_F430': 0.0006565191018580336,
 'Model_Gallardo': 0.0006422988939341604,
 'Model_Ghost': 0.0007490001611653036,
 'Model_Ghost Series II': 1.4323460133123379e-05,
 'Model_Landaulet': 0.006437036957277748,
 'Model_Murcielago': 0.0024864400711675848,
 'Model_Phantom': 0.0005154999674636062,
 'Model_Phantom Coupe': 1.0202661652350821e-06,
 'Model_Phantom Drophead Coupe': 6.784444922574109e-05,
 'Model_R8': 0.0014865141821076694,
 'Model_Reventon': 0.007777224543114406,
 'Model_SLR McLaren': 0.00503380396179973,
 'Model_Vanquish': 0.008172928102421984,
 'Model_Veyron 16.4': 0.0014414448847538625,
 'Number of Doors': 0.013405820394224634,
 'Transmission Type_AUTOMATED_MANUAL': 0.02306096094915099,
 'Transmission Type_MANUAL': 0.026773955122458785,
 'Vehicle Size_Large': 0.040271703766337305,
 'Vehicle Style_Convertible': 0.012202993884355669,
 'Vehicle Style_Coupe': 0.014985916031109263,
 'Year': 0.0644912715023895,
 'city mpg': 0.10877401504437749,
 'highway MPG': 0.1003268895925291}
pd.DataFrame(feature_import, 
             index=feature).sort_values(0, 
                          ascending = False).plot.barh()
<matplotlib.axes._subplots.AxesSubplot at 0x1a160acda0>

png

pd.DataFrame(feature_import, 
             index=feature).sort_values(0, 
                          ascending = False)
0
Engine HP^2 0.190466
Engine HP 0.167848
city mpg 0.108774
highway MPG 0.100327
Year 0.064491
Engine Cylinders 0.056493
Vehicle Size_Large 0.040272
Transmission Type_MANUAL 0.026774
Transmission Type_AUTOMATED_MANUAL 0.023061
Engine Fuel Type_premium unleaded (required) 0.020545
Vehicle Style_Coupe 0.014986
Make_Rolls-Royce 0.014741
Number of Doors 0.013406
Vehicle Style_Convertible 0.012203
Make_Bentley 0.012147
Model_DBS 0.010426
Driven_Wheels_all wheel drive 0.010180
Engine Fuel Type_regular unleaded 0.009822
Make_Porsche 0.008642
Make_Ferrari 0.008570
Model_Vanquish 0.008173
Model_Reventon 0.007777
Driven_Wheels_rear wheel drive 0.006940
Model_Landaulet 0.006437
Model_62 0.005726
Model_458 Italia 0.005405
Make_Aston Martin 0.005356
Model_SLR McLaren 0.005034
Make_Lamborghini 0.004905
Engine Fuel Type_flex-fuel (premium unleaded required/E85) 0.004622
Make_Maybach 0.004339
Driven_Wheels_front wheel drive 0.003004
Model_911 0.002895
Model_Murcielago 0.002486
Model_57 0.001846
Model_Aventador 0.001818
Model_R8 0.001487
Model_Veyron 16.4 0.001441
Model_Arnage 0.001339
Model_Enzo 0.000919
Make_Bugatti 0.000762
Model_Ghost 0.000749
Model_F430 0.000657
Model_Gallardo 0.000642
Model_Phantom 0.000515
Model_Continental GT 0.000464
Model_Phantom Drophead Coupe 0.000068
Model_Ghost Series II 0.000014
Model_Carrera GT 0.000006
Model_Phantom Coupe 0.000001
gb_pred = g_search.predict(X_test)
plt.scatter(gb_pred, y_test)
plt.plot(y_test, y_test)
plt.xlabel('predicted')
plt.ylabel('actual')
plt.show()

png

Pipeline with Kneighbors

#initialize k-neighbors and selectKbest
selector = SelectKBest(f_regression)  # select k best
clf = KNeighborsRegressor()

#place SelectKbest transformer and RandomForest estimator into Pipeine
pipe = Pipeline(steps=[
    ('Scale',StandardScaler()),
   # ('poly', PolynomialFeatures()),
    ('selector', selector), 
    ('clf', clf)
])

#Create the parameter grid, entering the values to use for each parameter selected in the RandomForest estimator
parameters = {
    'selector__k':[50], # params to search through
    #'poly__degree': [2], 
    'clf__n_neighbors':[3,5,7], # number of neighbors to use 
    'clf__weights': ['uniform'], # weight function used in prediction 
    'clf__algorithm':['auto']}  # Algorithm used to compute the nearest neighbors 

#Perform grid search on the classifier using 'scorer' as the scoring method using GridSearchCV()
g_search = GridSearchCV(pipe, parameters, cv=3, n_jobs=1, verbose=2)

#Fit the grid search object to the training data and find the optimal parameters using fit()
g_fit = g_search.fit(X_train, y_train)

#Get the best estimator and print out the estimator model
best_clf = g_fit.best_estimator_
print (best_clf)

#Use best estimator to make predictions on the test set
best_predictions = best_clf.predict(X_test)

#metrics
#print(mean_absolute_error(y_true = y_test, y_pred = best_predictions))
#print(r2_score(y_true = y_test, y_pred = best_predictions))

print("MAE: " + str(mean_absolute_error(y_true = y_test, y_pred = best_predictions)))
print("R2 Score: " + str(r2_score(y_true = y_test, y_pred = best_predictions)))

Fitting 3 folds for each of 3 candidates, totalling 9 fits
[CV] clf__algorithm=auto, clf__n_neighbors=3, clf__weights=uniform, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=3, clf__weights=uniform, selector__k=50, total=   1.5s
[CV] clf__algorithm=auto, clf__n_neighbors=3, clf__weights=uniform, selector__k=50 


[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    3.8s remaining:    0.0s
/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=3, clf__weights=uniform, selector__k=50, total=   1.5s
[CV] clf__algorithm=auto, clf__n_neighbors=3, clf__weights=uniform, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=3, clf__weights=uniform, selector__k=50, total=   1.6s
[CV] clf__algorithm=auto, clf__n_neighbors=5, clf__weights=uniform, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=5, clf__weights=uniform, selector__k=50, total=   1.8s
[CV] clf__algorithm=auto, clf__n_neighbors=5, clf__weights=uniform, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=5, clf__weights=uniform, selector__k=50, total=   1.9s
[CV] clf__algorithm=auto, clf__n_neighbors=5, clf__weights=uniform, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=5, clf__weights=uniform, selector__k=50, total=   1.7s
[CV] clf__algorithm=auto, clf__n_neighbors=7, clf__weights=uniform, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=7, clf__weights=uniform, selector__k=50, total=   1.7s
[CV] clf__algorithm=auto, clf__n_neighbors=7, clf__weights=uniform, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=7, clf__weights=uniform, selector__k=50, total=   1.8s
[CV] clf__algorithm=auto, clf__n_neighbors=7, clf__weights=uniform, selector__k=50 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__algorithm=auto, clf__n_neighbors=7, clf__weights=uniform, selector__k=50, total=   1.6s


[Parallel(n_jobs=1)]: Done   9 out of   9 | elapsed:   38.2s finished
/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


Pipeline(memory=None,
     steps=[('Scale', StandardScaler(copy=True, with_mean=True, with_std=True)), ('selector', SelectKBest(k=50, score_func=<function f_regression at 0x109eeb950>)), ('clf', KNeighborsRegressor(algorithm='auto', leaf_size=30, metric='minkowski',
          metric_params=None, n_jobs=1, n_neighbors=3, p=2,
          weights='uniform'))])
MAE: 4840.068601190476
R2 Score: 0.8896617420551712
kn_pred = g_search.predict(X_test)
plt.scatter(kn_pred, y_test)
plt.plot(y_test, y_test)
plt.xlabel('predicted')
plt.ylabel('actual')
plt.show()

png

Visualize predictions

# plot y-pred vs y
# plot residulas vs y
# Residual histogram  (see if it looks normal)
# Y-hat vs y + y vs y
# Hyperparameter tuning curves
# Metrics vs model
def lin_reg(x,y):
    # SLR, the correlation coefficient multiplied by the standard
    # deviation of y divided by standard deviation of x is the optimal slope.
    beta_1 = (scipy.stats.pearsonr(x,y)[0])*(np.std(y)/np.std(x))
    
    # The optimal beta is found by: mean(y) - b1 * mean(x).
    beta_0 = np.mean(y)-(beta_1*np.mean(x)) 
    
    return beta_0, beta_1
x = df['Engine Cylinders'].values
y = df['MSRP'].values
beta0, beta1 = lin_reg(x,y)

#Print the optimal values.
print('The Optimal Y Intercept is ', beta0)
print('The Optimal slope is ', beta1)
The Optimal Y Intercept is  -60081.168704419215
The Optimal slope is  18051.885440336122
y_pred = beta0 + beta1*x
# Appending the predicted values:
df['Pred'] = y_pred

# Residuals equals the difference between Y-True and Y-Pred:
df['Residuals'] = abs(df['MSRP']-df['Pred'])
# how our predictions compare to the true values.
sns.lmplot(x='MSRP', y='Pred', data=df)
<seaborn.axisgrid.FacetGrid at 0x1a15302860>

png

x = df['Engine HP'].values
y = df['MSRP'].values
beta0, beta1 = lin_reg(x,y)

#Print the optimal values.
print('The Optimal Y Intercept is ', beta0)
print('The Optimal slope is ', beta1)
The Optimal Y Intercept is  -51242.12399479592
The Optimal slope is  367.99756098271956
# Appending the predicted values
df['Pred'] = y_pred

# Residuals equals the difference between Y-True and Y-Pred:
df['Residuals'] = abs(df['MSRP']-df['Pred'])
sns.lmplot(x='MSRP', y='Pred', data=df)
<seaborn.axisgrid.FacetGrid at 0x1a15320c88>

png

# Assumptions for my model
plt.figure(figsize=(8,5))
df['Residuals'] = df['MSRP'] - df['Pred']
sns.distplot(df['Residuals'])
<matplotlib.axes._subplots.AxesSubplot at 0x1a15630828>

png

Best Model for less features

#initialize gradient boosting and selectKbest
selector = SelectKBest(f_regression)  # select k best
clf = GradientBoostingRegressor() # Model I want to use 

#place SelectKbest transformer and RandomForest estimator into Pipeine
pipe = Pipeline(steps=[
    ('Scale',StandardScaler()),
    ('selector', selector), 
    ('clf', clf)
])

#Create the parameter grid, entering the values to use for each parameter selected in the RandomForest estimator
parameters = {
    'selector__k':[12], # params to search through
    'clf__n_estimators': [20, 100], # num of boosting stages to perform. larger number usually better performance
    'clf__learning_rate':[0.05, 0.1, 0.2], # shrinks the contibution of each tree. trade off between n_estimators and learning rate
    'clf__max_depth': [1, 3, 5] # max depth of the individual regression estimators
}

#Perform grid search on the classifier using 'scorer' as the scoring method using GridSearchCV()
g_search = GridSearchCV(pipe, parameters, cv=3, n_jobs=1, verbose=2)

#Fit the grid search object to the training data and find the optimal parameters using fit()
g_fit = g_search.fit(X_train, y_train)

#Get the best estimator and print out the estimator model
best_clf = g_fit.best_estimator_
print (best_clf)

#Use best estimator to make predictions on the test set
best_predictions = best_clf.predict(X_test)


#metrics
#print(mean_absolute_error(y_true = y_test, y_pred = best_predictions))
#print(r2_score(y_true = y_test, y_pred = best_predictions))

print("MAE: " + str(mean_absolute_error(y_true = y_test, y_pred = best_predictions)))
print("R2 Score: " + str(r2_score(y_true = y_test, y_pred = best_predictions)))
Fitting 3 folds for each of 18 candidates, totalling 54 fits
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)
[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    0.5s remaining:    0.0s


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.5s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.5s
[CV] clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.5s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.6s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.7s
[CV] clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.05, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.7s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.5s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.6s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.6s
[CV] clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.1, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.6s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=1, clf__n_estimators=100, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.5s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=3, clf__n_estimators=100, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.4s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=20, selector__k=12, total=   0.3s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.9s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.8s
[CV] clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=12 


/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


[CV]  clf__learning_rate=0.2, clf__max_depth=5, clf__n_estimators=100, selector__k=12, total=   0.7s


[Parallel(n_jobs=1)]: Done  54 out of  54 | elapsed:   28.0s finished
/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/univariate_selection.py:298: RuntimeWarning: invalid value encountered in true_divide
  corr /= X_norms
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in greater
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:879: RuntimeWarning: invalid value encountered in less
  return (self.a < x) & (x < self.b)
/anaconda3/lib/python3.6/site-packages/scipy/stats/_distn_infrastructure.py:1821: RuntimeWarning: invalid value encountered in less_equal
  cond2 = cond0 & (x <= self.a)


Pipeline(memory=None,
     steps=[('Scale', StandardScaler(copy=True, with_mean=True, with_std=True)), ('selector', SelectKBest(k=12, score_func=<function f_regression at 0x109eeb950>)), ('clf', GradientBoostingRegressor(alpha=0.9, criterion='friedman_mse', init=None,
             learning_rate=0.2, loss='ls', max_depth=5, ma...s=100, presort='auto', random_state=None,
             subsample=1.0, verbose=0, warm_start=False))])
MAE: 7224.197106401388
R2 Score: 0.944446769451272
best_clf.steps[1][1].get_support()
array([False,  True,  True, ..., False, False, False])
feature = list(X_cols[best_clf.steps[1][1].get_support()])
feature_import = best_clf.steps[2][1].feature_importances_
dict(zip(feature,feature_import))
{'Engine Cylinders': 0.161652154815887,
 'Engine Fuel Type_premium unleaded (required)': 0.03686347996660804,
 'Engine Fuel Type_regular unleaded': 0.022067087420454934,
 'Engine HP': 0.3288154443057195,
 'Engine HP^2': 0.39578180065792545,
 'Make_Bentley': 0.011090018954312117,
 'Make_Bugatti': 0.0011565166088123209,
 'Make_Lamborghini': 0.016016273040587527,
 'Make_Maybach': 0.007658665277021095,
 'Make_Rolls-Royce': 0.009172297191849426,
 'Model_Landaulet': 0.008039050208676577,
 'Model_Veyron 16.4': 0.0016872115521459321}
pd.DataFrame(feature_import, 
             index=feature).sort_values(0, 
                          ascending = False).plot.barh()
<matplotlib.axes._subplots.AxesSubplot at 0x1a118de978>

png

pd.DataFrame(feature_import, 
             index=feature).sort_values(0, 
                          ascending = False)
0
Engine HP^2 0.395782
Engine HP 0.328815
Engine Cylinders 0.161652
Engine Fuel Type_premium unleaded (required) 0.036863
Engine Fuel Type_regular unleaded 0.022067
Make_Lamborghini 0.016016
Make_Bentley 0.011090
Make_Rolls-Royce 0.009172
Model_Landaulet 0.008039
Make_Maybach 0.007659
Model_Veyron 16.4 0.001687
Make_Bugatti 0.001157
import statsmodels.api as sm
model = sm.OLS(y,X).fit()
model.summary()
OLS Regression Results
Dep. Variable: y R-squared: 0.988
Model: OLS Adj. R-squared: 0.986
Method: Least Squares F-statistic: 847.9
Date: Tue, 17 Jul 2018 Prob (F-statistic): 0.00
Time: 00:34:14 Log-Likelihood: -1.1478e+05
No. Observations: 11199 AIC: 2.315e+05
Df Residuals: 10233 BIC: 2.386e+05
Df Model: 965
Covariance Type: nonrobust
coef std err t P>|t| [0.025 0.975]
Year 744.0213 81.465 9.133 0.000 584.334 903.709
Engine HP -127.7246 8.198 -15.579 0.000 -143.795 -111.654
Engine Cylinders 1195.3531 183.652 6.509 0.000 835.359 1555.347
Number of Doors 943.7598 508.433 1.856 0.063 -52.869 1940.389
highway MPG -5.4721 22.103 -0.248 0.804 -48.798 37.854
city mpg -61.3339 63.666 -0.963 0.335 -186.131 63.463
Popularity -39.2920 2.871 -13.686 0.000 -44.920 -33.664
Engine HP^2 0.3414 0.010 34.979 0.000 0.322 0.361
Make_Acura -1.135e+05 5682.850 -19.980 0.000 -1.25e+05 -1.02e+05
Make_Alfa Romeo -5.201e+04 3788.710 -13.727 0.000 -5.94e+04 -4.46e+04
Make_Aston Martin 1.192e+04 5828.697 2.045 0.041 492.905 2.33e+04
Make_Audi -1.102e+04 4096.029 -2.691 0.007 -1.91e+04 -2994.038
Make_BMW 3.836e+04 5130.895 7.476 0.000 2.83e+04 4.84e+04
Make_Bentley 1.088e+05 5137.073 21.184 0.000 9.88e+04 1.19e+05
Make_Bugatti 6.922e+05 3637.595 190.291 0.000 6.85e+05 6.99e+05
Make_Buick -1.244e+05 5587.367 -22.272 0.000 -1.35e+05 -1.13e+05
Make_Cadillac -5.911e+04 2011.354 -29.391 0.000 -6.31e+04 -5.52e+04
Make_Chevrolet -7.326e+04 3239.041 -22.618 0.000 -7.96e+04 -6.69e+04
Make_Chrysler -8.716e+04 5579.228 -15.622 0.000 -9.81e+04 -7.62e+04
Make_Dodge -6.135e+04 4591.941 -13.360 0.000 -7.03e+04 -5.23e+04
Make_FIAT -9.24e+04 4262.418 -21.678 0.000 -1.01e+05 -8.4e+04
Make_Ferrari 1.577e+05 1845.857 85.440 0.000 1.54e+05 1.61e+05
Make_Ford 8.029e+04 9493.408 8.457 0.000 6.17e+04 9.89e+04
Make_GMC -1.397e+05 4730.569 -29.537 0.000 -1.49e+05 -1.3e+05
Make_Genesis -6.559e+04 4125.760 -15.898 0.000 -7.37e+04 -5.75e+04
Make_HUMMER -8.554e+04 4542.425 -18.832 0.000 -9.44e+04 -7.66e+04
Make_Honda -4.774e+04 847.841 -56.307 0.000 -4.94e+04 -4.61e+04
Make_Hyundai -7.791e+04 2552.363 -30.526 0.000 -8.29e+04 -7.29e+04
Make_Infiniti -1.151e+05 6802.790 -16.924 0.000 -1.28e+05 -1.02e+05
Make_Kia -6.594e+04 1928.668 -34.190 0.000 -6.97e+04 -6.22e+04
Make_Lamborghini 2.758e+05 3477.301 79.324 0.000 2.69e+05 2.83e+05
Make_Land Rover -1.01e+05 5289.941 -19.098 0.000 -1.11e+05 -9.07e+04
Make_Lexus -9.733e+04 5290.597 -18.396 0.000 -1.08e+05 -8.7e+04
Make_Lincoln -1.662e+05 6841.451 -24.292 0.000 -1.8e+05 -1.53e+05
Make_Lotus -5.633e+04 4512.174 -12.484 0.000 -6.52e+04 -4.75e+04
Make_Maserati -6.931e+04 8053.531 -8.606 0.000 -8.51e+04 -5.35e+04
Make_Maybach 3.867e+05 5252.038 73.632 0.000 3.76e+05 3.97e+05
Make_Mazda -1.081e+05 5126.187 -21.080 0.000 -1.18e+05 -9.8e+04
Make_McLaren 1.821e+04 5448.645 3.343 0.001 7534.517 2.89e+04
Make_Mercedes-Benz -7.765e+04 4660.746 -16.660 0.000 -8.68e+04 -6.85e+04
Make_Mitsubishi -1.187e+05 5027.187 -23.609 0.000 -1.29e+05 -1.09e+05
Make_Nissan -6.219e+04 1327.931 -46.830 0.000 -6.48e+04 -5.96e+04
Make_Oldsmobile -1.345e+05 5311.273 -25.325 0.000 -1.45e+05 -1.24e+05
Make_Plymouth -1.176e+05 6913.364 -17.006 0.000 -1.31e+05 -1.04e+05
Make_Pontiac -1.242e+05 5275.567 -23.541 0.000 -1.35e+05 -1.14e+05
Make_Porsche -1.65e+04 1861.879 -8.859 0.000 -2.01e+04 -1.28e+04
Make_Rolls-Royce 1.306e+05 6175.348 21.146 0.000 1.18e+05 1.43e+05
Make_Saab -1.044e+05 4746.725 -22.004 0.000 -1.14e+05 -9.51e+04
Make_Scion -1.238e+05 6088.127 -20.334 0.000 -1.36e+05 -1.12e+05
Make_Spyker 1.723e+04 4178.446 4.123 0.000 9038.610 2.54e+04
Make_Subaru -1.084e+05 4497.695 -24.107 0.000 -1.17e+05 -9.96e+04
Make_Suzuki -1.162e+05 4660.367 -24.925 0.000 -1.25e+05 -1.07e+05
Make_Tesla -2.708e+04 3844.997 -7.043 0.000 -3.46e+04 -1.95e+04
Make_Toyota -5.62e+04 1048.016 -53.625 0.000 -5.83e+04 -5.41e+04
Make_Volkswagen -9.44e+04 5930.929 -15.916 0.000 -1.06e+05 -8.28e+04
Make_Volvo -9.449e+04 8082.457 -11.691 0.000 -1.1e+05 -7.86e+04
Model_1 Series -1.404e+04 2760.376 -5.087 0.000 -1.95e+04 -8630.641
Model_1 Series M -5595.7536 7351.070 -0.761 0.447 -2e+04 8813.783
Model_100 -1.348e+04 3384.461 -3.982 0.000 -2.01e+04 -6841.128
Model_124 Spider -1.86e+04 3795.760 -4.900 0.000 -2.6e+04 -1.12e+04
Model_190-Class -4.065e+04 3207.910 -12.671 0.000 -4.69e+04 -3.44e+04
Model_2 -1.63e+04 2599.390 -6.270 0.000 -2.14e+04 -1.12e+04
Model_2 Series -1.557e+04 2776.120 -5.608 0.000 -2.1e+04 -1.01e+04
Model_200 -1.051e+04 3035.543 -3.461 0.001 -1.65e+04 -4556.092
Model_200SX -4814.4195 3235.365 -1.488 0.137 -1.12e+04 1527.529
Model_240 -1.38e+04 7953.630 -1.735 0.083 -2.94e+04 1787.295
Model_240SX -1407.3579 2911.295 -0.483 0.629 -7114.066 4299.350
Model_3 -8919.4721 1833.143 -4.866 0.000 -1.25e+04 -5326.154
Model_3 Series -1.019e+04 2573.842 -3.960 0.000 -1.52e+04 -5148.171
Model_3 Series Gran Turismo -9297.1967 3712.991 -2.504 0.012 -1.66e+04 -2019.007
Model_300 -6248.6887 3460.540 -1.806 0.071 -1.3e+04 534.647
Model_300-Class -4.478e+04 1898.369 -23.591 0.000 -4.85e+04 -4.11e+04
Model_3000GT -1.399e+04 2581.584 -5.420 0.000 -1.91e+04 -8931.928
Model_300M -1652.7505 4550.296 -0.363 0.716 -1.06e+04 7266.721
Model_300ZX -6729.5740 2575.053 -2.613 0.009 -1.18e+04 -1681.967
Model_323 -1.602e+04 4084.128 -3.923 0.000 -2.4e+04 -8014.785
Model_350-Class -4.81e+04 3900.158 -12.334 0.000 -5.57e+04 -4.05e+04
Model_350Z 1.104e+04 2000.519 5.517 0.000 7115.830 1.5e+04
Model_360 -6.618e+04 2283.939 -28.974 0.000 -7.07e+04 -6.17e+04
Model_370Z 7372.2050 2173.103 3.392 0.001 3112.498 1.16e+04
Model_4 Series -6421.2427 2619.523 -2.451 0.014 -1.16e+04 -1286.464
Model_4 Series Gran Coupe -7047.1577 3021.806 -2.332 0.020 -1.3e+04 -1123.827
Model_400-Class -4.859e+04 3757.763 -12.931 0.000 -5.6e+04 -4.12e+04
Model_420-Class -4.581e+04 5206.282 -8.799 0.000 -5.6e+04 -3.56e+04
Model_456M -7616.5847 3057.726 -2.491 0.013 -1.36e+04 -1622.842
Model_458 Italia -1.459e+04 2677.492 -5.450 0.000 -1.98e+04 -9344.111
Model_4C -5.201e+04 3788.710 -13.727 0.000 -5.94e+04 -4.46e+04
Model_4Runner 4077.9483 1541.771 2.645 0.008 1055.774 7100.122
Model_5 -7275.5055 4330.227 -1.680 0.093 -1.58e+04 1212.587
Model_5 Series -1965.2143 3009.560 -0.653 0.514 -7864.541 3934.112
Model_5 Series Gran Turismo -1275.4174 3366.882 -0.379 0.705 -7875.166 5324.331
Model_500 -2.28e+04 2000.608 -11.397 0.000 -2.67e+04 -1.89e+04
Model_500-Class -5.35e+04 2812.166 -19.025 0.000 -5.9e+04 -4.8e+04
Model_500L -1.676e+04 2385.210 -7.028 0.000 -2.14e+04 -1.21e+04
Model_500X -1.734e+04 2171.919 -7.985 0.000 -2.16e+04 -1.31e+04
Model_500e -1.689e+04 5274.069 -3.203 0.001 -2.72e+04 -6553.978
Model_550 -1.615e+04 4906.165 -3.291 0.001 -2.58e+04 -6530.178
Model_560-Class -4.649e+04 3859.938 -12.045 0.000 -5.41e+04 -3.89e+04
Model_57 -2.083e+05 3008.203 -69.252 0.000 -2.14e+05 -2.02e+05
Model_570S -3.67e+04 6292.221 -5.833 0.000 -4.9e+04 -2.44e+04
Model_575M -2.795e+04 2998.765 -9.322 0.000 -3.38e+04 -2.21e+04
Model_599 5.16e+04 3248.072 15.887 0.000 4.52e+04 5.8e+04
Model_6 -5439.0689 2423.321 -2.244 0.025 -1.02e+04 -688.885
Model_6 Series 1.794e+04 2638.790 6.797 0.000 1.28e+04 2.31e+04
Model_6 Series Gran Coupe 1.838e+04 3184.342 5.773 0.000 1.21e+04 2.46e+04
Model_600-Class -6.699e+04 3796.974 -17.643 0.000 -7.44e+04 -5.95e+04
Model_6000 -1.23e+04 2853.952 -4.311 0.000 -1.79e+04 -6708.436
Model_612 Scaglietti 4.971e+04 4112.969 12.086 0.000 4.16e+04 5.78e+04
Model_62 -1.572e+05 3008.203 -52.260 0.000 -1.63e+05 -1.51e+05
Model_626 -7121.8836 2688.252 -2.649 0.008 -1.24e+04 -1852.383
Model_650S Coupe 2.228e+04 6277.261 3.549 0.000 9975.894 3.46e+04
Model_650S Spider 2.891e+04 6284.110 4.600 0.000 1.66e+04 4.12e+04
Model_7 Series 2.032e+04 3011.819 6.748 0.000 1.44e+04 2.62e+04
Model_718 Cayman -2.447e+04 4865.942 -5.029 0.000 -3.4e+04 -1.49e+04
Model_740 -1.295e+04 7733.650 -1.675 0.094 -2.81e+04 2208.655
Model_760 -1.321e+04 8530.321 -1.549 0.121 -2.99e+04 3506.309
Model_780 -1.327e+04 9002.131 -1.474 0.141 -3.09e+04 4378.901
Model_8 Series -3.779e+04 3546.699 -10.656 0.000 -4.47e+04 -3.08e+04
Model_80 -1.095e+04 3927.950 -2.787 0.005 -1.86e+04 -3246.699
Model_850 -1.852e+04 7639.575 -2.424 0.015 -3.35e+04 -3543.743
Model_86 -258.4745 5058.406 -0.051 0.959 -1.02e+04 9656.992
Model_9-2X -1.26e+04 3400.664 -3.705 0.000 -1.93e+04 -5933.393
Model_9-3 -5468.5127 1697.810 -3.221 0.001 -8796.552 -2140.473
Model_9-3 Griffin -7178.5647 2518.016 -2.851 0.004 -1.21e+04 -2242.760
Model_9-4X -1.025e+04 3077.219 -3.330 0.001 -1.63e+04 -4216.049
Model_9-5 -1258.6110 2309.845 -0.545 0.586 -5786.359 3269.137
Model_9-7X -9297.0307 2471.521 -3.762 0.000 -1.41e+04 -4452.367
Model_90 -1.338e+04 3909.331 -3.423 0.001 -2.1e+04 -5719.795
Model_900 -3.069e+04 1709.977 -17.946 0.000 -3.4e+04 -2.73e+04
Model_9000 -2.771e+04 2288.093 -12.109 0.000 -3.22e+04 -2.32e+04
Model_911 1.634e+04 1581.258 10.333 0.000 1.32e+04 1.94e+04
Model_928 -6.793e+04 4156.843 -16.342 0.000 -7.61e+04 -5.98e+04
Model_929 -1.471e+04 4512.682 -3.260 0.001 -2.36e+04 -5864.662
Model_940 -1.594e+04 7744.494 -2.058 0.040 -3.11e+04 -756.001
Model_944 -5.969e+04 3722.740 -16.033 0.000 -6.7e+04 -5.24e+04
Model_960 -1.902e+04 8013.282 -2.374 0.018 -3.47e+04 -3314.807
Model_968 -6.054e+04 3092.200 -19.578 0.000 -6.66e+04 -5.45e+04
Model_A3 -811.0673 3299.922 -0.246 0.806 -7279.560 5657.425
Model_A4 6722.7995 3418.730 1.966 0.049 21.419 1.34e+04
Model_A4 allroad 8357.5461 5199.247 1.607 0.108 -1833.997 1.85e+04
Model_A5 9898.2838 4043.286 2.448 0.014 1972.651 1.78e+04
Model_A6 1.799e+04 3459.859 5.200 0.000 1.12e+04 2.48e+04
Model_A7 2.808e+04 3868.644 7.259 0.000 2.05e+04 3.57e+04
Model_A8 3.955e+04 4298.463 9.201 0.000 3.11e+04 4.8e+04
Model_ALPINA B6 Gran Coupe 1.109e+04 4801.175 2.311 0.021 1682.027 2.05e+04
Model_ALPINA B7 3.364e+04 3411.585 9.862 0.000 2.7e+04 4.03e+04
Model_AMG GT 2.548e+04 4221.282 6.036 0.000 1.72e+04 3.38e+04
Model_ATS -2993.8122 1535.403 -1.950 0.051 -6003.504 15.879
Model_ATS Coupe -261.0055 1702.778 -0.153 0.878 -3598.783 3076.772
Model_ATS-V -6017.3505 3704.529 -1.624 0.104 -1.33e+04 1244.252
Model_Acadia 3.041e+04 3015.387 10.083 0.000 2.45e+04 3.63e+04
Model_Acadia Limited 3.364e+04 5707.609 5.893 0.000 2.24e+04 4.48e+04
Model_Accent -1.219e+04 1883.235 -6.475 0.000 -1.59e+04 -8502.325
Model_Acclaim -7741.2907 5874.094 -1.318 0.188 -1.93e+04 3773.083
Model_Accord -936.1508 1301.867 -0.719 0.472 -3488.064 1615.763
Model_Accord Crosstour 2447.1240 2439.955 1.003 0.316 -2335.666 7229.914
Model_Accord Hybrid 6569.1866 2773.200 2.369 0.018 1133.172 1.2e+04
Model_Accord Plug-In Hybrid 1.492e+04 6966.629 2.142 0.032 1267.134 2.86e+04
Model_Achieva -1.016e+04 3184.931 -3.190 0.001 -1.64e+04 -3915.369
Model_ActiveHybrid 5 4109.9401 4751.596 0.865 0.387 -5204.119 1.34e+04
Model_ActiveHybrid 7 2.623e+04 4738.263 5.536 0.000 1.69e+04 3.55e+04
Model_ActiveHybrid X6 6405.2906 5442.959 1.177 0.239 -4263.975 1.71e+04
Model_Aerio -4746.3315 1435.568 -3.306 0.001 -7560.327 -1932.336
Model_Aerostar -5570.1393 4624.856 -1.204 0.228 -1.46e+04 3495.485
Model_Alero 1890.5518 1856.897 1.018 0.309 -1749.329 5530.433
Model_Allante -3.437e+04 4328.608 -7.939 0.000 -4.29e+04 -2.59e+04
Model_Alpina 7.4e+04 7347.060 10.072 0.000 5.96e+04 8.84e+04
Model_Altima 4138.0542 2323.920 1.781 0.075 -417.284 8693.392
Model_Altima Hybrid 1.078e+04 4411.113 2.444 0.015 2135.565 1.94e+04
Model_Amanti -1794.8874 3991.615 -0.450 0.653 -9619.235 6029.460
Model_Armada 8858.5532 2405.492 3.683 0.000 4143.319 1.36e+04
Model_Arnage -3.292e+04 3112.412 -10.576 0.000 -3.9e+04 -2.68e+04
Model_Aspen -8972.7260 4341.690 -2.067 0.039 -1.75e+04 -462.164
Model_Aspire -8417.4378 3326.220 -2.531 0.011 -1.49e+04 -1897.395
Model_Astro -4501.6512 5081.463 -0.886 0.376 -1.45e+04 5459.012
Model_Astro Cargo -2940.4214 5301.089 -0.555 0.579 -1.33e+04 7450.751
Model_Aurora 9687.7605 3257.563 2.974 0.003 3302.299 1.61e+04
Model_Avalanche -1.085e+04 2398.742 -4.525 0.000 -1.56e+04 -6152.063
Model_Avalon 5349.3984 2047.145 2.613 0.009 1336.593 9362.204
Model_Avalon Hybrid 1.392e+04 2612.936 5.327 0.000 8796.440 1.9e+04
Model_Avenger -5058.4362 4746.910 -1.066 0.287 -1.44e+04 4246.437
Model_Aventador -3.804e+04 2688.112 -14.151 0.000 -4.33e+04 -3.28e+04
Model_Aveo -1.755e+04 2211.886 -7.936 0.000 -2.19e+04 -1.32e+04
Model_Aviator 4.394e+04 3143.731 13.976 0.000 3.78e+04 5.01e+04
Model_Axxess 179.8388 5433.977 0.033 0.974 -1.05e+04 1.08e+04
Model_Azera 2371.4562 2954.695 0.803 0.422 -3420.326 8163.238
Model_Aztek -4599.4181 2893.852 -1.589 0.112 -1.03e+04 1073.098
Model_Azure 4.783e+04 4565.942 10.475 0.000 3.89e+04 5.68e+04
Model_Azure T 6.783e+04 7295.792 9.298 0.000 5.35e+04 8.21e+04
Model_B-Class Electric Drive -3.068e+04 6228.531 -4.925 0.000 -4.29e+04 -1.85e+04
Model_B-Series -9485.9804 2447.952 -3.875 0.000 -1.43e+04 -4687.516
Model_B-Series Pickup -2.235e+04 1872.186 -11.936 0.000 -2.6e+04 -1.87e+04
Model_B-Series Truck -1.199e+04 2640.882 -4.540 0.000 -1.72e+04 -6812.004
Model_B9 Tribeca 2858.9747 1875.199 1.525 0.127 -816.782 6534.732
Model_BRZ -84.9446 2338.316 -0.036 0.971 -4668.501 4498.612
Model_Baja -8044.0389 2148.427 -3.744 0.000 -1.23e+04 -3832.702
Model_Beetle -1.086e+04 5732.510 -1.894 0.058 -2.21e+04 380.365
Model_Beetle Convertible -1.314e+04 5695.114 -2.308 0.021 -2.43e+04 -1981.114
Model_Beretta -1.767e+04 3527.827 -5.007 0.000 -2.46e+04 -1.08e+04
Model_Black Diamond Avalanche -1.321e+04 3283.858 -4.024 0.000 -1.96e+04 -6775.921
Model_Blackwood 4.745e+04 7167.034 6.620 0.000 3.34e+04 6.15e+04
Model_Blazer -5671.0180 2617.027 -2.167 0.030 -1.08e+04 -541.133
Model_Bolt EV -5034.7444 6877.099 -0.732 0.464 -1.85e+04 8445.717
Model_Bonneville 3693.4302 2589.120 1.427 0.154 -1381.753 8768.613
Model_Borrego -4688.9815 2404.845 -1.950 0.051 -9402.948 24.985
Model_Boxster -3.02e+04 2687.040 -11.239 0.000 -3.55e+04 -2.49e+04
Model_Bravada 8562.3898 2767.956 3.093 0.002 3136.654 1.4e+04
Model_Breeze -8275.6075 5767.933 -1.435 0.151 -1.96e+04 3030.670
Model_Bronco -9022.1320 3243.733 -2.781 0.005 -1.54e+04 -2663.780
Model_Bronco II -2713.5384 5491.270 -0.494 0.621 -1.35e+04 8050.426
Model_Brooklands 4.76e+04 5374.330 8.858 0.000 3.71e+04 5.81e+04
Model_Brougham -2.54e+04 4333.065 -5.862 0.000 -3.39e+04 -1.69e+04
Model_C-Class -2.297e+04 1617.539 -14.201 0.000 -2.61e+04 -1.98e+04
Model_C-Max Hybrid 5595.1606 3310.469 1.690 0.091 -894.007 1.21e+04
Model_C/K 1500 Series -2.686e+04 1883.631 -14.260 0.000 -3.06e+04 -2.32e+04
Model_C/K 2500 Series -2.869e+04 2974.113 -9.647 0.000 -3.45e+04 -2.29e+04
Model_C30 -7302.2787 8305.760 -0.879 0.379 -2.36e+04 8978.638
Model_C36 AMG -4.647e+04 4213.632 -11.027 0.000 -5.47e+04 -3.82e+04
Model_C43 AMG -5.205e+04 4173.485 -12.472 0.000 -6.02e+04 -4.39e+04
Model_C70 -1174.6724 8693.229 -0.135 0.893 -1.82e+04 1.59e+04
Model_C8 1.723e+04 4178.446 4.123 0.000 9038.610 2.54e+04
Model_CC -1909.6530 5909.877 -0.323 0.747 -1.35e+04 9674.862
Model_CL -4630.3642 2437.461 -1.900 0.058 -9408.266 147.537
Model_CL-Class 5.177e+04 2344.802 22.078 0.000 4.72e+04 5.64e+04
Model_CLA-Class -3.034e+04 2639.690 -11.495 0.000 -3.55e+04 -2.52e+04
Model_CLK-Class -1.008e+04 1983.465 -5.084 0.000 -1.4e+04 -6195.382
Model_CLS-Class -7135.9362 2241.011 -3.184 0.001 -1.15e+04 -2743.116
Model_CR-V -3213.6652 1473.669 -2.181 0.029 -6102.345 -324.985
Model_CR-Z -6523.0908 1979.873 -3.295 0.001 -1.04e+04 -2642.153
Model_CT 200h -1.698e+04 4380.215 -3.877 0.000 -2.56e+04 -8397.809
Model_CT6 1.138e+04 1914.544 5.946 0.000 7630.399 1.51e+04
Model_CTS 7077.5706 1447.444 4.890 0.000 4240.298 9914.843
Model_CTS Coupe -1386.5680 1927.828 -0.719 0.472 -5165.488 2392.352
Model_CTS Wagon 36.2807 1865.185 0.019 0.984 -3619.846 3692.408
Model_CTS-V -2.941e+04 4172.870 -7.048 0.000 -3.76e+04 -2.12e+04
Model_CTS-V Coupe -2.227e+04 4179.548 -5.329 0.000 -3.05e+04 -1.41e+04
Model_CTS-V Wagon -2.453e+04 4206.155 -5.832 0.000 -3.28e+04 -1.63e+04
Model_CX-3 -1.287e+04 2522.807 -5.102 0.000 -1.78e+04 -7927.327
Model_CX-5 -8339.9586 1949.773 -4.277 0.000 -1.22e+04 -4518.022
Model_CX-7 -5210.5659 2109.468 -2.470 0.014 -9345.536 -1075.596
Model_CX-9 -4694.9725 2277.174 -2.062 0.039 -9158.679 -231.266
Model_Cabrio -1.333e+04 5650.137 -2.360 0.018 -2.44e+04 -2256.611
Model_Cabriolet -2.342e+04 4145.391 -5.650 0.000 -3.15e+04 -1.53e+04
Model_Cadenza 3311.6281 2580.484 1.283 0.199 -1746.626 8369.882
Model_Caliber -5587.4684 4647.545 -1.202 0.229 -1.47e+04 3522.630
Model_California -5.71e+04 4054.406 -14.084 0.000 -6.51e+04 -4.92e+04
Model_California T -7.455e+04 6789.074 -10.981 0.000 -8.79e+04 -6.12e+04
Model_Camaro -1.982e+04 1935.692 -10.240 0.000 -2.36e+04 -1.6e+04
Model_Camry -768.9230 1973.190 -0.390 0.697 -4636.763 3098.917
Model_Camry Hybrid 3239.0193 2631.128 1.231 0.218 -1918.507 8396.546
Model_Camry Solara 1462.3325 1561.648 0.936 0.349 -1598.803 4523.467
Model_Canyon 1.762e+04 3396.372 5.188 0.000 1.1e+04 2.43e+04
Model_Caprice -2.454e+04 3552.930 -6.907 0.000 -3.15e+04 -1.76e+04
Model_Captiva Sport -8903.6780 2440.098 -3.649 0.000 -1.37e+04 -4120.608
Model_Caravan -2256.5822 6507.581 -0.347 0.729 -1.5e+04 1.05e+04
Model_Carrera GT 2.958e+05 4838.435 61.129 0.000 2.86e+05 3.05e+05
Model_Cascada -6397.6226 3467.733 -1.845 0.065 -1.32e+04 399.813
Model_Catera -2.02e+04 3626.343 -5.571 0.000 -2.73e+04 -1.31e+04
Model_Cavalier -9759.2314 2220.297 -4.395 0.000 -1.41e+04 -5407.015
Model_Cayenne -1.671e+04 2186.647 -7.644 0.000 -2.1e+04 -1.24e+04
Model_Cayman -2.183e+04 2682.490 -8.139 0.000 -2.71e+04 -1.66e+04
Model_Cayman S -1.731e+04 6669.614 -2.595 0.009 -3.04e+04 -4233.505
Model_Celebrity -1.675e+04 5549.932 -3.018 0.003 -2.76e+04 -5871.722
Model_Celica 1453.2343 2092.012 0.695 0.487 -2647.519 5553.988
Model_Century -3744.3741 4041.879 -0.926 0.354 -1.17e+04 4178.500
Model_Challenger -1.753e+04 4466.184 -3.924 0.000 -2.63e+04 -8771.066
Model_Charger -1.71e+04 4440.526 -3.850 0.000 -2.58e+04 -8393.928
Model_Chevy Van -3.153e+04 3826.739 -8.240 0.000 -3.9e+04 -2.4e+04
Model_Ciera -1.249e+04 4031.859 -3.097 0.002 -2.04e+04 -4585.243
Model_Cirrus -2.324e+04 5463.644 -4.253 0.000 -3.39e+04 -1.25e+04
Model_City Express -9749.5732 4894.168 -1.992 0.046 -1.93e+04 -156.046
Model_Civic -5528.5440 1225.838 -4.510 0.000 -7931.427 -3125.661
Model_Civic CRX -1.046e+04 3353.808 -3.120 0.002 -1.7e+04 -3888.493
Model_Civic del Sol -1.065e+04 2667.870 -3.994 0.000 -1.59e+04 -5425.350
Model_Classic -7115.7111 5226.247 -1.362 0.173 -1.74e+04 3128.757
Model_Cobalt -1.143e+04 2064.231 -5.539 0.000 -1.55e+04 -7386.484
Model_Colorado -1.735e+04 2040.887 -8.499 0.000 -2.13e+04 -1.33e+04
Model_Colt -7737.6769 4513.986 -1.714 0.087 -1.66e+04 1110.621
Model_Concorde -5574.0592 4230.577 -1.318 0.188 -1.39e+04 2718.700
Model_Continental 4.42e+04 2083.440 21.216 0.000 4.01e+04 4.83e+04
Model_Continental Flying Spur -1.219e+05 4780.760 -25.501 0.000 -1.31e+05 -1.13e+05
Model_Continental Flying Spur Speed -1.103e+05 4689.084 -23.525 0.000 -1.2e+05 -1.01e+05
Model_Continental GT -9.3e+04 2825.916 -32.911 0.000 -9.85e+04 -8.75e+04
Model_Continental GT Speed -1.072e+05 5449.821 -19.673 0.000 -1.18e+05 -9.65e+04
Model_Continental GT Speed Convertible -9.42e+04 7450.412 -12.643 0.000 -1.09e+05 -7.96e+04
Model_Continental GT3-R 2.856e+04 7340.429 3.890 0.000 1.42e+04 4.29e+04
Model_Continental GTC -9.997e+04 3675.191 -27.202 0.000 -1.07e+05 -9.28e+04
Model_Continental GTC Speed -9.059e+04 5441.016 -16.650 0.000 -1.01e+05 -7.99e+04
Model_Continental R 4.282e+04 5397.907 7.932 0.000 3.22e+04 5.34e+04
Model_Continental SR 5.084e+04 5392.769 9.428 0.000 4.03e+04 6.14e+04
Model_Continental Supersports -5.408e+04 4769.635 -11.339 0.000 -6.34e+04 -4.47e+04
Model_Continental Supersports Convertible -4.915e+04 5565.476 -8.831 0.000 -6.01e+04 -3.82e+04
Model_Contour -5801.8538 3741.030 -1.551 0.121 -1.31e+04 1531.297
Model_Contour SVT -5898.0901 4257.310 -1.385 0.166 -1.42e+04 2447.071
Model_Corniche 5.97e+04 6658.734 8.966 0.000 4.67e+04 7.28e+04
Model_Corolla -6613.6446 1515.544 -4.364 0.000 -9584.408 -3642.881
Model_Corolla iM -9384.7681 5042.362 -1.861 0.063 -1.93e+04 499.250
Model_Corrado -1.69e+04 6353.662 -2.659 0.008 -2.94e+04 -4442.753
Model_Corsica -1.89e+04 5387.116 -3.509 0.000 -2.95e+04 -8340.982
Model_Corvette -1.072e+04 1802.848 -5.948 0.000 -1.43e+04 -7188.582
Model_Corvette Stingray -8236.3542 3843.596 -2.143 0.032 -1.58e+04 -702.153
Model_Coupe -1.24e+04 4632.458 -2.678 0.007 -2.15e+04 -3323.919
Model_Cressida -7550.9591 4389.473 -1.720 0.085 -1.62e+04 1053.267
Model_Crossfire 858.5848 3925.820 0.219 0.827 -6836.790 8553.960
Model_Crosstour 1307.5126 1795.701 0.728 0.467 -2212.413 4827.438
Model_Crosstrek -9423.0195 2373.482 -3.970 0.000 -1.41e+04 -4770.529
Model_Crown Victoria 7760.4925 4207.571 1.844 0.065 -487.171 1.6e+04
Model_Cruze -1.385e+04 1949.323 -7.104 0.000 -1.77e+04 -1e+04
Model_Cruze Limited -1.416e+04 2719.543 -5.207 0.000 -1.95e+04 -8830.071
Model_Cube -2906.9453 2839.926 -1.024 0.306 -8473.756 2659.866
Model_Custom Cruiser -1.348e+04 4104.465 -3.283 0.001 -2.15e+04 -5429.837
Model_Cutlass -1.448e+04 3195.851 -4.530 0.000 -2.07e+04 -8211.544
Model_Cutlass Calais -5888.1219 2262.419 -2.603 0.009 -1.03e+04 -1453.338
Model_Cutlass Ciera -1.015e+04 2237.890 -4.537 0.000 -1.45e+04 -5766.258
Model_Cutlass Supreme -1.372e+04 2733.388 -5.020 0.000 -1.91e+04 -8363.661
Model_DB7 -3.336e+04 3473.144 -9.604 0.000 -4.02e+04 -2.65e+04
Model_DB9 -1.584e+04 2621.844 -6.043 0.000 -2.1e+04 -1.07e+04
Model_DB9 GT -3638.7353 4011.196 -0.907 0.364 -1.15e+04 4223.994
Model_DBS 7.216e+04 1979.936 36.445 0.000 6.83e+04 7.6e+04
Model_DTS 6246.2727 2049.911 3.047 0.002 2228.046 1.03e+04
Model_Dakota -7758.2896 3802.217 -2.040 0.041 -1.52e+04 -305.201
Model_Dart -5989.8452 4447.239 -1.347 0.178 -1.47e+04 2727.615
Model_Dawn -2.283e+04 6709.398 -3.403 0.001 -3.6e+04 -9682.055
Model_Daytona -1.076e+04 5258.659 -2.046 0.041 -2.11e+04 -450.317
Model_DeVille 7899.2486 2370.696 3.332 0.001 3252.221 1.25e+04
Model_Defender -1.051e+04 3614.954 -2.908 0.004 -1.76e+04 -3425.886
Model_Diablo -1.433e+05 6281.066 -22.819 0.000 -1.56e+05 -1.31e+05
Model_Diamante 6455.1585 2559.640 2.522 0.012 1437.762 1.15e+04
Model_Discovery -1.502e+04 2844.998 -5.280 0.000 -2.06e+04 -9443.976
Model_Discovery Series II -2.109e+04 2851.318 -7.395 0.000 -2.67e+04 -1.55e+04
Model_Discovery Sport -1.617e+04 2546.141 -6.352 0.000 -2.12e+04 -1.12e+04
Model_Durango -2589.8977 4379.560 -0.591 0.554 -1.12e+04 5994.897
Model_Dynasty -1.138e+04 5583.332 -2.039 0.042 -2.23e+04 -438.241
Model_E-150 -1.652e+04 2565.060 -6.440 0.000 -2.15e+04 -1.15e+04
Model_E-250 -1.77e+04 3764.811 -4.703 0.000 -2.51e+04 -1.03e+04
Model_E-Class -1.445e+04 1600.698 -9.030 0.000 -1.76e+04 -1.13e+04
Model_E-Series Van -3762.9223 3459.070 -1.088 0.277 -1.05e+04 3017.533
Model_E-Series Wagon 331.7101 3539.919 0.094 0.925 -6607.224 7270.644
Model_E55 AMG -5.546e+04 5043.680 -10.995 0.000 -6.53e+04 -4.56e+04
Model_ECHO -7482.5604 2198.576 -3.403 0.001 -1.18e+04 -3172.921
Model_ES 250 -2.791e+04 5243.837 -5.323 0.000 -3.82e+04 -1.76e+04
Model_ES 300 -8160.9948 4143.079 -1.970 0.049 -1.63e+04 -39.749
Model_ES 300h -4798.6505 4255.719 -1.128 0.260 -1.31e+04 3543.393
Model_ES 330 -9872.6342 4130.734 -2.390 0.017 -1.8e+04 -1775.586
Model_ES 350 -1.275e+04 3635.742 -3.506 0.000 -1.99e+04 -5620.774
Model_EX -1.092e+04 2983.006 -3.660 0.000 -1.68e+04 -5069.887
Model_EX35 -1.055e+04 3030.366 -3.480 0.001 -1.65e+04 -4606.260
Model_Eclipse -2345.9532 2280.931 -1.029 0.304 -6817.025 2125.119
Model_Eclipse Spyder -4005.2953 2852.147 -1.404 0.160 -9596.061 1585.471
Model_Edge 6783.4784 1678.392 4.042 0.000 3493.501 1.01e+04
Model_Eighty-Eight -1.617e+04 2936.468 -5.508 0.000 -2.19e+04 -1.04e+04
Model_Eighty-Eight Royale -1.335e+04 3501.397 -3.814 0.000 -2.02e+04 -6490.251
Model_Elantra -7906.4937 1823.564 -4.336 0.000 -1.15e+04 -4331.950
Model_Elantra Coupe -6295.3732 2591.543 -2.429 0.015 -1.14e+04 -1215.441
Model_Elantra GT -9449.8329 2987.021 -3.164 0.002 -1.53e+04 -3594.687
Model_Elantra Touring -7696.6369 2178.723 -3.533 0.000 -1.2e+04 -3425.912
Model_Eldorado -6665.2227 2837.142 -2.349 0.019 -1.22e+04 -1103.870
Model_Electra -1.327e+04 6918.733 -1.918 0.055 -2.68e+04 288.977
Model_Element -4287.0100 1760.899 -2.435 0.015 -7738.718 -835.302
Model_Elise -3.272e+04 2758.701 -11.861 0.000 -3.81e+04 -2.73e+04
Model_Enclave 3583.1762 2172.192 1.650 0.099 -674.746 7841.099
Model_Encore -8592.4600 2055.049 -4.181 0.000 -1.26e+04 -4564.162
Model_Endeavor 325.8131 2605.384 0.125 0.900 -4781.249 5432.875
Model_Entourage 1891.0362 4972.327 0.380 0.704 -7855.698 1.16e+04
Model_Envision 3204.7407 2751.525 1.165 0.244 -2188.788 8598.269
Model_Envoy 2.746e+04 3010.208 9.123 0.000 2.16e+04 3.34e+04
Model_Envoy XL 2.905e+04 3052.913 9.517 0.000 2.31e+04 3.5e+04
Model_Envoy XUV 2.942e+04 4316.887 6.815 0.000 2.1e+04 3.79e+04
Model_Enzo 3.508e+05 6796.271 51.616 0.000 3.37e+05 3.64e+05
Model_Eos -8147.9780 6229.597 -1.308 0.191 -2.04e+04 4063.251
Model_Equator -1.036e+04 2282.731 -4.540 0.000 -1.48e+04 -5888.426
Model_Equinox -1.094e+04 2054.672 -5.322 0.000 -1.5e+04 -6907.646
Model_Equus 1.05e+04 3082.777 3.407 0.001 4459.502 1.65e+04
Model_Escalade 1.275e+04 1573.645 8.102 0.000 9665.202 1.58e+04
Model_Escalade ESV 1.574e+04 1573.292 10.005 0.000 1.27e+04 1.88e+04
Model_Escalade EXT -4156.0943 3649.218 -1.139 0.255 -1.13e+04 2997.088
Model_Escalade Hybrid 2.698e+04 2201.400 12.256 0.000 2.27e+04 3.13e+04
Model_Escape 2596.3741 2322.289 1.118 0.264 -1955.768 7148.516
Model_Escape Hybrid 1.281e+04 2343.399 5.468 0.000 8220.074 1.74e+04
Model_Escape S 2928.3231 5033.343 0.582 0.561 -6938.016 1.28e+04
Model_Escape SE 2760.5117 5031.701 0.549 0.583 -7102.607 1.26e+04
Model_Escort 3561.9762 2613.767 1.363 0.173 -1561.518 8685.470
Model_Esprit 6102.7552 3746.255 1.629 0.103 -1240.637 1.34e+04
Model_Estate Wagon -1.817e+04 6989.214 -2.599 0.009 -3.19e+04 -4467.168
Model_Esteem -3854.1047 1401.264 -2.750 0.006 -6600.856 -1107.354
Model_EuroVan -541.6895 7177.792 -0.075 0.940 -1.46e+04 1.35e+04
Model_Evora -1.418e+04 2651.137 -5.348 0.000 -1.94e+04 -8980.507
Model_Evora 400 -7202.0651 6203.034 -1.161 0.246 -1.94e+04 4957.096
Model_Excel -1.176e+04 2648.187 -4.439 0.000 -1.69e+04 -6564.632
Model_Exige -8331.0739 2994.804 -2.782 0.005 -1.42e+04 -2460.671
Model_Expedition 1.753e+04 1560.147 11.236 0.000 1.45e+04 2.06e+04
Model_Explorer 7186.2483 1642.262 4.376 0.000 3967.093 1.04e+04
Model_Explorer Sport 1.046e+04 2505.840 4.173 0.000 5545.558 1.54e+04
Model_Explorer Sport Trac -698.5569 1809.072 -0.386 0.699 -4244.693 2847.579
Model_Expo -1.045e+04 2328.279 -4.488 0.000 -1.5e+04 -5884.693
Model_Express -1.721e+04 3740.525 -4.602 0.000 -2.45e+04 -9882.371
Model_Express Cargo -1.975e+04 5737.856 -3.441 0.001 -3.1e+04 -8499.255
Model_F-150 -352.4856 1560.728 -0.226 0.821 -3411.819 2706.847
Model_F-150 Heritage 2366.0724 1780.245 1.329 0.184 -1123.556 5855.700
Model_F-150 SVT Lightning -1.978e+04 4107.582 -4.816 0.000 -2.78e+04 -1.17e+04
Model_F-250 -1.559e+04 1380.408 -11.290 0.000 -1.83e+04 -1.29e+04
Model_F12 Berlinetta -7410.5426 4183.174 -1.772 0.077 -1.56e+04 789.297
Model_F430 -4.023e+04 2213.489 -18.177 0.000 -4.46e+04 -3.59e+04
Model_FF -6825.8426 4161.237 -1.640 0.101 -1.5e+04 1330.997
Model_FJ Cruiser -3781.4535 2422.343 -1.561 0.119 -8529.720 966.813
Model_FR-S -5485.9244 2440.716 -2.248 0.025 -1.03e+04 -701.642
Model_FX -2478.2846 3032.563 -0.817 0.414 -8422.702 3466.133
Model_FX35 -3498.8299 3637.542 -0.962 0.336 -1.06e+04 3631.465
Model_FX45 97.2683 4670.082 0.021 0.983 -9057.006 9251.543
Model_FX50 -910.7358 5447.786 -0.167 0.867 -1.16e+04 9767.992
Model_Festiva -5513.6229 4514.340 -1.221 0.222 -1.44e+04 3335.367
Model_Fiesta -4229.1341 1893.630 -2.233 0.026 -7941.019 -517.249
Model_Firebird -9031.3201 2152.470 -4.196 0.000 -1.33e+04 -4812.058
Model_Fit -1.146e+04 1919.155 -5.970 0.000 -1.52e+04 -7694.529
Model_Fit EV 2285.4278 6610.322 0.346 0.730 -1.07e+04 1.52e+04
Model_Five Hundred 6948.4731 2058.712 3.375 0.001 2912.994 1.1e+04
Model_Fleetwood -2.982e+04 4212.156 -7.079 0.000 -3.81e+04 -2.16e+04
Model_Flex 4699.1277 2069.082 2.271 0.023 643.321 8754.935
Model_Flying Spur -1.059e+05 3919.575 -27.012 0.000 -1.14e+05 -9.82e+04
Model_Focus -1363.4022 2047.707 -0.666 0.506 -5377.310 2650.505
Model_Focus RS 2537.1329 7143.701 0.355 0.722 -1.15e+04 1.65e+04
Model_Focus ST 1493.9100 4238.342 0.352 0.724 -6814.071 9801.891
Model_Forenza -6333.1441 1457.589 -4.345 0.000 -9190.305 -3475.984
Model_Forester -6057.2423 1670.430 -3.626 0.000 -9331.613 -2782.872
Model_Forte -9381.3041 1600.719 -5.861 0.000 -1.25e+04 -6243.581
Model_Fox -1.623e+04 5984.031 -2.712 0.007 -2.8e+04 -4499.575
Model_Freelander -2.222e+04 2409.406 -9.222 0.000 -2.69e+04 -1.75e+04
Model_Freestar 1.141e+04 4141.683 2.755 0.006 3289.774 1.95e+04
Model_Freestyle 8772.4949 2138.669 4.102 0.000 4580.285 1.3e+04
Model_Frontier -6303.3976 2513.788 -2.508 0.012 -1.12e+04 -1375.881
Model_Fusion 7236.2215 1983.741 3.648 0.000 3347.700 1.11e+04
Model_Fusion Hybrid 1.01e+04 2732.584 3.698 0.000 4747.657 1.55e+04
Model_G Convertible -1916.5040 3399.917 -0.564 0.573 -8581.007 4747.999
Model_G Coupe -2632.5733 2875.305 -0.916 0.360 -8268.734 3003.587
Model_G Sedan -6895.6434 2662.588 -2.590 0.010 -1.21e+04 -1676.449
Model_G-Class 3.737e+04 3257.596 11.472 0.000 3.1e+04 4.38e+04
Model_G20 -1.094e+04 3640.658 -3.005 0.003 -1.81e+04 -3804.527
Model_G3 -1.238e+04 6971.974 -1.776 0.076 -2.6e+04 1286.792
Model_G35 -6645.3788 2891.747 -2.298 0.022 -1.23e+04 -976.988
Model_G37 -7952.2174 3011.628 -2.641 0.008 -1.39e+04 -2048.837
Model_G37 Convertible -3103.3646 4694.922 -0.661 0.509 -1.23e+04 6099.602
Model_G37 Coupe -4505.0531 3921.478 -1.149 0.251 -1.22e+04 3181.812
Model_G37 Sedan -7618.0758 3657.130 -2.083 0.037 -1.48e+04 -449.384
Model_G5 -5050.4474 3086.627 -1.636 0.102 -1.11e+04 999.946
Model_G6 -2760.3215 1944.223 -1.420 0.156 -6571.380 1050.736
Model_G8 -7319.2788 3381.497 -2.165 0.030 -1.39e+04 -690.882
Model_G80 -6.559e+04 4125.760 -15.898 0.000 -7.37e+04 -5.75e+04
Model_GL-Class -6939.1568 2281.748 -3.041 0.002 -1.14e+04 -2466.484
Model_GLA-Class -3.341e+04 2640.891 -12.652 0.000 -3.86e+04 -2.82e+04
Model_GLC-Class -2.594e+04 3616.879 -7.171 0.000 -3.3e+04 -1.88e+04
Model_GLE-Class -1.608e+04 2299.582 -6.994 0.000 -2.06e+04 -1.16e+04
Model_GLE-Class Coupe -1.267e+04 3611.975 -3.509 0.000 -1.98e+04 -5594.667
Model_GLI -6348.7730 5915.289 -1.073 0.283 -1.79e+04 5246.352
Model_GLK-Class -3.057e+04 2478.874 -12.334 0.000 -3.54e+04 -2.57e+04
Model_GLS-Class -5990.8696 4178.866 -1.434 0.152 -1.42e+04 2200.526
Model_GS 200t 1374.5798 3646.163 0.377 0.706 -5772.614 8521.774
Model_GS 300 -1674.9146 3579.352 -0.468 0.640 -8691.145 5341.316
Model_GS 350 -3325.2877 2311.111 -1.439 0.150 -7855.518 1204.942
Model_GS 400 -3.942e+04 4183.473 -9.422 0.000 -4.76e+04 -3.12e+04
Model_GS 430 1683.5586 4112.592 0.409 0.682 -6377.926 9745.044
Model_GS 450h 5607.3364 4175.286 1.343 0.179 -2577.042 1.38e+04
Model_GS 460 -1581.6376 4109.589 -0.385 0.700 -9637.238 6473.963
Model_GS F 5473.4215 7070.125 0.774 0.439 -8385.407 1.93e+04
Model_GT 8.848e+04 5140.179 17.214 0.000 7.84e+04 9.86e+04
Model_GT-R 4.061e+04 3240.461 12.531 0.000 3.43e+04 4.7e+04
Model_GTI -7339.7977 5655.325 -1.298 0.194 -1.84e+04 3745.746
Model_GTO -8330.6239 4167.056 -1.999 0.046 -1.65e+04 -162.378
Model_GX 460 -5663.9611 2989.359 -1.895 0.058 -1.15e+04 195.769
Model_GX 470 -6165.4598 4108.080 -1.501 0.133 -1.42e+04 1887.182
Model_Galant -71.3072 3026.543 -0.024 0.981 -6003.925 5861.310
Model_Gallardo -2.327e+05 2173.279 -107.060 0.000 -2.37e+05 -2.28e+05
Model_Genesis -375.5624 2706.801 -0.139 0.890 -5681.423 4930.298
Model_Genesis Coupe -5899.4833 2037.314 -2.896 0.004 -9893.018 -1905.949
Model_Ghibli -2.551e+04 6005.249 -4.248 0.000 -3.73e+04 -1.37e+04
Model_Ghost -7.1e+04 3107.976 -22.846 0.000 -7.71e+04 -6.49e+04
Model_Ghost Series II -4.156e+04 3672.688 -11.315 0.000 -4.88e+04 -3.44e+04
Model_Golf -1.312e+04 5787.441 -2.266 0.023 -2.45e+04 -1772.193
Model_Golf Alltrack -1.003e+04 6492.352 -1.545 0.122 -2.28e+04 2696.514
Model_Golf GTI -8953.4626 5717.602 -1.566 0.117 -2.02e+04 2254.156
Model_Golf R -6399.0442 6090.654 -1.051 0.293 -1.83e+04 5539.830
Model_Golf SportWagen -9574.5266 5862.176 -1.633 0.102 -2.11e+04 1916.486
Model_GranSport 52.4676 6464.070 0.008 0.994 -1.26e+04 1.27e+04
Model_GranTurismo 3.155e+04 6003.930 5.254 0.000 1.98e+04 4.33e+04
Model_GranTurismo Convertible 3.573e+04 5858.816 6.099 0.000 2.42e+04 4.72e+04
Model_Grand Am -1011.3114 1977.461 -0.511 0.609 -4887.522 2864.899
Model_Grand Caravan -5622.4215 5970.301 -0.942 0.346 -1.73e+04 6080.537
Model_Grand Prix -4274.0167 2689.190 -1.589 0.112 -9545.355 997.322
Model_Grand Vitara -4928.6849 1878.525 -2.624 0.009 -8610.962 -1246.407
Model_Grand Voyager -1.53e+04 6204.352 -2.467 0.014 -2.75e+04 -3142.967
Model_H3 -3.706e+04 2446.062 -15.150 0.000 -4.19e+04 -3.23e+04
Model_H3T -4.848e+04 3383.000 -14.332 0.000 -5.51e+04 -4.19e+04
Model_HHR -9131.8275 2404.014 -3.799 0.000 -1.38e+04 -4419.490
Model_HR-V -9876.8469 1932.098 -5.112 0.000 -1.37e+04 -6089.555
Model_HS 250h -5107.1942 3039.285 -1.680 0.093 -1.11e+04 850.400
Model_Highlander 3244.9610 1622.560 2.000 0.046 64.425 6425.497
Model_Highlander Hybrid 1.378e+04 2925.260 4.709 0.000 8040.955 1.95e+04
Model_Horizon -5536.0600 8359.220 -0.662 0.508 -2.19e+04 1.08e+04
Model_Huracan -2.33e+05 3562.137 -65.409 0.000 -2.4e+05 -2.26e+05
Model_I30 -1.885e+04 3824.607 -4.928 0.000 -2.63e+04 -1.13e+04
Model_I35 -5280.7397 4731.279 -1.116 0.264 -1.46e+04 3993.495
Model_ILX -1.447e+04 2161.744 -6.695 0.000 -1.87e+04 -1.02e+04
Model_ILX Hybrid -9875.2888 5031.747 -1.963 0.050 -1.97e+04 -12.079
Model_IS 200t -1.081e+04 5052.529 -2.140 0.032 -2.07e+04 -906.467
Model_IS 250 -1.117e+04 2634.811 -4.240 0.000 -1.63e+04 -6005.766
Model_IS 250 C -1.359e+04 4201.047 -3.234 0.001 -2.18e+04 -5352.556
Model_IS 300 -1.257e+04 3230.617 -3.891 0.000 -1.89e+04 -6238.825
Model_IS 350 -1.379e+04 2992.562 -4.608 0.000 -1.97e+04 -7922.987
Model_IS 350 C -1.418e+04 4190.285 -3.383 0.001 -2.24e+04 -5963.244
Model_IS F -5664.0569 4129.355 -1.372 0.170 -1.38e+04 2430.287
Model_Impala -7987.9424 2608.122 -3.063 0.002 -1.31e+04 -2875.513
Model_Impala Limited -1.418e+04 2731.223 -5.193 0.000 -1.95e+04 -8828.712
Model_Imperial -2.059e+04 5713.429 -3.604 0.000 -3.18e+04 -9394.259
Model_Impreza -1.029e+04 1637.066 -6.285 0.000 -1.35e+04 -7080.009
Model_Impreza WRX -1504.8215 1946.392 -0.773 0.439 -5320.131 2310.488
Model_Insight -7854.1296 2309.717 -3.400 0.001 -1.24e+04 -3326.633
Model_Integra -1.773e+04 1685.356 -10.518 0.000 -2.1e+04 -1.44e+04
Model_Intrepid -132.2169 5109.305 -0.026 0.979 -1.01e+04 9883.021
Model_Intrigue -1114.0959 2522.393 -0.442 0.659 -6058.481 3830.289
Model_J30 -2.519e+04 4136.317 -6.091 0.000 -3.33e+04 -1.71e+04
Model_JX -6960.7729 5410.745 -1.286 0.198 -1.76e+04 3645.347
Model_Jetta -1.073e+04 5701.019 -1.882 0.060 -2.19e+04 444.510
Model_Jetta GLI -6656.5437 5754.146 -1.157 0.247 -1.79e+04 4622.709
Model_Jetta Hybrid -6747.9146 6219.758 -1.085 0.278 -1.89e+04 5444.029
Model_Jetta SportWagen -9991.3322 5717.422 -1.748 0.081 -2.12e+04 1215.934
Model_Jimmy 1.694e+04 2730.691 6.202 0.000 1.16e+04 2.23e+04
Model_Journey -7462.3776 4296.148 -1.737 0.082 -1.59e+04 958.914
Model_Juke 670.7645 2288.463 0.293 0.769 -3815.072 5156.601
Model_Justy -1.377e+04 2509.200 -5.487 0.000 -1.87e+04 -8849.831
Model_K900 8367.4174 3277.709 2.553 0.011 1942.466 1.48e+04
Model_Kizashi -644.2447 1728.018 -0.373 0.709 -4031.498 2743.009
Model_LFA 2.732e+05 7117.954 38.381 0.000 2.59e+05 2.87e+05
Model_LHS -1.89e+04 5469.287 -3.455 0.001 -2.96e+04 -8176.530
Model_LR2 -1.803e+04 2560.829 -7.040 0.000 -2.3e+04 -1.3e+04
Model_LR3 -1.087e+04 3896.577 -2.790 0.005 -1.85e+04 -3232.038
Model_LR4 -9743.8066 2425.525 -4.017 0.000 -1.45e+04 -4989.302
Model_LS 4.732e+04 3080.881 15.358 0.000 4.13e+04 5.34e+04
Model_LS 400 -3.778e+04 4181.339 -9.036 0.000 -4.6e+04 -2.96e+04
Model_LS 430 6705.9389 4192.580 1.599 0.110 -1512.338 1.49e+04
Model_LS 460 1.125e+04 2233.772 5.038 0.000 6875.516 1.56e+04
Model_LS 600h L 4.284e+04 4217.611 10.158 0.000 3.46e+04 5.11e+04
Model_LSS -1.616e+04 2935.196 -5.507 0.000 -2.19e+04 -1.04e+04
Model_LTD Crown Victoria -6459.1412 4030.310 -1.603 0.109 -1.44e+04 1441.055
Model_LX 450 -3.63e+04 5139.659 -7.062 0.000 -4.64e+04 -2.62e+04
Model_LX 470 1.528e+04 4134.820 3.695 0.000 7171.120 2.34e+04
Model_LX 570 1.47e+04 4173.179 3.522 0.000 6516.499 2.29e+04
Model_LaCrosse -3084.4680 2172.127 -1.420 0.156 -7342.262 1173.326
Model_Lancer -6891.0780 2106.077 -3.272 0.001 -1.1e+04 -2762.755
Model_Lancer Evolution 3637.8815 2966.317 1.226 0.220 -2176.680 9452.443
Model_Lancer Sportback -6257.2809 3060.269 -2.045 0.041 -1.23e+04 -258.554
Model_Land Cruiser 3.389e+04 4101.230 8.264 0.000 2.59e+04 4.19e+04
Model_Landaulet 7.522e+05 4345.128 173.124 0.000 7.44e+05 7.61e+05
Model_Laser -6625.2790 4733.420 -1.400 0.162 -1.59e+04 2653.151
Model_Le Baron -2.313e+04 4334.749 -5.337 0.000 -3.16e+04 -1.46e+04
Model_Le Mans -1.273e+04 2598.505 -4.900 0.000 -1.78e+04 -7638.416
Model_LeSabre 1584.2894 2949.848 0.537 0.591 -4197.989 7366.568
Model_Leaf 1390.2705 5347.259 0.260 0.795 -9091.404 1.19e+04
Model_Legacy -5599.5718 1956.264 -2.862 0.004 -9434.233 -1764.910
Model_Legend -2.394e+04 2031.840 -11.784 0.000 -2.79e+04 -2e+04
Model_Levante -3.097e+04 7427.546 -4.169 0.000 -4.55e+04 -1.64e+04
Model_Loyale -1.265e+04 2567.861 -4.927 0.000 -1.77e+04 -7617.910
Model_Lucerne 1979.4939 1930.216 1.026 0.305 -1804.108 5763.096
Model_Lumina -1.896e+04 3945.446 -4.805 0.000 -2.67e+04 -1.12e+04
Model_Lumina Minivan -1.818e+04 5205.160 -3.493 0.000 -2.84e+04 -7979.107
Model_M -784.9873 2032.232 -0.386 0.699 -4768.560 3198.586
Model_M-Class -1.85e+04 1982.054 -9.335 0.000 -2.24e+04 -1.46e+04
Model_M2 -7521.3778 5450.104 -1.380 0.168 -1.82e+04 3161.893
Model_M3 -3923.3553 4652.308 -0.843 0.399 -1.3e+04 5196.079
Model_M30 -2.446e+04 4338.824 -5.637 0.000 -3.3e+04 -1.6e+04
Model_M35 1832.5974 3591.863 0.510 0.610 -5208.157 8873.352
Model_M37 -1105.1860 5425.624 -0.204 0.839 -1.17e+04 9530.099
Model_M4 -1461.1448 3634.788 -0.402 0.688 -8586.040 5663.751
Model_M4 GTS 4.784e+04 7420.256 6.447 0.000 3.33e+04 6.24e+04
Model_M45 3298.6865 3593.629 0.918 0.359 -3745.530 1.03e+04
Model_M5 -1.051e+04 4790.744 -2.194 0.028 -1.99e+04 -1121.862
Model_M56 -3202.6369 5415.114 -0.591 0.554 -1.38e+04 7412.046
Model_M6 9363.6697 3691.472 2.537 0.011 2127.662 1.66e+04
Model_M6 Gran Coupe 1.201e+04 4802.251 2.501 0.012 2596.634 2.14e+04
Model_MDX -1416.6606 1529.375 -0.926 0.354 -4414.536 1581.215
Model_MKC 4.121e+04 2759.702 14.934 0.000 3.58e+04 4.66e+04
Model_MKS 3.501e+04 3172.592 11.036 0.000 2.88e+04 4.12e+04
Model_MKT 3.666e+04 3655.399 10.030 0.000 2.95e+04 4.38e+04
Model_MKX 4.037e+04 2659.838 15.176 0.000 3.52e+04 4.56e+04
Model_MKZ 4.545e+04 2644.995 17.183 0.000 4.03e+04 5.06e+04
Model_MKZ Hybrid 4.595e+04 7367.178 6.237 0.000 3.15e+04 6.04e+04
Model_ML55 AMG -6.109e+04 7034.609 -8.684 0.000 -7.49e+04 -4.73e+04
Model_MP4-12C 3729.8231 4860.062 0.767 0.443 -5796.851 1.33e+04
Model_MPV -840.0421 4638.817 -0.181 0.856 -9933.031 8252.947
Model_MR2 -6326.5774 3236.439 -1.955 0.051 -1.27e+04 17.477
Model_MR2 Spyder -1745.7910 3030.804 -0.576 0.565 -7686.760 4195.178
Model_MX-3 -1.639e+04 3737.544 -4.385 0.000 -2.37e+04 -9064.461
Model_MX-5 Miata -1.016e+04 2119.902 -4.793 0.000 -1.43e+04 -6005.283
Model_MX-6 -1.517e+04 3381.938 -4.484 0.000 -2.18e+04 -8536.525
Model_Macan -3.893e+04 2689.996 -14.471 0.000 -4.42e+04 -3.37e+04
Model_Magnum -4824.3304 4796.725 -1.006 0.315 -1.42e+04 4578.191
Model_Malibu -9407.7336 2268.534 -4.147 0.000 -1.39e+04 -4960.963
Model_Malibu Classic -1.144e+04 4316.345 -2.651 0.008 -1.99e+04 -2983.193
Model_Malibu Hybrid -4229.3867 4309.215 -0.981 0.326 -1.27e+04 4217.519
Model_Malibu Limited -9467.5757 4293.193 -2.205 0.027 -1.79e+04 -1052.076
Model_Malibu Maxx -9560.3987 2673.641 -3.576 0.000 -1.48e+04 -4319.539
Model_Mark LT 3.156e+04 3096.891 10.191 0.000 2.55e+04 3.76e+04
Model_Mark VII 2.019e+04 4863.469 4.150 0.000 1.07e+04 2.97e+04
Model_Mark VIII 1.33e+04 3987.982 3.334 0.001 5480.674 2.11e+04
Model_Matrix -5093.3753 2027.899 -2.512 0.012 -9068.454 -1118.297
Model_Maxima 6828.9394 2773.623 2.462 0.014 1392.095 1.23e+04
Model_Maybach 7.901e+04 5129.745 15.402 0.000 6.9e+04 8.91e+04
Model_Mazdaspeed 3 -7452.7927 4392.794 -1.697 0.090 -1.61e+04 1157.944
Model_Mazdaspeed 6 898.2330 3890.465 0.231 0.817 -6727.840 8524.306
Model_Mazdaspeed MX-5 Miata -3747.2574 4374.400 -0.857 0.392 -1.23e+04 4827.423
Model_Mazdaspeed Protege -965.0405 5219.163 -0.185 0.853 -1.12e+04 9265.540
Model_Metris -2.897e+04 6385.695 -4.537 0.000 -4.15e+04 -1.65e+04
Model_Metro -2.245e+04 3275.606 -6.853 0.000 -2.89e+04 -1.6e+04
Model_Mighty Max Pickup -1.378e+04 3192.122 -4.316 0.000 -2e+04 -7521.028
Model_Millenia -2545.4407 2872.889 -0.886 0.376 -8176.865 3085.984
Model_Mirage -1.484e+04 2393.763 -6.197 0.000 -1.95e+04 -1.01e+04
Model_Mirage G4 -1.366e+04 4235.426 -3.225 0.001 -2.2e+04 -5357.613
Model_Model D -3726.3687 2508.038 -1.486 0.137 -8642.615 1189.877
Model_Model S -2.336e+04 2699.272 -8.652 0.000 -2.86e+04 -1.81e+04
Model_Monaco -1.08e+04 6319.182 -1.710 0.087 -2.32e+04 1583.093
Model_Montana 4302.0981 3844.360 1.119 0.263 -3233.600 1.18e+04
Model_Montana SV6 411.2000 5933.381 0.069 0.945 -1.12e+04 1.2e+04
Model_Monte Carlo -7170.7976 2630.461 -2.726 0.006 -1.23e+04 -2014.580
Model_Montero 9739.9702 4045.074 2.408 0.016 1810.832 1.77e+04
Model_Montero Sport 4788.0098 1806.451 2.651 0.008 1247.012 8329.008
Model_Mulsanne 1.706e+04 4201.410 4.060 0.000 8822.090 2.53e+04
Model_Murano 7795.7258 2075.863 3.755 0.000 3726.628 1.19e+04
Model_Murano CrossCabriolet 1.396e+04 4693.098 2.975 0.003 4763.293 2.32e+04
Model_Murcielago -9.985e+04 2629.525 -37.971 0.000 -1.05e+05 -9.47e+04
Model_Mustang -3058.8967 1868.180 -1.637 0.102 -6720.896 603.102
Model_Mustang SVT Cobra -1.511e+04 3210.533 -4.708 0.000 -2.14e+04 -8821.441
Model_NSX 5.312e+04 3202.387 16.588 0.000 4.68e+04 5.94e+04
Model_NV200 2320.8189 4990.618 0.465 0.642 -7461.769 1.21e+04
Model_NX -3028.7121 3372.106 -0.898 0.369 -9638.700 3581.276
Model_NX 200t -1.573e+04 2206.290 -7.130 0.000 -2.01e+04 -1.14e+04
Model_NX 300h -9709.9497 3315.209 -2.929 0.003 -1.62e+04 -3211.490
Model_Navajo -1.54e+04 3778.941 -4.076 0.000 -2.28e+04 -7997.336
Model_Navigator 5.484e+04 2695.557 20.344 0.000 4.96e+04 6.01e+04
Model_Neon -4362.1242 4369.753 -0.998 0.318 -1.29e+04 4203.448
Model_New Beetle -1.231e+04 5733.366 -2.147 0.032 -2.35e+04 -1071.747
Model_New Yorker -2.26e+04 5613.552 -4.026 0.000 -3.36e+04 -1.16e+04
Model_Ninety-Eight -1.385e+04 3160.792 -4.382 0.000 -2e+04 -7654.103
Model_Nitro -5735.3082 4469.337 -1.283 0.199 -1.45e+04 3025.467
Model_Odyssey 4066.6707 4478.069 0.908 0.364 -4711.221 1.28e+04
Model_Omni -1.005e+04 8604.851 -1.168 0.243 -2.69e+04 6818.987
Model_Optima -1371.1320 1879.143 -0.730 0.466 -5054.621 2312.357
Model_Optima Hybrid 1139.1152 2998.690 0.380 0.704 -4738.905 7017.135
Model_Outback -4343.8414 1782.717 -2.437 0.015 -7838.317 -849.366
Model_Outlander -5050.7123 1971.623 -2.562 0.010 -8915.480 -1185.945
Model_Outlander Sport -7290.9516 1751.847 -4.162 0.000 -1.07e+04 -3856.989
Model_PT Cruiser -1.179e+04 4160.059 -2.835 0.005 -1.99e+04 -3638.648
Model_Pacifica -6666.4631 3947.429 -1.689 0.091 -1.44e+04 1071.270
Model_Panamera 9011.5754 2152.165 4.187 0.000 4792.910 1.32e+04
Model_Park Avenue 9386.2134 2957.505 3.174 0.002 3588.924 1.52e+04
Model_Park Ward -3.565e+04 4821.699 -7.394 0.000 -4.51e+04 -2.62e+04
Model_Paseo -1.286e+04 3735.632 -3.443 0.001 -2.02e+04 -5538.139
Model_Passat -7372.0319 5765.820 -1.279 0.201 -1.87e+04 3930.105
Model_Passport -426.0252 2001.632 -0.213 0.831 -4349.616 3497.566
Model_Pathfinder 4248.8570 2211.292 1.921 0.055 -85.709 8583.423
Model_Phaeton 3.075e+04 5854.820 5.252 0.000 1.93e+04 4.22e+04
Model_Phantom 1.209e+05 3150.830 38.375 0.000 1.15e+05 1.27e+05
Model_Phantom Coupe 1.155e+05 4116.543 28.061 0.000 1.07e+05 1.24e+05
Model_Phantom Drophead Coupe 1.491e+05 4117.446 36.206 0.000 1.41e+05 1.57e+05
Model_Pickup -1.448e+04 1853.402 -7.812 0.000 -1.81e+04 -1.08e+04
Model_Pilot 51.6121 1317.505 0.039 0.969 -2530.956 2634.180
Model_Precis -1.062e+04 6983.092 -1.520 0.129 -2.43e+04 3073.057
Model_Prelude -3053.2410 2858.075 -1.068 0.285 -8655.628 2549.146
Model_Previa -9489.0721 4639.740 -2.045 0.041 -1.86e+04 -394.273
Model_Prius -462.8847 2483.306 -0.186 0.852 -5330.650 4404.881
Model_Prius Prime 1488.5464 4473.467 0.333 0.739 -7280.325 1.03e+04
Model_Prius c -6688.2681 2664.700 -2.510 0.012 -1.19e+04 -1464.935
Model_Prius v 2385.6769 2498.000 0.955 0.340 -2510.892 7282.246
Model_Prizm -1.225e+04 3355.982 -3.651 0.000 -1.88e+04 -5672.737
Model_Probe -5976.1594 3298.962 -1.812 0.070 -1.24e+04 490.453
Model_Protege -5851.7125 2628.688 -2.226 0.026 -1.1e+04 -698.969
Model_Protege5 -4983.8724 5236.561 -0.952 0.341 -1.52e+04 5280.813
Model_Prowler 5712.3133 4778.000 1.196 0.232 -3653.503 1.51e+04
Model_Pulsar -1575.8871 7249.402 -0.217 0.828 -1.58e+04 1.26e+04
Model_Q3 1544.2599 3545.293 0.436 0.663 -5405.209 8493.729
Model_Q40 -1.489e+04 5453.553 -2.730 0.006 -2.56e+04 -4196.094
Model_Q45 1.134e+04 4189.839 2.708 0.007 3131.096 1.96e+04
Model_Q5 1.004e+04 3357.402 2.990 0.003 3457.062 1.66e+04
Model_Q50 -5942.4857 2488.843 -2.388 0.017 -1.08e+04 -1063.866
Model_Q60 Convertible -1301.1088 3687.387 -0.353 0.724 -8529.108 5926.891
Model_Q60 Coupe -2820.6768 2827.677 -0.998 0.319 -8363.478 2722.125
Model_Q7 1.39e+04 3492.407 3.980 0.000 7054.181 2.07e+04
Model_Q70 -447.3480 2541.894 -0.176 0.860 -5429.959 4535.263
Model_QX -1864.0524 4108.921 -0.454 0.650 -9918.342 6190.238
Model_QX4 -2027.6247 3794.643 -0.534 0.593 -9465.868 5410.618
Model_QX50 -1.707e+04 3282.311 -5.200 0.000 -2.35e+04 -1.06e+04
Model_QX56 2126.9897 3609.277 0.589 0.556 -4947.900 9201.880
Model_QX60 -3824.2082 3057.790 -1.251 0.211 -9818.075 2169.658
Model_QX70 -6321.2750 3575.790 -1.768 0.077 -1.33e+04 687.974
Model_QX80 1824.9559 3385.079 0.539 0.590 -4810.462 8460.374
Model_Quattroporte 4941.4690 5921.859 0.834 0.404 -6666.534 1.65e+04
Model_Quest 8889.1278 4265.761 2.084 0.037 527.401 1.73e+04
Model_R-Class -1.659e+04 3134.073 -5.294 0.000 -2.27e+04 -1.04e+04
Model_R32 -5058.8065 7395.470 -0.684 0.494 -1.96e+04 9437.764
Model_R8 7.984e+04 3443.482 23.185 0.000 7.31e+04 8.66e+04
Model_RAM 150 -1.86e+04 4531.071 -4.106 0.000 -2.75e+04 -9720.899
Model_RAM 250 -1.959e+04 4440.781 -4.411 0.000 -2.83e+04 -1.09e+04
Model_RAV4 -1222.3593 1557.203 -0.785 0.432 -4274.783 1830.064
Model_RAV4 EV 1.29e+04 6313.465 2.043 0.041 520.769 2.53e+04
Model_RAV4 Hybrid 855.1799 3229.060 0.265 0.791 -5474.409 7184.769
Model_RC 200t -8219.5141 5069.598 -1.621 0.105 -1.82e+04 1717.890
Model_RC 300 -1.153e+04 5065.455 -2.276 0.023 -2.15e+04 -1601.995
Model_RC 350 -1.176e+04 3036.022 -3.874 0.000 -1.77e+04 -5811.516
Model_RC F -1.574e+04 4184.607 -3.762 0.000 -2.39e+04 -7541.489
Model_RDX -1.182e+04 1710.819 -6.909 0.000 -1.52e+04 -8466.346
Model_RL 4561.7908 2457.248 1.856 0.063 -254.897 9378.479
Model_RLX 5113.0781 2263.681 2.259 0.024 675.821 9550.336
Model_RS 4 2.05e+04 4994.657 4.105 0.000 1.07e+04 3.03e+04
Model_RS 5 6877.1486 4260.223 1.614 0.106 -1473.723 1.52e+04
Model_RS 6 3.154e+04 7624.190 4.136 0.000 1.66e+04 4.65e+04
Model_RS 7 2.215e+04 5205.010 4.256 0.000 1.19e+04 3.24e+04
Model_RSX -1.223e+04 2075.918 -5.894 0.000 -1.63e+04 -8165.318
Model_RX 300 -8457.1160 3031.784 -2.789 0.005 -1.44e+04 -2514.225
Model_RX 330 -9289.7511 3001.332 -3.095 0.002 -1.52e+04 -3406.553
Model_RX 350 -1.123e+04 2274.406 -4.937 0.000 -1.57e+04 -6770.389
Model_RX 400h -5295.0538 3003.875 -1.763 0.078 -1.12e+04 593.129
Model_RX 450h -6036.3818 2854.888 -2.114 0.035 -1.16e+04 -440.242
Model_RX-7 -1741.4610 4692.174 -0.371 0.711 -1.09e+04 7456.119
Model_RX-8 5787.5040 2696.665 2.146 0.032 501.513 1.11e+04
Model_Rabbit -1.319e+04 5838.965 -2.259 0.024 -2.46e+04 -1745.935
Model_Raider -7074.9759 2311.784 -3.060 0.002 -1.16e+04 -2543.426
Model_Rainier -854.0842 2904.857 -0.294 0.769 -6548.173 4840.005
Model_Rally Wagon 2929.2805 4942.627 0.593 0.553 -6759.236 1.26e+04
Model_Ram 50 Pickup -1.422e+04 4585.638 -3.102 0.002 -2.32e+04 -5233.783
Model_Ram Cargo -1.12e+04 4456.287 -2.514 0.012 -1.99e+04 -2469.363
Model_Ram Pickup 1500 -1.239e+04 3792.530 -3.266 0.001 -1.98e+04 -4952.867
Model_Ram Van -2.76e+04 4541.865 -6.078 0.000 -3.65e+04 -1.87e+04
Model_Ram Wagon -1.645e+04 5171.735 -3.181 0.001 -2.66e+04 -6313.249
Model_Ramcharger -1.518e+04 5847.886 -2.596 0.009 -2.66e+04 -3718.005
Model_Range Rover 3.16e+04 1974.910 16.003 0.000 2.77e+04 3.55e+04
Model_Range Rover Evoque -7069.1429 1919.384 -3.683 0.000 -1.08e+04 -3306.774
Model_Range Rover Sport -1904.5533 1939.169 -0.982 0.326 -5705.705 1896.599
Model_Ranger -311.4846 1685.089 -0.185 0.853 -3614.589 2991.620
Model_Rapide 1.027e+04 3554.144 2.889 0.004 3302.327 1.72e+04
Model_Rapide S -1.781e+04 4066.298 -4.381 0.000 -2.58e+04 -9842.198
Model_Reatta -1.8e+04 3663.000 -4.914 0.000 -2.52e+04 -1.08e+04
Model_Regal -3517.9792 2279.214 -1.544 0.123 -7985.686 949.727
Model_Regency -1.564e+04 4881.554 -3.203 0.001 -2.52e+04 -6067.976
Model_Rendezvous -3242.3175 2899.424 -1.118 0.263 -8925.757 2441.122
Model_Reno -8240.2347 1996.303 -4.128 0.000 -1.22e+04 -4327.089
Model_Reventon 1.023e+06 6277.591 162.915 0.000 1.01e+06 1.04e+06
Model_Ridgeline -1.102e+04 2181.819 -5.052 0.000 -1.53e+04 -6744.891
Model_Rio -1.309e+04 1787.698 -7.322 0.000 -1.66e+04 -9584.748
Model_Riviera -2.132e+04 3578.051 -5.959 0.000 -2.83e+04 -1.43e+04
Model_Roadmaster -2.26e+04 2837.458 -7.965 0.000 -2.82e+04 -1.7e+04
Model_Rogue 1554.7892 2229.232 0.697 0.486 -2814.941 5924.520
Model_Rogue Select -2910.9433 3816.582 -0.763 0.446 -1.04e+04 4570.306
Model_Rondo -6158.9060 1997.234 -3.084 0.002 -1.01e+04 -2243.937
Model_Routan 1105.6252 6623.958 0.167 0.867 -1.19e+04 1.41e+04
Model_S-10 -1.197e+04 2001.302 -5.979 0.000 -1.59e+04 -8043.581
Model_S-10 Blazer -1.935e+04 3129.798 -6.181 0.000 -2.55e+04 -1.32e+04
Model_S-15 1.387e+04 4229.162 3.279 0.001 5575.353 2.22e+04
Model_S-15 Jimmy 1.598e+04 3889.237 4.108 0.000 8354.973 2.36e+04
Model_S-Class 4.323e+04 1894.892 22.816 0.000 3.95e+04 4.69e+04
Model_S2000 5904.5165 2845.525 2.075 0.038 326.729 1.15e+04
Model_S3 4987.6116 4306.613 1.158 0.247 -3454.193 1.34e+04
Model_S4 9840.5744 3707.649 2.654 0.008 2572.856 1.71e+04
Model_S40 -1809.8580 8054.125 -0.225 0.822 -1.76e+04 1.4e+04
Model_S5 1.134e+04 3970.103 2.857 0.004 3558.621 1.91e+04
Model_S6 9617.8437 4491.461 2.141 0.032 813.700 1.84e+04
Model_S60 2548.4420 7767.467 0.328 0.743 -1.27e+04 1.78e+04
Model_S60 Cross Country 7025.9078 1.05e+04 0.672 0.502 -1.35e+04 2.75e+04
Model_S7 1.655e+04 4778.958 3.463 0.001 7181.699 2.59e+04
Model_S70 -1.986e+04 7743.799 -2.564 0.010 -3.5e+04 -4676.059
Model_S8 2.728e+04 4777.932 5.710 0.000 1.79e+04 3.66e+04
Model_S80 6456.4802 8040.393 0.803 0.422 -9304.264 2.22e+04
Model_S90 3894.0124 8249.331 0.472 0.637 -1.23e+04 2.01e+04
Model_SC 300 -3.31e+04 4200.621 -7.880 0.000 -4.13e+04 -2.49e+04
Model_SC 400 -3.833e+04 4199.452 -9.127 0.000 -4.66e+04 -3.01e+04
Model_SC 430 8262.4433 4167.462 1.983 0.047 93.403 1.64e+04
Model_SL-Class 2.948e+04 2375.544 12.409 0.000 2.48e+04 3.41e+04
Model_SLC-Class -2.224e+04 5109.162 -4.354 0.000 -3.23e+04 -1.22e+04
Model_SLK-Class -1.988e+04 2621.874 -7.581 0.000 -2.5e+04 -1.47e+04
Model_SLR McLaren 3.589e+05 4195.964 85.535 0.000 3.51e+05 3.67e+05
Model_SLS AMG 7.185e+04 4191.832 17.141 0.000 6.36e+04 8.01e+04
Model_SLS AMG GT 9.076e+04 3372.872 26.907 0.000 8.41e+04 9.74e+04
Model_SLS AMG GT Final Edition 9.795e+04 5106.940 19.179 0.000 8.79e+04 1.08e+05
Model_SLX -3.199e+04 3558.009 -8.990 0.000 -3.9e+04 -2.5e+04
Model_SQ5 9976.0264 4133.944 2.413 0.016 1872.687 1.81e+04
Model_SRT Viper -319.8561 5603.341 -0.057 0.954 -1.13e+04 1.07e+04
Model_SRX -3932.5893 1751.713 -2.245 0.025 -7366.290 -498.889
Model_SS -1.388e+04 4328.610 -3.206 0.001 -2.24e+04 -5391.483
Model_SSR -6005.8802 4362.049 -1.377 0.169 -1.46e+04 2544.590
Model_STS 8844.8959 2322.667 3.808 0.000 4292.013 1.34e+04
Model_STS-V 1.071e+04 4086.957 2.621 0.009 2700.470 1.87e+04
Model_SVX -1.681e+04 2755.824 -6.101 0.000 -2.22e+04 -1.14e+04
Model_SX4 -8137.7835 1621.759 -5.018 0.000 -1.13e+04 -4958.818
Model_Safari 2.912e+04 5306.020 5.487 0.000 1.87e+04 3.95e+04
Model_Safari Cargo 3.068e+04 5517.567 5.560 0.000 1.99e+04 4.15e+04
Model_Samurai -1.634e+04 3895.736 -4.194 0.000 -2.4e+04 -8703.192
Model_Santa Fe -2916.6799 1854.053 -1.573 0.116 -6550.987 717.628
Model_Santa Fe Sport -2611.7869 1963.983 -1.330 0.184 -6461.577 1238.004
Model_Savana 1.646e+04 4815.000 3.419 0.001 7022.706 2.59e+04
Model_Savana Cargo 1.379e+04 4788.430 2.880 0.004 4406.014 2.32e+04
Model_Scoupe -1.043e+04 3143.813 -3.317 0.001 -1.66e+04 -4264.800
Model_Sebring -8766.3300 3647.681 -2.403 0.016 -1.59e+04 -1616.160
Model_Sedona -502.0923 4143.195 -0.121 0.904 -8623.567 7619.382
Model_Sentra -2336.3333 2446.492 -0.955 0.340 -7131.937 2459.270
Model_Sephia -9144.6454 2980.684 -3.068 0.002 -1.5e+04 -3301.921
Model_Sequoia 5962.6236 1791.976 3.327 0.001 2449.999 9475.248
Model_Seville 7551.0906 3237.314 2.333 0.020 1205.322 1.39e+04
Model_Shadow -1.274e+04 5014.385 -2.540 0.011 -2.26e+04 -2908.801
Model_Shelby GT350 -7641.9247 3156.927 -2.421 0.016 -1.38e+04 -1453.730
Model_Shelby GT500 -3.998e+04 3483.549 -11.477 0.000 -4.68e+04 -3.32e+04
Model_Sidekick -1.606e+04 1732.997 -9.266 0.000 -1.95e+04 -1.27e+04
Model_Sienna 4094.2276 4159.211 0.984 0.325 -4058.641 1.22e+04
Model_Sierra 1500 2.027e+04 3325.383 6.097 0.000 1.38e+04 2.68e+04
Model_Sierra 1500 Classic 1.677e+04 2936.011 5.711 0.000 1.1e+04 2.25e+04
Model_Sierra 1500 Hybrid 2.343e+04 3644.550 6.430 0.000 1.63e+04 3.06e+04
Model_Sierra 1500HD 1.819e+04 3931.248 4.626 0.000 1.05e+04 2.59e+04
Model_Sierra C3 2.615e+04 7429.015 3.520 0.000 1.16e+04 4.07e+04
Model_Sierra Classic 1500 2873.2521 4270.203 0.673 0.501 -5497.182 1.12e+04
Model_Sigma -8541.2755 7001.327 -1.220 0.223 -2.23e+04 5182.697
Model_Silhouette 1.284e+04 4143.129 3.100 0.002 4722.274 2.1e+04
Model_Silver Seraph -7.215e+04 4821.699 -14.964 0.000 -8.16e+04 -6.27e+04
Model_Silverado 1500 -1.411e+04 1782.018 -7.920 0.000 -1.76e+04 -1.06e+04
Model_Silverado 1500 Classic -1.688e+04 1784.263 -9.463 0.000 -2.04e+04 -1.34e+04
Model_Silverado 1500 Hybrid -1.058e+04 2584.297 -4.092 0.000 -1.56e+04 -5509.714
Model_Sixty Special -2.741e+04 7085.070 -3.869 0.000 -4.13e+04 -1.35e+04
Model_Skylark -1.67e+04 2752.404 -6.066 0.000 -2.21e+04 -1.13e+04
Model_Solstice -3207.2485 2502.009 -1.282 0.200 -8111.677 1697.180
Model_Sonata -2631.7164 1824.247 -1.443 0.149 -6207.598 944.166
Model_Sonata Hybrid 1230.6205 3062.960 0.402 0.688 -4773.380 7234.621
Model_Sonic -1.714e+04 1791.524 -9.566 0.000 -2.06e+04 -1.36e+04
Model_Sonoma 2.029e+04 3154.740 6.431 0.000 1.41e+04 2.65e+04
Model_Sorento -2785.7455 1326.785 -2.100 0.036 -5386.503 -184.988
Model_Soul -1.113e+04 2204.278 -5.048 0.000 -1.54e+04 -6805.778
Model_Soul EV -4489.2907 5363.485 -0.837 0.403 -1.5e+04 6024.190
Model_Spark -2.312e+04 2295.416 -10.071 0.000 -2.76e+04 -1.86e+04
Model_Spark EV -1.717e+04 5523.384 -3.109 0.002 -2.8e+04 -6344.650
Model_Spectra -7514.7144 1633.146 -4.601 0.000 -1.07e+04 -4313.429
Model_Spirit -1.228e+04 5871.612 -2.091 0.037 -2.38e+04 -765.650
Model_Sportage -6712.4776 1820.623 -3.687 0.000 -1.03e+04 -3143.699
Model_Sportvan -3.05e+04 4502.495 -6.774 0.000 -3.93e+04 -2.17e+04
Model_Spyder -1.549e+04 6153.534 -2.517 0.012 -2.75e+04 -3425.288
Model_Stanza -904.8963 3886.231 -0.233 0.816 -8522.670 6712.877
Model_Stealth -1.387e+04 5162.647 -2.687 0.007 -2.4e+04 -3754.707
Model_Stratus 485.3919 4685.037 0.104 0.917 -8698.198 9668.981
Model_Suburban 3966.9170 1704.826 2.327 0.020 625.124 7308.710
Model_Sunbird -1.375e+04 2272.058 -6.053 0.000 -1.82e+04 -9298.968
Model_Sundance -7654.4349 4724.893 -1.620 0.105 -1.69e+04 1607.281
Model_Sunfire -6995.1226 3269.093 -2.140 0.032 -1.34e+04 -587.060
Model_Superamerica 2.422e+04 4866.398 4.976 0.000 1.47e+04 3.38e+04
Model_Supersports Convertible ISR -4.176e+04 7442.525 -5.612 0.000 -5.64e+04 -2.72e+04
Model_Supra 3463.6133 3167.607 1.093 0.274 -2745.516 9672.743
Model_Swift -1.266e+04 2940.974 -4.304 0.000 -1.84e+04 -6892.867
Model_Syclone 1.048e+04 7389.569 1.418 0.156 -4003.726 2.5e+04
Model_T100 -1.677e+04 2170.160 -7.726 0.000 -2.1e+04 -1.25e+04
Model_TC -2.456e+04 5721.628 -4.292 0.000 -3.58e+04 -1.33e+04
Model_TL -5893.7952 1714.588 -3.437 0.001 -9254.723 -2532.867
Model_TLX -9083.9467 1871.007 -4.855 0.000 -1.28e+04 -5416.407
Model_TSX -7318.5437 1948.468 -3.756 0.000 -1.11e+04 -3499.165
Model_TSX Sport Wagon -6745.2858 3014.661 -2.237 0.025 -1.27e+04 -835.959
Model_TT 2963.5479 4287.950 0.691 0.489 -5441.674 1.14e+04
Model_TT RS 1.735e+04 5880.296 2.950 0.003 5819.930 2.89e+04
Model_TTS 1.02e+04 4774.494 2.136 0.033 840.047 1.96e+04
Model_Tacoma -8871.6472 1786.167 -4.967 0.000 -1.24e+04 -5370.410
Model_Tahoe 1297.5840 2176.609 0.596 0.551 -2968.995 5564.163
Model_Tahoe Hybrid 4860.8629 3236.552 1.502 0.133 -1483.412 1.12e+04
Model_Tahoe Limited/Z71 -3.139e+04 5355.067 -5.861 0.000 -4.19e+04 -2.09e+04
Model_Taurus 3552.5668 2009.682 1.768 0.077 -386.804 7491.938
Model_Taurus X 7902.9242 2353.857 3.357 0.001 3288.903 1.25e+04
Model_Tempo -2663.5800 3006.554 -0.886 0.376 -8557.014 3229.854
Model_Tercel -1.118e+04 2939.075 -3.805 0.000 -1.69e+04 -5422.791
Model_Terrain 2.549e+04 3114.212 8.187 0.000 1.94e+04 3.16e+04
Model_Terraza 2596.5818 4288.599 0.605 0.545 -5809.913 1.1e+04
Model_Thunderbird 1.125e+04 2813.556 3.997 0.000 5730.050 1.68e+04
Model_Tiburon -4526.8179 1853.820 -2.442 0.015 -8160.668 -892.968
Model_Tiguan -7255.2987 5737.694 -1.264 0.206 -1.85e+04 3991.706
Model_Titan -6838.4376 2645.306 -2.585 0.010 -1.2e+04 -1653.120
Model_Toronado -1.084e+04 4037.385 -2.684 0.007 -1.88e+04 -2922.016
Model_Torrent -5093.0362 2437.502 -2.089 0.037 -9871.017 -315.055
Model_Touareg 8560.5889 5787.862 1.479 0.139 -2784.754 1.99e+04
Model_Touareg 2 3747.5116 6124.145 0.612 0.541 -8257.013 1.58e+04
Model_Town Car 5.392e+04 3317.034 16.257 0.000 4.74e+04 6.04e+04
Model_Town and Country -3991.5621 5271.696 -0.757 0.449 -1.43e+04 6341.994
Model_Tracker -1.043e+04 2413.813 -4.323 0.000 -1.52e+04 -5702.525
Model_TrailBlazer -1.103e+04 1968.636 -5.602 0.000 -1.49e+04 -7168.998
Model_TrailBlazer EXT -7273.8578 2659.639 -2.735 0.006 -1.25e+04 -2060.445
Model_Trans Sport -1.585e+04 4397.099 -3.605 0.000 -2.45e+04 -7230.582
Model_Transit Connect 6729.0682 3859.820 1.743 0.081 -836.935 1.43e+04
Model_Transit Wagon 1956.6327 3402.060 0.575 0.565 -4712.071 8625.336
Model_Traverse -7836.3791 1907.681 -4.108 0.000 -1.16e+04 -4096.951
Model_Trax -1.588e+04 2158.291 -7.355 0.000 -2.01e+04 -1.16e+04
Model_Tribeca -2037.5493 3113.260 -0.654 0.513 -8140.149 4065.050
Model_Tribute -6904.8873 1882.421 -3.668 0.000 -1.06e+04 -3214.973
Model_Tribute Hybrid -136.6361 2928.529 -0.047 0.963 -5877.126 5603.854
Model_Truck -9119.4585 1516.283 -6.014 0.000 -1.21e+04 -6147.247
Model_Tucson -8014.5433 1695.435 -4.727 0.000 -1.13e+04 -4691.158
Model_Tundra -1.602e+04 1741.079 -9.203 0.000 -1.94e+04 -1.26e+04
Model_Typhoon 1.335e+04 5729.522 2.330 0.020 2117.196 2.46e+04
Model_Uplander -4627.6946 4183.113 -1.106 0.269 -1.28e+04 3572.026
Model_V12 Vanquish 4.478e+04 3471.997 12.897 0.000 3.8e+04 5.16e+04
Model_V12 Vantage -1.796e+04 3492.722 -5.141 0.000 -2.48e+04 -1.11e+04
Model_V12 Vantage S -4.166e+04 4045.337 -10.298 0.000 -4.96e+04 -3.37e+04
Model_V40 58.6781 8387.084 0.007 0.994 -1.64e+04 1.65e+04
Model_V50 -1551.8789 8181.495 -0.190 0.850 -1.76e+04 1.45e+04
Model_V60 3231.6013 7809.118 0.414 0.679 -1.21e+04 1.85e+04
Model_V60 Cross Country 4866.2712 8187.169 0.594 0.552 -1.12e+04 2.09e+04
Model_V70 388.5196 8368.821 0.046 0.963 -1.6e+04 1.68e+04
Model_V8 -1.998e+04 4887.987 -4.087 0.000 -2.96e+04 -1.04e+04
Model_V8 Vantage -6.463e+04 1810.445 -35.699 0.000 -6.82e+04 -6.11e+04
Model_V90 -2.063e+04 1.03e+04 -1.999 0.046 -4.09e+04 -401.551
Model_Van 270.3994 6496.831 0.042 0.967 -1.25e+04 1.3e+04
Model_Vanagon -1.508e+04 7516.603 -2.006 0.045 -2.98e+04 -341.199
Model_Vandura 4129.5787 4342.870 0.951 0.342 -4383.298 1.26e+04
Model_Vanquish 7.024e+04 2650.993 26.495 0.000 6.5e+04 7.54e+04
Model_Vanwagon -4315.3589 6515.683 -0.662 0.508 -1.71e+04 8456.655
Model_Veloster -9483.5280 2037.625 -4.654 0.000 -1.35e+04 -5489.383
Model_Venture -702.6295 4190.675 -0.168 0.867 -8917.174 7511.914
Model_Venza 3942.6831 1735.417 2.272 0.023 540.926 7344.440
Model_Veracruz -87.8289 2068.162 -0.042 0.966 -4141.831 3966.173
Model_Verano -7289.8133 2358.712 -3.091 0.002 -1.19e+04 -2666.276
Model_Verona -2698.1187 2434.873 -1.108 0.268 -7470.946 2074.709
Model_Versa -8079.5541 2546.041 -3.173 0.002 -1.31e+04 -3088.814
Model_Versa Note -7301.2561 2598.885 -2.809 0.005 -1.24e+04 -2206.933
Model_Veyron 16.4 6.922e+05 3637.595 190.291 0.000 6.85e+05 6.99e+05
Model_Vibe -7911.7489 2688.313 -2.943 0.003 -1.32e+04 -2642.129
Model_Vigor -2.14e+04 4082.171 -5.242 0.000 -2.94e+04 -1.34e+04
Model_Viper -5478.9419 4818.341 -1.137 0.256 -1.49e+04 3965.950
Model_Virage 9369.8515 4787.657 1.957 0.050 -14.894 1.88e+04
Model_Vitara -4263.7013 1875.648 -2.273 0.023 -7940.339 -587.064
Model_Voyager -7322.7481 5714.577 -1.281 0.200 -1.85e+04 3878.942
Model_WRX -1881.8088 1870.918 -1.006 0.315 -5549.174 1785.556
Model_Windstar 1.642e+04 4133.749 3.972 0.000 8314.357 2.45e+04
Model_Windstar Cargo 1.228e+04 5765.948 2.129 0.033 974.800 2.36e+04
Model_Wraith -7.142e+04 4148.676 -17.216 0.000 -7.96e+04 -6.33e+04
Model_X-90 -1.416e+04 3179.579 -4.454 0.000 -2.04e+04 -7930.280
Model_X1 -1.882e+04 3641.154 -5.168 0.000 -2.6e+04 -1.17e+04
Model_X3 -1.226e+04 3023.142 -4.054 0.000 -1.82e+04 -6329.807
Model_X4 -8311.1132 3477.253 -2.390 0.017 -1.51e+04 -1495.017
Model_X5 -3476.6013 3014.214 -1.153 0.249 -9385.051 2431.849
Model_X5 M -7987.7850 4673.345 -1.709 0.087 -1.71e+04 1172.887
Model_X6 817.6930 3231.291 0.253 0.800 -5516.270 7151.656
Model_X6 M -4587.7850 4673.345 -0.982 0.326 -1.37e+04 4572.887
Model_XC 8400.7091 1.03e+04 0.812 0.417 -1.19e+04 2.87e+04
Model_XC60 2038.5189 7723.952 0.264 0.792 -1.31e+04 1.72e+04
Model_XC70 3116.4594 7825.969 0.398 0.690 -1.22e+04 1.85e+04
Model_XC90 7137.6710 7883.778 0.905 0.365 -8316.078 2.26e+04
Model_XG300 4931.3553 4934.727 0.999 0.318 -4741.676 1.46e+04
Model_XG350 3433.5025 2933.017 1.171 0.242 -2315.785 9182.790
Model_XL-7 -780.9299 1469.636 -0.531 0.595 -3661.704 2099.844
Model_XL7 -1952.5671 1394.892 -1.400 0.162 -4686.828 781.694
Model_XLR 3.031e+04 2820.946 10.744 0.000 2.48e+04 3.58e+04
Model_XLR-V 3.092e+04 3631.263 8.516 0.000 2.38e+04 3.8e+04
Model_XT -1.106e+04 4093.781 -2.702 0.007 -1.91e+04 -3037.430
Model_XT5 -2273.7220 3004.936 -0.757 0.449 -8163.985 3616.541
Model_XTS 5534.1500 1657.966 3.338 0.001 2284.212 8784.088
Model_XV Crosstrek -7724.6162 2031.091 -3.803 0.000 -1.17e+04 -3743.279
Model_Xterra -567.9202 2178.321 -0.261 0.794 -4837.856 3702.016
Model_Yaris -1.296e+04 1850.016 -7.005 0.000 -1.66e+04 -9332.543
Model_Yaris iA -1.169e+04 5034.211 -2.322 0.020 -2.16e+04 -1823.275
Model_Yukon 3.457e+04 3295.285 10.492 0.000 2.81e+04 4.1e+04
Model_Yukon Denali 1454.0864 7457.491 0.195 0.845 -1.32e+04 1.61e+04
Model_Yukon Hybrid 4.281e+04 3375.931 12.681 0.000 3.62e+04 4.94e+04
Model_Yukon XL 3.725e+04 3294.053 11.307 0.000 3.08e+04 4.37e+04
Model_Z3 -1.747e+04 3133.168 -5.575 0.000 -2.36e+04 -1.13e+04
Model_Z4 -4503.2799 3193.990 -1.410 0.159 -1.08e+04 1757.567
Model_Z4 M -1692.8037 4056.365 -0.417 0.676 -9644.074 6258.467
Model_Z8 6.67e+04 4558.143 14.633 0.000 5.78e+04 7.56e+04
Model_ZDX 2208.2458 2807.982 0.786 0.432 -3295.950 7712.441
Model_Zephyr 3.972e+04 7287.768 5.450 0.000 2.54e+04 5.4e+04
Model_allroad 1.209e+04 3974.600 3.042 0.002 4300.671 1.99e+04
Model_allroad quattro 1.398e+04 3716.910 3.762 0.000 6696.257 2.13e+04
Model_e-Golf -1.016e+04 8074.348 -1.258 0.208 -2.6e+04 5668.882
Model_i-MiEV -1.446e+04 6069.106 -2.383 0.017 -2.64e+04 -2565.293
Model_i3 -1.153e+04 6359.136 -1.814 0.070 -2.4e+04 930.301
Model_iA -1.921e+04 4713.862 -4.074 0.000 -2.84e+04 -9964.967
Model_iM -1.701e+04 4699.879 -3.618 0.000 -2.62e+04 -7792.638
Model_iQ -2.076e+04 3519.450 -5.898 0.000 -2.77e+04 -1.39e+04
Model_tC -1.309e+04 2280.205 -5.742 0.000 -1.76e+04 -8623.135
Model_xA -1.607e+04 2826.893 -5.684 0.000 -2.16e+04 -1.05e+04
Model_xB -1.502e+04 2533.439 -5.930 0.000 -2e+04 -1.01e+04
Model_xD -1.716e+04 2403.513 -7.138 0.000 -2.19e+04 -1.24e+04
Engine Fuel Type_diesel -1.311e+05 1.58e+04 -8.307 0.000 -1.62e+05 -1e+05
Engine Fuel Type_electric -1.211e+05 1.69e+04 -7.172 0.000 -1.54e+05 -8.8e+04
Engine Fuel Type_flex-fuel (premium unleaded recommended/E85) -1.354e+05 1.6e+04 -8.448 0.000 -1.67e+05 -1.04e+05
Engine Fuel Type_flex-fuel (premium unleaded required/E85) -1.375e+05 1.58e+04 -8.686 0.000 -1.69e+05 -1.06e+05
Engine Fuel Type_flex-fuel (unleaded/E85) -1.361e+05 1.58e+04 -8.608 0.000 -1.67e+05 -1.05e+05
Engine Fuel Type_flex-fuel (unleaded/natural gas) -1.321e+05 1.62e+04 -8.155 0.000 -1.64e+05 -1e+05
Engine Fuel Type_natural gas -1.311e+05 1.65e+04 -7.954 0.000 -1.63e+05 -9.88e+04
Engine Fuel Type_premium unleaded (recommended) -1.342e+05 1.58e+04 -8.481 0.000 -1.65e+05 -1.03e+05
Engine Fuel Type_premium unleaded (required) -1.346e+05 1.58e+04 -8.523 0.000 -1.66e+05 -1.04e+05
Engine Fuel Type_regular unleaded -1.353e+05 1.58e+04 -8.561 0.000 -1.66e+05 -1.04e+05
Transmission Type_AUTOMATED_MANUAL -3.297e+05 3.94e+04 -8.378 0.000 -4.07e+05 -2.53e+05
Transmission Type_AUTOMATIC -3.337e+05 3.94e+04 -8.480 0.000 -4.11e+05 -2.57e+05
Transmission Type_DIRECT_DRIVE -3.297e+05 3.95e+04 -8.343 0.000 -4.07e+05 -2.52e+05
Transmission Type_MANUAL -3.354e+05 3.93e+04 -8.524 0.000 -4.12e+05 -2.58e+05
Driven_Wheels_all wheel drive -3.309e+05 3.93e+04 -8.414 0.000 -4.08e+05 -2.54e+05
Driven_Wheels_four wheel drive -3.311e+05 3.93e+04 -8.423 0.000 -4.08e+05 -2.54e+05
Driven_Wheels_front wheel drive -3.329e+05 3.93e+04 -8.465 0.000 -4.1e+05 -2.56e+05
Driven_Wheels_rear wheel drive -3.336e+05 3.93e+04 -8.487 0.000 -4.11e+05 -2.57e+05
Vehicle Size_Compact -4.432e+05 5.24e+04 -8.461 0.000 -5.46e+05 -3.41e+05
Vehicle Size_Large -4.417e+05 5.25e+04 -8.419 0.000 -5.45e+05 -3.39e+05
Vehicle Size_Midsize -4.436e+05 5.24e+04 -8.461 0.000 -5.46e+05 -3.41e+05
Vehicle Style_2dr Hatchback -8.375e+04 1.01e+04 -8.310 0.000 -1.04e+05 -6.4e+04
Vehicle Style_2dr SUV -8.441e+04 1.04e+04 -8.128 0.000 -1.05e+05 -6.41e+04
Vehicle Style_4dr Hatchback -8.582e+04 1.01e+04 -8.527 0.000 -1.06e+05 -6.61e+04
Vehicle Style_4dr SUV -8.456e+04 1.03e+04 -8.249 0.000 -1.05e+05 -6.45e+04
Vehicle Style_Cargo Minivan -9.065e+04 1.14e+04 -7.965 0.000 -1.13e+05 -6.83e+04
Vehicle Style_Cargo Van -7.634e+04 8939.359 -8.539 0.000 -9.39e+04 -5.88e+04
Vehicle Style_Convertible -7.739e+04 1.01e+04 -7.683 0.000 -9.71e+04 -5.76e+04
Vehicle Style_Convertible SUV -8.242e+04 1.04e+04 -7.931 0.000 -1.03e+05 -6.21e+04
Vehicle Style_Coupe -8.549e+04 1.01e+04 -8.496 0.000 -1.05e+05 -6.58e+04
Vehicle Style_Crew Cab Pickup -7.797e+04 9324.862 -8.362 0.000 -9.63e+04 -5.97e+04
Vehicle Style_Extended Cab Pickup -8.08e+04 9318.610 -8.671 0.000 -9.91e+04 -6.25e+04
Vehicle Style_Passenger Minivan -8.786e+04 1.13e+04 -7.789 0.000 -1.1e+05 -6.58e+04
Vehicle Style_Passenger Van -7.63e+04 8989.535 -8.488 0.000 -9.39e+04 -5.87e+04
Vehicle Style_Regular Cab Pickup -8.086e+04 9333.654 -8.663 0.000 -9.92e+04 -6.26e+04
Vehicle Style_Sedan -8.728e+04 1e+04 -8.697 0.000 -1.07e+05 -6.76e+04
Vehicle Style_Wagon -8.661e+04 1e+04 -8.619 0.000 -1.06e+05 -6.69e+04
Omnibus: 12341.470 Durbin-Watson: 2.356
Prob(Omnibus): 0.000 Jarque-Bera (JB): 148226190.597
Skew: 4.098 Prob(JB): 0.00
Kurtosis: 566.550 Cond. No. 1.26e+22



Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
[2] The smallest eigenvalue is 7.9e-31. This might indicate that there are
strong multicollinearity problems or that the design matrix is singular.

Plotting true msrp vs the predicted msrp to evalate

X = df[['Driven_Wheels_all wheel drive','Driven_Wheels_front wheel drive',
        'Driven_Wheels_rear wheel drive','Engine Cylinders']].values
y = df['MSRP'].values

model =RandomForestRegressor()
model.fit(X, y)

y_pred = model.predict(X)
df['y_pred'] = y_pred
sns.lmplot(x='MSRP', y='y_pred', data=df)
<seaborn.axisgrid.FacetGrid at 0x1a19232b70>

png

Future interests

Other info

#Get examples from ebay and see if I can predict price or correct price. 
# Against my price? 
# Create another model for outliers 
# Classification for normal cars vs outliers(determine higher prices)
Written on September 30, 2018