Horje
random forest classifier in python Code Example
random forest classifier in python
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]]))




Python

Related
python datetime get date one week from today Code Example python datetime get date one week from today Code Example
randoomforest sklearn Code Example randoomforest sklearn Code Example
Scikit learn random forest classifier Code Example Scikit learn random forest classifier Code Example
python split string in characters Code Example python split string in characters Code Example
python web crawler Code Example python web crawler Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8