| Title: | 'parsnip' Engines and Wrappers for Ordinal Classification Models |
|---|---|
| Description: | Bindings, methods, and tuners for using ordinal classification models with the 'parsnip' and 'dials' packages. These include the regularized elastic net ordinal regression of Wurm, Hanlon, and Rathouz (2021) <doi:10.18637/jss.v099.i06> in 'ordinalNet', the ordinal classification trees of Galimberti, Soffritti, and Di Maso (2012) <doi:10.18637/jss.v047.i10> in 'rpartScore', and the latent variable ordinal forests of Hornung (2020) <doi:10.1007/s00357-018-9302-x> in 'ordinalForest'. |
| Authors: | Max Kuhn [aut] (ORCID: <https://orcid.org/0000-0003-2402-136X>), Jason Cory Brunson [aut, cre] (ORCID: <https://orcid.org/0000-0003-3126-9494>), Posit Software PBC [cph] |
| Maintainer: | Jason Cory Brunson <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0.9002 |
| Built: | 2026-07-18 17:44:59 UTC |
| Source: | https://github.com/corybrunson/ordered |
ordinal engine parametersThe threshold_structure dial is auxiliary to ordinal regression models that
use the "clm" engine. It corresponds to the threshold tuning parameter that
would be specified using set_engine("clm", ...).
threshold_structure( values = c("flexible", "symmetric", "symmetric2", "equidistant") ) values_ordinal_link_clmthreshold_structure( values = c("flexible", "symmetric", "symmetric2", "equidistant") ) values_ordinal_link_clm
values |
A character string of possible values. |
The vector values_ordinal_link_clm extends the default ordinal_link
options encoded in dials::values_ordinal_link to those accepted by
ordinal::clm().
threshold_structure() is a dial for the threshold structure in
cumulative link models. See ?ordinal::clm for more details. Use
set_args(threshold = ...) to set this parameter on a model spec. These
parameters are engine-specific, not general to ordinal regression models,
so are provided here rather than in dials.
An object of S3 parent class param and primary class qual_param;
see dials::new_qual_param().
values_ordinal_link_clm dials::ordinal_link(values = values_ordinal_link_clm) threshold_structure()values_ordinal_link_clm dials::ordinal_link(values = values_ordinal_link_clm) threshold_structure()
ordinalForest engine parametersThese parameters are auxiliary to random forest models that use the
"ordinalForest" engine. They correspond to tuning parameters that would be
specified using set_engine("ordinalForest", ...).
naive_scores(values = c(FALSE, TRUE)) num_scores(range = c(100L, 2000L), trans = NULL) num_score_perms(range = c(100L, 500L), trans = NULL) num_score_trees(range = c(10L, 200L), trans = NULL) num_scores_best(range = c(2L, 20L), trans = NULL) ord_metric(values = values_ord_metric) values_ord_metricnaive_scores(values = c(FALSE, TRUE)) num_scores(range = c(100L, 2000L), trans = NULL) num_score_perms(range = c(100L, 500L), trans = NULL) num_score_trees(range = c(10L, 200L), trans = NULL) num_scores_best(range = c(2L, 20L), trans = NULL) ord_metric(values = values_ord_metric) values_ord_metric
values |
A character string of possible values. |
range |
A two-element vector holding the defaults for the smallest and largest possible values, respectively. If a transformation is specified, these values should be in the transformed units. |
trans |
A |
The vector values_ord_metric provides options to the ord_metric dial.
These functions generate parameters for parsnip::rand_forest()
models using the "ordinalForest" engine. See ?ordinalForest::ordfor()
for more details on the original parameters. These parameters are
engine-specific, not general to decision tree models, so are provided here
rather than in dials.
naive_scores(): Whether to construct only a "naive" ordinal forest using
the scores for the ordinal values; tunes naive.
num_scores(): The number of score sets tried prior to optimization; tunes
nsets.
num_score_perms(): The number of permutations of the class width ordering
to try for each score set tried (after the first); tunes npermtrial.
num_score_trees(): The number of trees in the score set–specific
forests; tunes ntreeperdiv.
num_scores_best(): The number of top-performing score sets used to
calculate the optimized score set; tunes nbest.
ord_metric(): The performance function used to evaluate score
set–specific forests; tunes perffunction. See also
?ordinalForest::perff.
An object of S3 parent class param and primary class qual_param
or quant_param; see dials::new_qual_param() and
[dials::new_quant_param().
naive_scores() num_scores() num_score_perms() num_score_trees() num_scores_best() values_ord_metric ord_metric()naive_scores() num_scores() num_score_perms() num_score_trees() num_scores_best() values_ord_metric ord_metric()
orf engine parametersThese parameters are auxiliary to random forest models that use the
"orf" engine. They correspond to tuning parameters that would be
specified using set_engine("orf", ...).
sample_fraction(range = c(0.1, 1), trans = NULL) honesty(values = c(TRUE, FALSE)) honesty_fraction(range = c(0.1, 0.9), trans = NULL)sample_fraction(range = c(0.1, 1), trans = NULL) honesty(values = c(TRUE, FALSE)) honesty_fraction(range = c(0.1, 0.9), trans = NULL)
range |
A two-element vector holding the defaults for the smallest and largest possible values, respectively. If a transformation is specified, these values should be in the transformed units. |
trans |
A |
values |
A logical vector of possible values. See |
These functions generate parameters for parsnip::rand_forest()
models using the "orf" engine. See ?orf::orf() for more details on
the original parameters. These parameters are engine-specific, not general
to random forest models, so are provided here rather than in dials.
sample_fraction(): The fraction of observations to be subsampled;
tunes sample.fraction.
honesty(): Whether to use honest splitting (sample splitting);
tunes honesty.
honesty_fraction(): The fraction of observations reserved for the
honest (estimation) sample; tunes honesty.fraction.
An object of S3 parent class param and primary class qual_param
or quant_param; see dials::new_qual_param() and
dials::new_quant_param().
sample_fraction() honesty() honesty_fraction()sample_fraction() honesty() honesty_fraction()
rpartScore engine parametersThese parameters are auxiliary to decision tree models that use the
"rpartScore" engine. They correspond to tuning parameters that would be
specified using set_engine("rpartScore", ...).
split_func(values = c("abs", "quad")) prune_func(values = c("mr", "mc"))split_func(values = c("abs", "quad")) prune_func(values = c("mr", "mc"))
values |
A character string of possible values. |
split_func and prune_func are dials for split and prune,
respectively. See ?rpartScore::rpartScore for more details on the
original parameters. These parameters are engine-specific, not general to
decision tree models, so are provided here rather than in dials.
An object of S3 parent class param and primary class qual_param;
see dials::new_qual_param().
split_func() prune_func()split_func() prune_func()