Sklearn PCA ValueError: array must not contain infs or NaNs

date
Apr 12, 2020
slug
solution-valueerror-sklearn-pca
status
Published
summary
This issue is related to Sklearn, one solution is to state a eligible Solver .
tags
Data Analysis
Academic
Sklearn
ML
Python
type
Post
When I was doing dimension reduction:
PCA(n_components=3)
Errors occured:
ValueError: array must not contain infs or NaNs

Solution

This issue is related to Sklearn, one solution is to state a eligible Solver :
PCA(n_components=3, svd_solver='full')
More discussion on StackOverflow

RSS | Reynard © 2021 - 2022

Powered byVercel