xxxxxxxxxx
from sklearn.model_selection import GridSearchCV
rf=RandomForestClassifier(random_state=100)
params={
'n_estimators':[350,500,1000],
'criterion' : ["gini", "entropy"]
}
gs=GridSearchCV(estimator=rf,
param_grid=params,
scoring=['accuracy','precision'],
verbose=9,
refit='precision',
cv=5
)
gs.fit(X_train,y_train)
gs.best_params_