Skip to content

Commit

Permalink
EXA Fix issue in Statistical comparison of models using grid search (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
olszewskip authored Jun 21, 2021
1 parent bb6117b commit c3a3b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/model_selection/plot_grid_search_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ def corrected_std(differences, n_train, n_test):
corrected_std : int
Variance-corrected standard deviation of the set of differences.
"""
n = n_train + n_test
kr = len(differences)
corrected_var = (
np.var(differences, ddof=1) * ((1 / n) + (n_test / n_train))
np.var(differences, ddof=1) * (1 / kr + n_test / n_train)
)
corrected_std = np.sqrt(corrected_var)
return corrected_std
Expand Down

0 comments on commit c3a3b1e

Please sign in to comment.