Scikit-Learn also has a general class, MultiOutputRegressor, which can be used to use a single-output regression model and fit one regressor separately to each target.
Your code would then look something like this (using k-NN as example):
from sklearn.neighbors import KNeighborsRegressor
from sklearn.multioutput import MultiOutputRegressor
X = np.random.random((10,3))
y = np.random.random((10,2))
X2 = np.random.random((7,3))
knn = KNeighborsRegressor()
regr = MultiOutputRegressor(knn)
regr.fit(X,y)
regr.predict(X2)
来自:
https://stats.stackexchange.com/questions/153853/regression-with-scikit-learn-with-multiple-outputs-svr-or-gbm-possible