predict vector values instead of single output

你。 提交于 2019-12-13 19:23:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!