lm_multi1.score(X1,y)
lm_multi2.score(X2,y)

sns.regplot(x = 'highway-mpg', y = 'price', data = df)
sns.regplot(x = 'peak-rpm', y = 'price', data = df)

df[['highway-mpg','peak-rpm','price']].corr()

sns.residplot(x=df['highway-mpg'],y=df['price'],lowess=True)

lm.fit(X1,y)
dir(lm)
lm._decision_function(X1)
lm.get_params(True)
lm._get_tags()

y_hat = lm.predict(X1)

def PlotPolly(model, independent_variable, dependent_variabble, Name):
    x_new = np.linspace(15, 55, 100)
    y_new = model(x_new)

    plt.plot(independent_variable, dependent_variabble, '.', x_new, y_new, '-')
    plt.title('Polynomial Fit with Matplotlib for Price ~ Length')
    ax = plt.gca()
    ax.set_facecolor((0.898, 0.898, 0.898))
    fig = plt.gcf()
    plt.xlabel(Name)
    plt.ylabel('Price of Cars')