DOC Fix FutureWarning in plot_successive_halving_heatmap.html
@@ -54,8 +54,10 @@ gs_time = time() - tic
def make_heatmap(ax, gs, is_sh=False, make_cbar=False):
"""Helper to make a heatmap."""
- results = pd.DataFrame.from_dict(gs.cv_results_)
- results["params_str"] = results.params.apply(str)
+ results = pd.DataFrame(gs.cv_results_)
+ results[["param_C", "param_gamma"]] = results[["param_C", "param_gamma"]].astype(
+ np.float64
+ )
if is_sh:
# SH dataframe: get mean_test_score values for the highest iter
scores_matrix = results.sort_values("iter").pivot_table(
