Description
This issue is about addressing a ConvergenceWarning
that occurs when running the examples/gaussian_process/plot_gpr_on_structured_data.py
example in CI (also when building the documentation locally).
The example creates three plots. The last use case on a classification of DNA sequences throws a ConvergenceWarning
related to the baseline_similarity_bounds
defined in a custom kernel when fitting. It seems that the lower bound is pushed resulting in the lack of convergence.
This occurs with the setting baseline_similarity_bounds=(1e-5, 1))
in the custom kernel.
Even setting baseline_similarity_bounds=(1e-40, 1))
results in the same warning:
ConvergenceWarning: The optimal value found for dimension 0 of parameter baseline_similarity is close to the specified lower bound 1e-40. Decreasing the bound and calling fit again may find a better value.
Lowering the bound further with baseline_similarity_bounds=(1e-50, 1))
results in a different warning stemming from lbfgs
:
ConvergenceWarning: lbfgs failed to converge (status=2): ABNORMAL: .
Increase the number of iterations (max_iter) or scale the data as shown in: https://scikit-learn.org/stable/modules/preprocessing.html
It would be preferable to resolve this so the example can be build without displaying warnings.
While being at the example, other small improvements are welcome (for instance fixing the typo in "use of kernel functions that operates" (the s in operates)).