Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoXGBoostClassifier sometimes rejects "f" metric #23

Closed
eafpres opened this issue Jul 5, 2019 · 4 comments
Closed

AutoXGBoostClassifier sometimes rejects "f" metric #23

eafpres opened this issue Jul 5, 2019 · 4 comments

Comments

@eafpres
Copy link

eafpres commented Jul 5, 2019

I am running the following:

xgboost_results <- AutoXGBoostClassifier(data = cbind(train_x_data, act = train_y_data[, 1]), ValidationData = cbind(val_x_data, act = val_y_data[, 1])[1:(ceiling(nrow(val_x_data) / 2)), ], TestData = cbind(val_x_data, act = val_y_data[, 1])[(ceiling(nrow(val_x_data) / 2) + 1):nrow(val_x_data), ], TargetColumnName = "act", FeatureColNames = seq(1, ncol(train_x_data)), Trees = 25, GridTune = TRUE, MaxModelsInGrid = 15, grid_eval_metric = "f", TreeMethod = "hist", ModelID = "xgboost_rev6", NThreads = 256)

and get this error:
Error in metric %chin% c("auc", "tpr", "tnr", "prbe", "f", "odds") :
object 'metric' not found

Changing the metric to "auc" it runs. However, since "f" is in the allowed list, why is this occurring?

Also, I'm "sure" I ran it with "f" before, but now I cannot reproduce how.

@AdrianAntico
Copy link
Owner

I just had to make a small change. In the AutoXGBoostClassifier() function, the grid_eval_metric is used to determine which of the models built in the grid search is the winner. Based on the error output, "metric" was being used instead of "grid_eval_metric" like the rest of the function was using. I fixed that and you should be good to go once you re-install.

Thanks for letting me know!

@AdrianAntico
Copy link
Owner

Turns out that AutoCatBoostClassifier() had the same issue. Just fixed that one too.

@eafpres
Copy link
Author

eafpres commented Jul 5, 2019

I will reinstall and verify; if OK I will close this. Thank you for taking care of this so quickly.

@eafpres
Copy link
Author

eafpres commented Jul 5, 2019

Confirmed it now works.

@eafpres eafpres closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants