Rationale
Most of the learners implemented in cs-ranking already implement an interface similar to the one described in https://scikit-learn.org/stable/developers/develop.html#rolling-your-own-estimator,
i.e., we usually have a fit and predict method implemented.
For users to be able to use all learners effortlessly in a scikit-learn pipeline.Pipeline or to apply model_selection.GridSearchCV, we should make sure that all additional requirements are also fulfilled.
To do
Most of these changes are independent of each other and could be done using separate branches.
Rationale
Most of the learners implemented in cs-ranking already implement an interface similar to the one described in https://scikit-learn.org/stable/developers/develop.html#rolling-your-own-estimator,
i.e., we usually have a
fitandpredictmethod implemented.For users to be able to use all learners effortlessly in a scikit-learn pipeline.Pipeline or to apply model_selection.GridSearchCV, we should make sure that all additional requirements are also fulfilled.
To do
get_paramsandset_paramsto set parameters. This is important, sinceGridSearchCVor BayesSearchCV callset_paramsfor hyperparameter optimization.sklearn.base.BaseEstimatorimplements basic versions of these. The current way we handle hyperparameters should be deprecated.__init__, but rather infititself.set_paramsis supposed to do exactly the same thing as__init__with respect to parameters._.clonemethods for each learner.Most of these changes are independent of each other and could be done using separate branches.