Linear Regression

Baseline Linear Regression Model

<aside> 💡 DummyRegressor

</aside>

from sklearn.dummy import DummyRegressor

dummy_regr = DummyRegressor(strategy="mean")
dummy_regr.fit(X_train, y_train)
dummy_regr.predict(X_test)
dummy_regr.score(X_test, y_test)

SGDRegressor Estimator

from sklearn.linear_model import SGDRegressor
linear_regressor = SGDRegressor(random_state=42)

Hyperparameters

Provides greater control on optimization process through provision for hyperparameter settings.

Untitled

Shuffle training data after each epoch

from sklearn.linear_model import SGDRegressor
linear_regressor = SGDRegressor(shuffle=True)

Learning Rate