Define custom scorer outside CustomXGBoostRegressor class (default) to facilitate additional scorer options #27
Labels
enhancement
New feature or request
high priority
In Progress
This issue is currently under investigation
The scorer currently used with
CustomXGBoostRegressor
inGridSearchCV
(to evaluate validation performance for each fold) is implemented inside the class such that it is used by default when passingscoring = None
toGridSearchCV
. The scorer is currently a custom MSE scorer that aggregates according to unique ids.It should be possible to define custom scoring functions outside of the
CustomXGBoostRegressor
class such that the user can choose which scorer to use inGridSearchCV
, e.g.scoring = custom_mse
. Using default scorers from sklearn does not work because the scorer needs to aggregate y_pred from the trained model/fold and get the mean of y_val for each unique id.See: https://scikit-learn.org/stable/modules/model_evaluation.html#implementing-your-own-scoring-object
make_scorer
from Scikit-learn should work, but this is NOT working:The text was updated successfully, but these errors were encountered: