Computer scienceData scienceInstrumentsScikit-learnTraining ML models with scikit-learnRegression in scikit-learn

Linear Regression with scikit-learn

Linear Regression model step-by-step

Report a typo

Imagine that you want to train a linear regression model with sklearn. You have some training data available, namely X_train and Y_train, as well as the new data X_new, for which you want to obtain the predictions.

Most likely, you will take the steps below. Put them in the correct order.

Put the items in the correct order
my_model.fit(X_train, Y_train)
Y_predicted = my_model.predict(X_new)
from sklearn.linear_model import LinearRegression
my_model = LinearRegression()
___

Create a free account to access the full topic