[scikit-learn] Why some regression algo can predict multiple out?

Joel Nothman joel.nothman at gmail.com
Tue Dec 11 04:54:47 EST 2018


Yes, some can use a shared model to predict multiple outputs (ElasticNet,
DecisionTreeRegressor, MLPRegressor), others can't. Those that can't can be
trivially extended to the multiple output case with MultiOutputRegressor,
by learning each output independently.

On Tue, 11 Dec 2018 at 20:11, lampahome <pahome.chen at mirlab.org> wrote:

> As title, apart from sklearn.multioutput.MultiOutputRegressor, almost
> regression algo in sklearn only can predict 1-d output.
>
> Ex: predict 1-d output
> sklearn.linear_model.SGDRegressor
> fit(X, y, coef_init=None, intercept_init=None, sample_weight=None)
> y : numpy array, shape (n_samples,)
>
> Ex: predict multiple output
> sklearn.linear_model.ElasticNet
> fit(X, y, check_input=True)
> y : ndarray, shape (n_samples,) or (n_samples, n_targets)
>
> There're two kind of output for regression methods.
>
> What's the difference?
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20181211/f1c15a96/attachment.html>


More information about the scikit-learn mailing list