“Seleção de recursos Python” Respostas de código

Seleção de recursos Python

from sklearn.feature_selection import VarianceThreshold
sel = VarianceThreshold(threshold=(.05))
X = sel.fit_transform(X)
JJSSEECC

Como apresentar a seleção no Python

>>> from sklearn.datasets import load_iris
>>> from sklearn.feature_selection import SelectKBest
>>> from sklearn.feature_selection import chi2
>>> X, y = load_iris(return_X_y=True)
>>> X.shape
(150, 4)
>>> X_new = SelectKBest(chi2, k=2).fit_transform(X, y)
>>> X_new.shape
(150, 2)
Coding boy Hasya

Respostas semelhantes a “Seleção de recursos Python”

Perguntas semelhantes a “Seleção de recursos Python”

Mais respostas relacionadas para “Seleção de recursos Python” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código