from sklearn.linear_model import LinearRegression regressor = LinearRegression() regressor.fit(X_train, y_train)