Login using Social Account
     Continue with GoogleLogin using your credentials
The score we got with the SVC classifier was not that good. So now we will train and predict the dataset using a RandomForest classifier.
Import RandomForestClassifier
from sklearn:
from sklearn.ensemble import << your code goes here >>
Train and evaluate the RandomForestClassfier
:
forest_clf = << your code goes here >>(n_estimators=100, random_state=42)
forest_scores = cross_val_score(forest_clf, X_train, y_train, cv=10)
forest_scores.mean()
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...