skglm
skglm copied to clipboard
FEAT - Add score to GeneralizedLinearEstimator based on its datafit
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,RegressionDatafitMixinthat have their ownscore() - 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.