"how to plot graph between f1 score and random forest parameters" Code ... # Split features and target into train and test sets X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=1, stratify=y)