from sklearn.linear_model import SGDRegressor X = [[0, 0], [1, 1], [2, 2]] y = [0, 1, 2] reg = SGDRegressor() reg.fit(X, y)
from sklearn.datasets import load_boston from sklearn.model_selection import cross_val_score from sklearn.linear_model import SGDRegressor boston = load_boston() X, y = boston.data, boston.target reg = SGDRegressor() scores = cross_val_score(reg, X, y, cv=5)This example loads the Boston Housing dataset, creates a SGDRegressor object, and performs a 5-fold cross-validation on the model. Overall, the SGDRegressor is a part of Scikit-learn (sklearn) library.