.use_case_weights_with_yardstick | R Documentation |
This S3 method defines the logic for deciding when a case weight vector
should be passed to yardstick metric functions and used to measure model
performance. The current logic is that frequency weights (i.e.
hardhat::frequency_weights()
) are the only situation where this should
occur.
.use_case_weights_with_yardstick(x)
## S3 method for class 'hardhat_importance_weights'
.use_case_weights_with_yardstick(x)
## S3 method for class 'hardhat_frequency_weights'
.use_case_weights_with_yardstick(x)
x |
A vector |
A single TRUE
or FALSE
.
library(parsnip)
library(dplyr)
frequency_weights(1:10) %>%
.use_case_weights_with_yardstick()
importance_weights(seq(1, 10, by = .1))%>%
.use_case_weights_with_yardstick()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.