0

I am attempting to take a .dat file of about 90,000 data lines of two variables (wavelength and intensity) and apply a sklearn.pca filter to it.

Here is a small set of that data:

wavelength                intensity
   [um]                 [W/m**2/um/sr]
196.078431372549       1.108370393265022E-003
192.307692307692       1.163428008597600E-003
188.679245283019       1.223639983609668E-003

The code I am using for this single data set is as follows:

 pca= PCA(n_components=2)
pca.fit(data)
print(pca.components_)

The error code I get is this when I try to apply 2 pca components to one of the data sets:

 ValueError: Datatype coercion is not allowed

Any help resolving would be much appreciated

dom ryan
  • 27
  • 4

0 Answers0