Home:ALL Converter>PCA on the targets with sklearn?

PCA on the targets with sklearn?

Ask Time:2015-10-14T17:37:24         Author:rhombidodecahedron

Json Formatter

I am doing multiple target regression, so I want to predict several numbers simultaneously. The numbers are highly correlated, so I think predicting their PC's is a more sensible approach.

Using sklearn's Pipeline is great for daisy-chaining together the MinMaxScaler, PCA, and the regressor I want to use; and then allowing me to call that Pipeline to make predictions.

However, does that Pipeline apply PCA to the inputs only? Is it possible to use the same strategy, but also have it perform PCA on the outputs that I want to predict too?

Author:rhombidodecahedron,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/33121753/pca-on-the-targets-with-sklearn
yy