Skip to content

Instantly share code, notes, and snippets.

@omartinez182
Created September 10, 2020 19:38
Show Gist options
  • Save omartinez182/a8f236d12817152fa24e0157fe04e38a to your computer and use it in GitHub Desktop.
Save omartinez182/a8f236d12817152fa24e0157fe04e38a to your computer and use it in GitHub Desktop.
Snippet #3 - Nested Cross-Validation Article
#Define the hyperparameter grid
rf_param_grid = {'max_depth': [10, 50],
'n_estimators': [100, 200, 400]}
#Create arrays to store the scores
outer_scores = np.zeros(rounds)
nested_scores = np.zeros(rounds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment