问题
In linear regression I've always seen the situation where I have many features and I use them to predict a single output, for example
f1 f2 f3 f4 --> y1
f1 f2 f3 f4 --> y2
and so on... I want to know if there is something where the predicted value i.e. y1 is actually a vector not a single value
回答1:
Yes, pretty much every regression method (neural networks, support vector regressors, random forest regressors, ....) works just fine for multidimensional output. Including linear regression. In particular if y is N row and K column vector of values to predict, and X is N row, d column data matrix, linear reggresion is simply
A = (X'X)^-1 X'y
and then prediction is of form
XA
which is again N rows, K columns prediction matrix.
来源:https://stackoverflow.com/questions/36320991/predict-vector-values-instead-of-single-output