Skip to content

Commit

Permalink
document xgboost case weight support (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch authored Apr 4, 2024
1 parent dc9a66e commit e5c7f92
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions man/details_boost_tree_xgboost.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/rmd/boost_tree_xgboost.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ xgboost does not have a means to translate factor predictors to grouped splits.

For classification, non-numeric outcomes (i.e., factors) are internally converted to numeric. For binary classification, the `event_level` argument of `set_engine()` can be set to either `"first"` or `"second"` to specify which level should be used as the event. This can be helpful when a watchlist is used to monitor performance from with the xgboost training process.

## Case weights

```{r child = "template-uses-case-weights.Rmd"}
```

## Other details

### Interfacing with the `params` argument
Expand Down
7 changes: 7 additions & 0 deletions man/rmd/boost_tree_xgboost.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ xgboost does not have a means to translate factor predictors to grouped splits.

For classification, non-numeric outcomes (i.e., factors) are internally converted to numeric. For binary classification, the `event_level` argument of `set_engine()` can be set to either `"first"` or `"second"` to specify which level should be used as the event. This can be helpful when a watchlist is used to monitor performance from with the xgboost training process.

## Case weights


This model can utilize case weights during model fitting. To use them, see the documentation in [case_weights] and the examples on `tidymodels.org`.

The `fit()` and `fit_xy()` arguments have arguments called `case_weights` that expect vectors of case weights.

## Other details

### Interfacing with the `params` argument
Expand Down

0 comments on commit e5c7f92

Please sign in to comment.