You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 28, 2024. It is now read-only.
I ran multiple models with BayesSearchCV, and try to plot the optimization results, plot_histogram and plot_objective both work perfectly fine, however plot_evaluations is throwing this error every time:
AttributeError: 'Real' object has no attribute 'categories'
And shows the first few figures where there are categorical variables, and empty axes elsewhere.
The complete traceback:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-63-f0c2a2bf3c15> in <module>
5 clf_params = list(filter(is_clf_param, model_res.best_params_.keys()))
6 n_params = len(clf_params)
----> 7 plot_evaluations(model_res.optimizer_results_[0])
8 fig, axs = plt.subplots(1, n_params, figsize=(5*n_params,4))
9 for i,ax in enumerate(axs):
/opt/conda/lib/python3.7/site-packages/skopt/plots.py in plot_evaluations(result, bins, dimensions, plot_dims)
829 index, dim = plot_dims[i]
830 if iscat[j]:
--> 831 bins_ = len(dim.categories)
832 elif dim.prior == 'log-uniform':
833 low, high = space.bounds[index]
AttributeError: 'Real' object has no attribute 'categories'