How can scikit-learning perform PCA on sparse data in libsvm format?

Viewed 4135

I am using scikit-learning to do some dimension reduce task. My training/test data is in the libsvm format. It is a large sparse matrix in half million columns.

I use load_svmlight_file function load the data, and by using SparsePCA, the scikit-learning throw out an exception of the input data error.

How to fix it?

1 Answers
Related