Laurae2 / Laurae

Advanced High Performance Data Science Toolbox for R by Laurae
204 stars 50 forks source link

Error when using xgb.max_f1 as evaluation metric #15

Open paulonbernardino opened 3 years ago

paulonbernardino commented 3 years ago

Hi Laurae,

Thanks for the very nice and useful package! I'm having some troubles when using xgb.max_f1 as evaluation metric for xgb.train. The error comes from sum(labels): "invalid 'type' (closure) of argument". This happens because labels is not defined, and thus, it's a function from the "base" package. Is it possibly related to the version of the XGBoost package I'm using (i.e., 1.3.2.1)? I checked the xgb.train function code and no labels object is returned by the function.

Best regards, Paulo.