1. Home >
  2. Blog >
  3. Blog Detail

Random forest classifier sklearn

May 16, 2018 from sklearn.ensemble import RandomForestClassifier #Create a Gaussian Classifier clf=RandomForestClassifier(n_estimators=100) #Train the model using the training sets y_pred=clf.predict(X_test) clf.fit(X_train,y_train) # prediction on test set y_pred=clf.predict(X_test) #Import scikit-learn metrics module for accuracy calculation from sklearn import metrics # Model Accuracy, how often is the classifier

Do you want a customized solution?

Click avatar to contact us
Hi,may I help you with products, price, etc?
Chat Online