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

Tune an xgboost model with early stopping and #TidyTuesday childcare costs | Julia Silge #90

Open
utterances-bot opened this issue May 15, 2023 · 5 comments

Comments

@utterances-bot
Copy link

Tune an xgboost model with early stopping and #TidyTuesday childcare costs | Julia Silge

A data science blog

https://juliasilge.com/blog/childcare-costs/

Copy link

Hi Julia! Thank you for this screencast! Is it possible to calculate the G-mean as a metric for evaluation in Tidymodels? I have been looking at the documentation of Yardstick, but G-mean is not included. Do you know if this is possible?

@juliasilge
Copy link
Owner

So this is the geometric mean like sqrt(sensitivity * specificity)? This is not currently implemented in yardstick but it would be a pretty straightforward custom metric. You can see an example of how to approach that here, and since you are using sensitivity and specificity, you can use that code pretty directly.

Copy link

HanLum commented Oct 15, 2024

Hi Julia,

This is a great tutorial, thank you!
I'm just wondering, is the validation set for early stopping selected randomly from the training set? I have a highly imbalanced dataset (84%) and am concerned the validation set may not include enough of the minority class (is there a way to stratify?)

Best wishes,
Hannah

@juliasilge
Copy link
Owner

@HanLum It is chosen randomly, yep, I don't believe there is currently a way to specify more details for the validation set used for early stopping. You can check out details on this here: https://parsnip.tidymodels.org/reference/details_boost_tree_xgboost.html#early-stopping

You might want to chime with your use case here: tidymodels/parsnip#765

Copy link

HanLum commented Oct 15, 2024

Thank you Julia!!

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

4 participants