Bug in plot_cross_val_selection method
karitonov opened this issue · comments
line 20:
results = pd.DataFrame(grid_search.cv_results_)[15:]
line 37-38:
plt.xticks(range(len(results)), [str(x).strip("{}").replace("'", "") for x
in grid_search.cv_results_['params']],
In line 37-38, an error occurs because the length of results and grid_search.cv_results_['params']] does not match.
Therefore, the line number 20 is corrected as follows.
results = pd.DataFrame(grid_search.cv_results_)#[15:] comment out
And then, add the following rows to some suitable places (For example, after the 41st line.).
plt.xlim(14.5, 36)
Thank you for your cooperation.
您的邮件已收到,我将会尽快处理,谢谢。王宇凝
This issue is almost the same as above.
The above method is better, so I will withdraw.