Hi ,
I have tried training with different parameters but the max score im able to achieve is 82%.
Please see my training code below:
param_grid = { “criterion” : [“entropy”], “min_samples_leaf” : [1, 5, 10, 15, 20], “min_samples_split” : [2, 4, 7,10, 12, 16, 18, 25, 35], “n_estimators”: [5,10,15,20,25,30]}
from sklearn.model_selection import GridSearchCV, cross_val_score
rf = RandomForestClassifier(n_estimators=10, max_features=‘auto’)
clf = GridSearchCV(estimator=rf, param_grid=param_grid)
clf.fit(X, Y)
clf.best_params_
Then taking the best parameters to train the model and using that model for predictions
random_forest = RandomForestClassifier(criterion = “entropy”,
min_samples_leaf = 1,
min_samples_split = 12,
n_estimators=20,
max_features=‘auto’)
random_forest.fit(X, Y)
Y_prediction = random_forest.predict(X_test)
random_forest.score(X, Y)
YPredForest = random_forest.predict(X_test)