def predict(self,X,coef=None,intercept=None):
"""
a) do the prediction based on given coefs and intercept, if provided.
b) Scale the predictions so that they are in 0..1.
"""
if coef is not None:
assert intercept is not None
self.intercept_ = intercept
self.coef_ = coef
return scale_predictions(linear_model.SGDRegressor.predict(self,X))
评论列表
文章目录