From 5d2b5436b6853fc4056ae0e836557a494199442f Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Sun, 3 Nov 2024 10:12:39 -0500 Subject: [PATCH 01/13] add polr method (ordinal link function) as tuning parameter --- NAMESPACE | 2 ++ R/param_ordinal_link.R | 26 ++++++++++++++++++++++++++ man/ordinal_link.Rd | 30 ++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 R/param_ordinal_link.R create mode 100644 man/ordinal_link.Rd diff --git a/NAMESPACE b/NAMESPACE index 4214e39c..e6eec76d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -124,6 +124,7 @@ export(num_random_splits) export(num_runs) export(num_terms) export(num_tokens) +export(ordinal_link) export(over_ratio) export(parameters) export(parameters_constr) @@ -196,6 +197,7 @@ export(value_transform) export(value_validate) export(values_activation) export(values_initial_umap) +export(values_ordinal_link) export(values_prune_method) export(values_regularization_method) export(values_scheduler) diff --git a/R/param_ordinal_link.R b/R/param_ordinal_link.R new file mode 100644 index 00000000..940eb6f4 --- /dev/null +++ b/R/param_ordinal_link.R @@ -0,0 +1,26 @@ +#' Ordinal Regression Link Function (character) +#' +#' The link function of an ordinal (generalized linear) regression model. +#' +#' @param values A character string of possible values. See +#' `values_ordinal_link` in examples below. +#' +#' @details +#' This parameter is used in `parsnip::set_engine('polr')`. +#' +#' @examples +#' values_ordinal_link +#' ordinal_link() +#' @export +ordinal_link <- function(values = values_ordinal_link) { + new_qual_param( + type = "character", + values = values, + label = c(ordinal_link = "Ordinal Link"), + finalize = NULL + ) +} + +#' @rdname ordinal_link +#' @export +values_ordinal_link <- c("logistic", "probit", "loglog", "cloglog", "cauchit") diff --git a/man/ordinal_link.Rd b/man/ordinal_link.Rd new file mode 100644 index 00000000..82213d2b --- /dev/null +++ b/man/ordinal_link.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/param_ordinal_link.R +\docType{data} +\name{ordinal_link} +\alias{ordinal_link} +\alias{values_ordinal_link} +\title{Ordinal Regression Link Function (character)} +\format{ +An object of class \code{character} of length 5. +} +\usage{ +ordinal_link(values = values_ordinal_link) + +values_ordinal_link +} +\arguments{ +\item{values}{A character string of possible values. See +\code{values_ordinal_link} in examples below.} +} +\description{ +The link function of an ordinal (generalized linear) regression model. +} +\details{ +This parameter is only used in ordinal regression models. +} +\examples{ +values_ordinal_link +ordinal_link() +} +\keyword{datasets} From 827c156c0e9ea1fc864940272293b762337b59d5 Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Sat, 30 Aug 2025 13:39:12 -0400 Subject: [PATCH 02/13] increment version number + update ordinal_link documentation --- DESCRIPTION | 2 +- man/ordinal_link.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 74f4e17b..d2fe040a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dials Title: Tools for Creating Tuning Parameter Values -Version: 1.4.1.9000 +Version: 1.4.1.9001 Authors@R: c( person("Max", "Kuhn", , "max@posit.co", role = "aut"), person("Hannah", "Frick", , "hannah@posit.co", role = c("aut", "cre")), diff --git a/man/ordinal_link.Rd b/man/ordinal_link.Rd index 82213d2b..68d4d342 100644 --- a/man/ordinal_link.Rd +++ b/man/ordinal_link.Rd @@ -21,7 +21,7 @@ values_ordinal_link The link function of an ordinal (generalized linear) regression model. } \details{ -This parameter is only used in ordinal regression models. +This parameter is used in \code{parsnip::set_engine('polr')}. } \examples{ values_ordinal_link From b317f38e07726405e716affb2b4da6a8524641b5 Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Tue, 2 Sep 2025 08:37:53 -0400 Subject: [PATCH 03/13] draft new dials for rpartScore params --- NAMESPACE | 2 ++ R/param_trees.R | 32 ++++++++++++++++++++++++++++++++ man/trees.Rd | 12 ++++++++++++ 3 files changed, 46 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 66256b56..67c9525a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -143,6 +143,7 @@ export(prior_terminal_node_expo) export(prod_degree) export(prop_terms) export(prune) +export(prune_func) export(prune_method) export(range_get) export(range_set) @@ -174,6 +175,7 @@ export(signed_hash) export(significance_threshold) export(smoothness) export(spline_degree) +export(split_func) export(splitting_rule) export(stop_iter) export(summary_stat) diff --git a/R/param_trees.R b/R/param_trees.R index 842cf2b1..fa82fdd2 100644 --- a/R/param_trees.R +++ b/R/param_trees.R @@ -33,6 +33,12 @@ #' * `prune()`: A logical for whether a tree or set of rules should be pruned. #' #' * `cost_complexity()`: The cost-complexity parameter in classical CART models. +#' +#' * `split_func()`: The cost function used for splitting, +#' corresponding to `split` in \pkg{rpartScore}. +#' +#' * `prune_func()`: The performance measure used for pruning, +#' corresponding to `prune` in \pkg{rpartScore}. #' @examples #' trees() #' min_n() @@ -41,6 +47,8 @@ #' tree_depth() #' prune() #' cost_complexity() +#' split_func() +#' prune_func() #' @export trees <- function(range = c(1L, 2000L), trans = NULL) { new_quant_param( @@ -143,3 +151,27 @@ cost_complexity <- function(range = c(-10, -1), trans = transform_log10()) { finalize = NULL ) } + +# FIXME: If feasible, use full words in place of abbreviations below. + +#' @export +#' @rdname trees +split_func <- function(values = c("abs", "quad")) { + new_qual_param( + type = "character", + values = values, + label = c(split_func = "Splitting function"), + finalize = NULL + ) +} + +#' @export +#' @rdname trees +prune_func <- function(values = c("mr", "mc")) { + new_qual_param( + type = "character", + values = values, + label = c(split_func = "Splitting function"), + finalize = NULL + ) +} diff --git a/man/trees.Rd b/man/trees.Rd index 2bcc2a97..ebc86cde 100644 --- a/man/trees.Rd +++ b/man/trees.Rd @@ -9,6 +9,8 @@ \alias{tree_depth} \alias{prune} \alias{cost_complexity} +\alias{split_func} +\alias{prune_func} \title{Parameter functions related to tree- and rule-based models.} \usage{ trees(range = c(1L, 2000L), trans = NULL) @@ -26,6 +28,10 @@ tree_depth(range = c(1L, 15L), trans = NULL) prune(values = c(TRUE, FALSE)) cost_complexity(range = c(-10, -1), trans = transform_log10()) + +split_func(values = c("abs", "quad")) + +prune_func(values = c("mr", "mc")) } \arguments{ \item{range}{A two-element vector holding the \emph{defaults} for the smallest and @@ -65,6 +71,10 @@ further. (See \code{parsnip::boost_tree()}). This corresponds to \code{gamma} in (See \code{parsnip::boost_tree()}). \item \code{prune()}: A logical for whether a tree or set of rules should be pruned. \item \code{cost_complexity()}: The cost-complexity parameter in classical CART models. +\item \code{split_func()}: The cost function used for splitting, +corresponding to \code{split} in \pkg{rpartScore}. +\item \code{prune_func()}: The performance measure used for pruning, +corresponding to \code{prune} in \pkg{rpartScore}. } } \examples{ @@ -75,4 +85,6 @@ loss_reduction() tree_depth() prune() cost_complexity() +split_func() +prune_func() } From ee1411ede0b42af41204fcfb887662aeaa60e569 Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Tue, 2 Sep 2025 08:43:15 -0400 Subject: [PATCH 04/13] typo --- R/param_trees.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/param_trees.R b/R/param_trees.R index fa82fdd2..56f6bd0a 100644 --- a/R/param_trees.R +++ b/R/param_trees.R @@ -171,7 +171,7 @@ prune_func <- function(values = c("mr", "mc")) { new_qual_param( type = "character", values = values, - label = c(split_func = "Splitting function"), + label = c(prune_func = "Splitting function"), finalize = NULL ) } From 9653a395600cba84c53adb5ec13d6eea5b7a7de8 Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Wed, 3 Sep 2025 15:31:00 -0400 Subject: [PATCH 05/13] move engine-specific dials to ordered --- NAMESPACE | 2 -- R/param_trees.R | 30 ------------------------------ man/trees.Rd | 10 ---------- 3 files changed, 42 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 67c9525a..66256b56 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -143,7 +143,6 @@ export(prior_terminal_node_expo) export(prod_degree) export(prop_terms) export(prune) -export(prune_func) export(prune_method) export(range_get) export(range_set) @@ -175,7 +174,6 @@ export(signed_hash) export(significance_threshold) export(smoothness) export(spline_degree) -export(split_func) export(splitting_rule) export(stop_iter) export(summary_stat) diff --git a/R/param_trees.R b/R/param_trees.R index 56f6bd0a..f247f7f8 100644 --- a/R/param_trees.R +++ b/R/param_trees.R @@ -33,12 +33,6 @@ #' * `prune()`: A logical for whether a tree or set of rules should be pruned. #' #' * `cost_complexity()`: The cost-complexity parameter in classical CART models. -#' -#' * `split_func()`: The cost function used for splitting, -#' corresponding to `split` in \pkg{rpartScore}. -#' -#' * `prune_func()`: The performance measure used for pruning, -#' corresponding to `prune` in \pkg{rpartScore}. #' @examples #' trees() #' min_n() @@ -151,27 +145,3 @@ cost_complexity <- function(range = c(-10, -1), trans = transform_log10()) { finalize = NULL ) } - -# FIXME: If feasible, use full words in place of abbreviations below. - -#' @export -#' @rdname trees -split_func <- function(values = c("abs", "quad")) { - new_qual_param( - type = "character", - values = values, - label = c(split_func = "Splitting function"), - finalize = NULL - ) -} - -#' @export -#' @rdname trees -prune_func <- function(values = c("mr", "mc")) { - new_qual_param( - type = "character", - values = values, - label = c(prune_func = "Splitting function"), - finalize = NULL - ) -} diff --git a/man/trees.Rd b/man/trees.Rd index ebc86cde..996d96a9 100644 --- a/man/trees.Rd +++ b/man/trees.Rd @@ -9,8 +9,6 @@ \alias{tree_depth} \alias{prune} \alias{cost_complexity} -\alias{split_func} -\alias{prune_func} \title{Parameter functions related to tree- and rule-based models.} \usage{ trees(range = c(1L, 2000L), trans = NULL) @@ -28,10 +26,6 @@ tree_depth(range = c(1L, 15L), trans = NULL) prune(values = c(TRUE, FALSE)) cost_complexity(range = c(-10, -1), trans = transform_log10()) - -split_func(values = c("abs", "quad")) - -prune_func(values = c("mr", "mc")) } \arguments{ \item{range}{A two-element vector holding the \emph{defaults} for the smallest and @@ -71,10 +65,6 @@ further. (See \code{parsnip::boost_tree()}). This corresponds to \code{gamma} in (See \code{parsnip::boost_tree()}). \item \code{prune()}: A logical for whether a tree or set of rules should be pruned. \item \code{cost_complexity()}: The cost-complexity parameter in classical CART models. -\item \code{split_func()}: The cost function used for splitting, -corresponding to \code{split} in \pkg{rpartScore}. -\item \code{prune_func()}: The performance measure used for pruning, -corresponding to \code{prune} in \pkg{rpartScore}. } } \examples{ From 5179b70a421c10748f2a6ecab3f32b8b6281d13d Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Wed, 3 Sep 2025 15:32:02 -0400 Subject: [PATCH 06/13] oops - complete last commit --- R/param_trees.R | 2 -- man/trees.Rd | 2 -- 2 files changed, 4 deletions(-) diff --git a/R/param_trees.R b/R/param_trees.R index f247f7f8..842cf2b1 100644 --- a/R/param_trees.R +++ b/R/param_trees.R @@ -41,8 +41,6 @@ #' tree_depth() #' prune() #' cost_complexity() -#' split_func() -#' prune_func() #' @export trees <- function(range = c(1L, 2000L), trans = NULL) { new_quant_param( diff --git a/man/trees.Rd b/man/trees.Rd index 996d96a9..2bcc2a97 100644 --- a/man/trees.Rd +++ b/man/trees.Rd @@ -75,6 +75,4 @@ loss_reduction() tree_depth() prune() cost_complexity() -split_func() -prune_func() } From f883d87521e34c54369a2f8e577674b8392d325e Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Thu, 4 Sep 2025 14:35:09 -0400 Subject: [PATCH 07/13] introduce odds_link param --- NAMESPACE | 2 ++ R/param_ordinal_link.R | 47 +++++++++++++++++++++++++++++++++++------- man/ordinal_link.Rd | 28 ++++++++++++++++++++----- 3 files changed, 65 insertions(+), 12 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 66256b56..2ebbef0b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -126,6 +126,7 @@ export(num_random_splits) export(num_runs) export(num_terms) export(num_tokens) +export(odds_link) export(ordinal_link) export(over_ratio) export(parameters) @@ -202,6 +203,7 @@ export(values_activation) export(values_cal_cls) export(values_cal_reg) export(values_initial_umap) +export(values_odds_link) export(values_ordinal_link) export(values_prune_method) export(values_regularization_method) diff --git a/R/param_ordinal_link.R b/R/param_ordinal_link.R index 940eb6f4..2b79441a 100644 --- a/R/param_ordinal_link.R +++ b/R/param_ordinal_link.R @@ -1,16 +1,23 @@ -#' Ordinal Regression Link Function (character) +#' Ordinal Regression Link Functions (character) #' -#' The link function of an ordinal (generalized linear) regression model. +#' The ordinal and odds link functions of an ordinal regression model. #' -#' @param values A character string of possible values. See -#' `values_ordinal_link` in examples below. +#' @param values For `*_link()`, a character string from among the possible +#' values encoded in `values_*_link`. See the examples below. #' -#' @details -#' This parameter is used in `parsnip::set_engine('polr')`. +#' @details These parameters are used by ordinal regression models specified by +#' `ordinal_reg()`, for example `parsnip::set_engine('polr')`. The +#' nomenclature is taken from Wurm &al (2021), who characterize the pair of +#' functions as a composite link function. #' +#' @references Wurm, Michael J., Rathouz, Paul J., & Hanlon, Bret M. (2021). +#' Regularized Ordinal Regression and the ordinalNet R Package. _Journal of +#' Statistical Software_, 99(6), 1–42. 10.18637/jss.v099.i06 #' @examples #' values_ordinal_link #' ordinal_link() +#' values_odds_link +#' odds_link() #' @export ordinal_link <- function(values = values_ordinal_link) { new_qual_param( @@ -23,4 +30,30 @@ ordinal_link <- function(values = values_ordinal_link) { #' @rdname ordinal_link #' @export -values_ordinal_link <- c("logistic", "probit", "loglog", "cloglog", "cauchit") +values_ordinal_link <- c( + "logistic", + "probit", + "loglog", + "cloglog", + "cauchit" +) + +#' @rdname ordinal_link +#' @export +odds_link <- function(values = values_odds_link) { + new_qual_param( + type = "character", + values = values, + label = c(odds_link = "Odds Link"), + finalize = NULL + ) +} + +#' @rdname ordinal_link +#' @export +values_odds_link <- c( + "cumulative_logits", + "adjacent_categories", + "continuation_ratio", + "stopping_ratio" +) diff --git a/man/ordinal_link.Rd b/man/ordinal_link.Rd index 68d4d342..03d3a765 100644 --- a/man/ordinal_link.Rd +++ b/man/ordinal_link.Rd @@ -4,27 +4,45 @@ \name{ordinal_link} \alias{ordinal_link} \alias{values_ordinal_link} -\title{Ordinal Regression Link Function (character)} +\alias{odds_link} +\alias{values_odds_link} +\title{Ordinal Regression Link Functions (character)} \format{ An object of class \code{character} of length 5. + +An object of class \code{character} of length 4. } \usage{ ordinal_link(values = values_ordinal_link) values_ordinal_link + +odds_link(values = values_odds_link) + +values_odds_link } \arguments{ -\item{values}{A character string of possible values. See -\code{values_ordinal_link} in examples below.} +\item{values}{For \verb{*_link()}, a character string from among the possible +values encoded in \verb{values_*_link}. See the examples below.} } \description{ -The link function of an ordinal (generalized linear) regression model. +The ordinal and odds link functions of an ordinal regression model. } \details{ -This parameter is used in \code{parsnip::set_engine('polr')}. +These parameters are used by ordinal regression models specified by +\code{ordinal_reg()}, for example \code{parsnip::set_engine('polr')}. The +nomenclature is taken from Wurm &al (2021), who characterize the pair of +functions as a composite link function. } \examples{ values_ordinal_link ordinal_link() +values_odds_link +odds_link() +} +\references{ +Wurm, Michael J., Rathouz, Paul J., & Hanlon, Bret M. (2021). +Regularized Ordinal Regression and the ordinalNet R Package. \emph{Journal of +Statistical Software}, 99(6), 1–42. 10.18637/jss.v099.i06 } \keyword{datasets} From 2bd5e010bfcac0bac938d5fb181c06533564a905 Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Fri, 5 Sep 2025 14:56:17 -0400 Subject: [PATCH 08/13] note need to harmonize ordinal_link options --- R/param_ordinal_link.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/param_ordinal_link.R b/R/param_ordinal_link.R index 2b79441a..d6db525c 100644 --- a/R/param_ordinal_link.R +++ b/R/param_ordinal_link.R @@ -31,6 +31,7 @@ ordinal_link <- function(values = values_ordinal_link) { #' @rdname ordinal_link #' @export values_ordinal_link <- c( + # TODO: Combine and standardize options from all engines. "logistic", "probit", "loglog", From b710b05317cdff1e062ce0a0af2fd40a28886be6 Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Mon, 22 Sep 2025 08:44:03 -0400 Subject: [PATCH 09/13] add caution re engines and link functions --- R/param_ordinal_link.R | 4 ++-- man/ordinal_link.Rd | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/R/param_ordinal_link.R b/R/param_ordinal_link.R index d6db525c..40fcce8a 100644 --- a/R/param_ordinal_link.R +++ b/R/param_ordinal_link.R @@ -8,7 +8,8 @@ #' @details These parameters are used by ordinal regression models specified by #' `ordinal_reg()`, for example `parsnip::set_engine('polr')`. The #' nomenclature is taken from Wurm &al (2021), who characterize the pair of -#' functions as a composite link function. +#' functions as a composite link function. Note that different engines support +#' different subsets of link functions. #' #' @references Wurm, Michael J., Rathouz, Paul J., & Hanlon, Bret M. (2021). #' Regularized Ordinal Regression and the ordinalNet R Package. _Journal of @@ -31,7 +32,6 @@ ordinal_link <- function(values = values_ordinal_link) { #' @rdname ordinal_link #' @export values_ordinal_link <- c( - # TODO: Combine and standardize options from all engines. "logistic", "probit", "loglog", diff --git a/man/ordinal_link.Rd b/man/ordinal_link.Rd index 03d3a765..aca7e9ca 100644 --- a/man/ordinal_link.Rd +++ b/man/ordinal_link.Rd @@ -32,7 +32,8 @@ The ordinal and odds link functions of an ordinal regression model. These parameters are used by ordinal regression models specified by \code{ordinal_reg()}, for example \code{parsnip::set_engine('polr')}. The nomenclature is taken from Wurm &al (2021), who characterize the pair of -functions as a composite link function. +functions as a composite link function. Note that different engines support +different subsets of link functions. } \examples{ values_ordinal_link From 10f753d8375874b7046a673058866b6a6e17abdc Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Mon, 13 Oct 2025 17:27:56 -0400 Subject: [PATCH 10/13] add tests for ordinal_reg model params --- tests/testthat/test-params.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testthat/test-params.R b/tests/testthat/test-params.R index 431faf52..3b626db2 100644 --- a/tests/testthat/test-params.R +++ b/tests/testthat/test-params.R @@ -179,4 +179,8 @@ test_that("param values", { expect_equal(all_neighbors(TRUE)$values, TRUE) expect_equal(cal_method_class()$values, values_cal_cls) expect_equal(cal_method_reg()$values, values_cal_reg) + expect_equal(ordinal_link(letters[1:3])$values, letters[1:3]) + expect_equal(ordinal_link()$values, values_ordinal_link) + expect_equal(odds_link(letters[4:6])$values, letters[4:6]) + expect_equal(odds_link()$values, values_odds_link) }) From a972b8df4e37dea77cda990929eddbb9db0abf73 Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Mon, 13 Oct 2025 17:28:26 -0400 Subject: [PATCH 11/13] rename cumulative_logits to cumulative_link --- R/param_ordinal_link.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/param_ordinal_link.R b/R/param_ordinal_link.R index 40fcce8a..84ddd1c6 100644 --- a/R/param_ordinal_link.R +++ b/R/param_ordinal_link.R @@ -53,7 +53,7 @@ odds_link <- function(values = values_odds_link) { #' @rdname ordinal_link #' @export values_odds_link <- c( - "cumulative_logits", + "cumulative_link", "adjacent_categories", "continuation_ratio", "stopping_ratio" From bbbf12eca0f1cbb22fc1b110f05469ee9f2b3989 Mon Sep 17 00:00:00 2001 From: Jason Cory Brunson Date: Wed, 4 Mar 2026 15:49:09 -0500 Subject: [PATCH 12/13] add news entry for ordinal_reg dials --- NEWS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS.md b/NEWS.md index b9e49d5c..72035b03 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,10 @@ # dials (development version) +* Two dials are introduced for `ordinal_reg()` models: + `ordinal_link` and `odds_link`, which together define a composite link function as described in the documentation. + They are styled after `survival_link` and include analogous `values_*` option vectors. + Two new tests are added for each. + * A bug was fixed where some space-filling designs did not respect the `original` argument (#409). * Parameters were added for the `tab_pfn` model: `num_estimators()`, `softmax_temperature()`, `balance_probabilities()`, `average_before_softmax()`, and `training_set_limit()`. From 3fb378f72154f789ca5c6cb2d3b3c7b393926f16 Mon Sep 17 00:00:00 2001 From: Hannah Frick Date: Thu, 5 Mar 2026 10:40:32 +0000 Subject: [PATCH 13/13] touch-ups --- NEWS.md | 5 +---- R/param_ordinal_link.R | 4 ++-- _pkgdown.yml | 1 + man/ordinal_link.Rd | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index 72035b03..2d269989 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,9 +1,6 @@ # dials (development version) -* Two dials are introduced for `ordinal_reg()` models: - `ordinal_link` and `odds_link`, which together define a composite link function as described in the documentation. - They are styled after `survival_link` and include analogous `values_*` option vectors. - Two new tests are added for each. +* `ordinal_link()` and `odds_link()` are two new parameters for the new `ordinal_reg()` models in parsnip (@corybrunson, #435). * A bug was fixed where some space-filling designs did not respect the `original` argument (#409). diff --git a/R/param_ordinal_link.R b/R/param_ordinal_link.R index 84ddd1c6..c15a0439 100644 --- a/R/param_ordinal_link.R +++ b/R/param_ordinal_link.R @@ -6,8 +6,8 @@ #' values encoded in `values_*_link`. See the examples below. #' #' @details These parameters are used by ordinal regression models specified by -#' `ordinal_reg()`, for example `parsnip::set_engine('polr')`. The -#' nomenclature is taken from Wurm &al (2021), who characterize the pair of +#' `parsnip::ordinal_reg()`, for example `parsnip::set_engine('polr')`. The +#' nomenclature is taken from Wurm et al (2021), who characterize the pair of #' functions as a composite link function. Note that different engines support #' different subsets of link functions. #' diff --git a/_pkgdown.yml b/_pkgdown.yml index d1ec29a2..d5494ff6 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -84,6 +84,7 @@ reference: - num_comp - num_estimators - num_knots + - ordinal_link - penalty - predictor_prop - prune_method diff --git a/man/ordinal_link.Rd b/man/ordinal_link.Rd index aca7e9ca..058f7340 100644 --- a/man/ordinal_link.Rd +++ b/man/ordinal_link.Rd @@ -30,8 +30,8 @@ The ordinal and odds link functions of an ordinal regression model. } \details{ These parameters are used by ordinal regression models specified by -\code{ordinal_reg()}, for example \code{parsnip::set_engine('polr')}. The -nomenclature is taken from Wurm &al (2021), who characterize the pair of +\code{parsnip::ordinal_reg()}, for example \code{parsnip::set_engine('polr')}. The +nomenclature is taken from Wurm et al (2021), who characterize the pair of functions as a composite link function. Note that different engines support different subsets of link functions. }