class LinearRegressionLearner(classification.Fitter):
def fit(self, X, Y, W):
clf = LinearRegression()
return LinearRegressionPredictor(clf.fit(X, Y.reshape(-1)))
class LinearRegressionPredictor(classification.Model):
After Change
raise ValueError("Linear regression does not support "
"multi-target classification")
if np.isnan(np.sum(X)) or np.isnan(np.sum(Y)):
raise ValueError("Linear regression does not support "
"unknown values")