Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created March 16, 2020 11:15
Show Gist options
  • Save aniruddha27/5a04e26a85e85707cd656af7dd524a15 to your computer and use it in GitHub Desktop.
Save aniruddha27/5a04e26a85e85707cd656af7dd524a15 to your computer and use it in GitHub Desktop.
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
lr = LinearRegression()
lr.fit(X_train,y_train)
rmse = np.sqrt(mean_squared_error(y_test,lr.predict(X_test)))
print(rmse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment