Hello all,
I have a complex valued array that I would like to do PCA on, but I am
running into an issue where
sklearn is casting the complex128 array as a float64.
X = np.random.random((30, 50)) + 1j * np.random.random((30, 50))
pca = RandomizedPCA()
pca.fit(X)
ComplexWarning: Casting complex values to real discards the imaginary
part
It looks like it is coming form the following lines of code.
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/pca.py#L639
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/validation.py#L101
Is there a way to do PCA on complex valued array with sklearn?
Thanks,
David
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general