8000 DOC Fix FutureWarning in plot_successive_halving_heatmap.html (#24968) · scikit-learn/scikit-learn@43550f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 43550f0

Browse files
DOC Fix FutureWarning in plot_successive_halving_heatmap.html (#24968)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent 68a7427 commit 43550f0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/model_selection/plot_successive_halving_heatmap.py

Lines changed: 4 additions & 2 deletions
Original fil 8000 e line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@
5454

5555
def make_heatmap(ax, gs, is_sh=False, make_cbar=False):
5656
"""Helper to make a heatmap."""
57-
results = pd.DataFrame.from_dict(gs.cv_results_)
58-
results["params_str"] = results.params.apply(str)
57+
results = pd.DataFrame(gs.cv_results_)
58+
results[["param_C", "param_gamma"]] = results[["param_C", "param_gamma"]].astype(
59+
np.float64
60+
)
5961
if is_sh:
6062
# SH dataframe: get mean_test_score values for the highest iter
6163
scores_matrix = results.sort_values("iter").pivot_table(

0 commit comments

Comments
 (0)
0