Skip to content

Improve SVR vs KRR example further #23243

@lesteve

Description

@lesteve

Follow up of #22804, example code is https://github.com/scikit-learn/scikit-learn/blob/main/examples/miscellaneous/plot_kernel_ridge_regression.py

  • once the grid-search is done use svr.best_estimator_ and kr.best_estimator_ as mentioned in DOC Use notebook style in plot_kernel_ridge_regression.py #22804 (comment). Maybe using the same gamma and an "equivalent" C = 1 / alpha was done on purpose to be able to compare both models in a more fair fashion, not entirely sure.
  • Add train scores to learning curve and maybe use 1000 samples rather than 100 samples: DOC Use notebook style in plot_kernel_ridge_regression.py #22804 (comment). When doing that the learning curve don't make too much sense, try to understand why ...
  • timings can change between two runs, not sure what to do, doing more runs will make the example slower and the example is already taking ~20s. Also this may be sensitive to OPENBLAS_NUM_THREADS (or MKL_NUM_THREADS).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions