Last active
July 12, 2018 00:45
-
-
Save securetorobert/99ef19b2566805cc28ee187d86ccad73 to your computer and use it in GitHub Desktop.
Required imports for regularization tutorials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#imports | |
import numpy as np | |
import pandas as pd | |
import math | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import LinearRegression | |
from sklearn.linear_model import Ridge | |
from sklearn.linear_model import Lasso | |
from sklearn.linear_model import ElasticNet | |
from sklearn.metrics import mean_squared_error | |
from sklearn.preprocessing import PolynomialFeatures | |
from sklearn.pipeline import Pipeline | |
from sklearn.preprocessing import StandardScaler | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
sns.set() | |
%matplotlib inline | |
#import training dataset | |
train_df = pd.read_csv('train.csv', index_col='ID') | |
#see the columns in our data | |
train_df.info() | |
# take a look at the head of the dataset | |
train_df.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment