Machine Learning, Data Science, Data Scientist, Mlops, Algorithms.
model.predict(X_test) # Evaluating the model mse = mean_squared_error(y_test, y_pred) r2 = r2_score(y_test, y_pred) print("MSE is:", mse) print("R2 score is:", r2) Here is the output. These results indicate that our Linear Regression model explains about 45% of the variance in the diabetes dataset.