“Importar RandomForestClassifier” Respostas de código

Sklearn Random Forest

from sklearn.ensemble import RandomForestClassifier


clf = RandomForestClassifier(max_depth=2, random_state=0)

clf.fit(X, y)

print(clf.predict([[0, 0, 0, 0]]))
vcwild

Importar RandomForestClassifier

from sklearn.ensemble import RandomForestClassifier
Frantic Flatworm

Sklearn Random Forest

from sklearn.ensemble import RandomForestClassifier
from sklearn.datasets import make_classification


X, y = make_classification(n_samples=1000, n_features=4,
                            n_informative=2, n_redundant=0,
                            random_state=0, shuffle=False)
clf = RandomForestClassifier(max_depth=2, random_state=0)

clf.fit(X, y)

print(clf.predict([[0, 0, 0, 0]]))
vcwild

Respostas semelhantes a “Importar RandomForestClassifier”

Perguntas semelhantes a “Importar RandomForestClassifier”

Mais respostas relacionadas para “Importar RandomForestClassifier” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código