skglm icon indicating copy to clipboard operation
skglm copied to clipboard

FEAT - Add score to GeneralizedLinearEstimator based on its datafit

Open mathurinm opened this issue 1 year ago • 0 comments

A datafit can implement a score (based on its use for classif or regression) and this score can be accessed by GeneralizedLinearEstimator.score()

This would be one more step towards sklearn-like behavior

I think this should be done with Mixins:

  • define ClassificationDatafitMixin, RegressionDatafitMixin that have their own score()
  • All datafits inherit from one or the other
  • GeneralizedLinearModel.score calls self.datafit.score()

As a cherry on top this would enable us to replace the hardcoded isclassif in _glm_fit, that currently checks if a datafit is for classif by checking if it's equal to Logistic or QuadraticSVC.

mathurinm avatar May 31 '24 11:05 mathurinm