2 years ago
#12324

SecY
Why FactorAnalyzer can't fit dataset?
I have dataset like below(column name is secret):
9,1,11,11,4,1,25.55,25.57,25.55,25.57,25.55,1,1,1,4,2,0,1,7,1,0
9,1,11,11,3,1,25.55,25.57,25.55,25.57,25.55,1,1,1,22,2,1,1,3,0,0
9,1,11,11,2,1,25.55,25.57,25.55,25.57,25.55,0,1,1,99,3,1,0,1,0,0
9,1,11,11,2,2,43.8,43.77,43.73,43.77,43.73,0,1,1,99,1,1,0,1,0,0
9,1,11,11,2,3,13.1,13.12,13.08,13.12,13.08,0,1,1,99,1,1,0,1,0,0
...
There is no inf data or nan data.
But error is print like below:
ValueError: array must not contain infs or NaNs
what's wrong???
ADD. part of code
dataset.replace([np.inf, -np.inf], np.nan, inplace=True)
dataset.dropna(axis=1, inplace=True)
fa = FactorAnalyzer(n_factors=3, rotation=None)
fa.fit(dataset)
python
dataset
nan
inf
0 Answers
Your Answer