Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9543b88
introduce tuning dial for parallel penalty factor argument of ordinalNet
corybrunson Jul 17, 2026
3ad20ad
add threshold_structure model argument for ordinal_reg
corybrunson Jul 18, 2026
3486c41
attempt use of Remotes field with specified branch
corybrunson Jul 18, 2026
f3e1875
Merge branch 'main' into parallel-reg
corybrunson Jul 18, 2026
035569e
missing comma
corybrunson Jul 18, 2026
6eff4c8
handle parallel_reg model argument for ordinal_reg
corybrunson Jul 18, 2026
628dded
update snapshot
corybrunson Jul 20, 2026
0be00b3
clarify & tests model argument requirements
corybrunson Jul 21, 2026
e649322
review & simplify parallel_reg logic
corybrunson Jul 23, 2026
8138d87
change parallel_reg argument to logical + move argument handling to p…
corybrunson Aug 8, 2026
742f16e
track agent-generated explication of parallel regression assumption c…
corybrunson Aug 9, 2026
4fc86c4
respond to parsnip updates in response to review of pr 1393
corybrunson Aug 15, 2026
d5d7055
revise tests to match parsnip@a57bf3087
corybrunson Aug 31, 2026
5b09476
add intercept-only section
corybrunson Aug 31, 2026
c58f4a3
move clm wrapper from parsnip - pairs with parsnip@ea1eec4
corybrunson Sep 1, 2026
31ba30d
harmonize wrapper documentation & messages + call terms() via double-…
corybrunson Sep 1, 2026
c27e17b
relevel news headers
corybrunson Sep 1, 2026
3e0fc6e
switch from rlang to cli for messages
corybrunson Sep 1, 2026
297c64c
correct call stack diagram
corybrunson Sep 1, 2026
3ba236b
adapt call stack diagram to glmnetcr engine
corybrunson Sep 1, 2026
5a9730e
move clm argument revaluing from parsnip translate to ordered wrapper
corybrunson Sep 1, 2026
c664f67
revise & update clm tinker script per changes to wrapper + parallel_r…
corybrunson Sep 2, 2026
60e5911
wrap clm link translation in helper function for consistency
corybrunson Sep 3, 2026
235e818
modularize clm prediction pre-processing function
corybrunson Sep 3, 2026
5bda533
move argument value translation to wrappers - pairs with parsnip@d2c0…
corybrunson Sep 3, 2026
b688ec7
harmonize penalty path control for ordinal_reg elastic net engines - …
corybrunson Sep 5, 2026
d6f0fb9
announce modified handling of penalty paths
corybrunson Sep 7, 2026
7d39c4c
accommodate VGAM version 1.1-9 + miscellaneous edits
corybrunson Sep 21, 2026
bbed5d1
alert users to prediction issue with VGAM 1.1-9
corybrunson Sep 21, 2026
796bffc
announce accommodation of VGAM version 1.1-9
corybrunson Sep 21, 2026
07dc4aa
rm obsolete parsnip remote
corybrunson Sep 21, 2026
9c2f8b2
oops - restore & update parsnip remote
corybrunson Sep 21, 2026
9f0c3aa
rm tests of parallel_reg argument accepting formula & list values
corybrunson Sep 21, 2026
5ab783a
Merge branch 'parallel-reg' into parallel-reg-penalty
corybrunson Sep 21, 2026
1185fd8
update snapshots
corybrunson Sep 21, 2026
bca0b20
update parsnip remote following pr merge
corybrunson Sep 21, 2026
83478d9
Merge branch 'parallel-reg' into parallel-reg-penalty
corybrunson Sep 21, 2026
0326ca6
rm tests of deprecated parallel_reg behavior
corybrunson Sep 21, 2026
5a25e9a
update documentation
corybrunson Sep 21, 2026
64ce150
use includelambda0 engine argument to prevent out-of-range error
corybrunson Sep 21, 2026
b99151c
Merge branch 'parallel-reg' into parallel-reg-penalty
corybrunson Sep 21, 2026
a46c771
require ordinal for clm test
corybrunson Sep 21, 2026
16cabcf
specify minimal version of VGAM
corybrunson Sep 21, 2026
516f1a4
Merge pull request #31 from corybrunson/parallel-reg-penalty
corybrunson Sep 21, 2026
0c4adbf
rm braces around pkg name + update documentation w/ roxygen2 version …
corybrunson Sep 21, 2026
87ce95f
replace engine arg with superseding model arg
corybrunson Sep 22, 2026
dc6323e
use manual dependency for VGAM version dependencies + specify R version
corybrunson Sep 23, 2026
050007a
specify parsnip cran version + rm specific remote
corybrunson Sep 28, 2026
8a03394
Merge branch 'main' into parallel-reg
corybrunson Sep 28, 2026
47ec7d2
tweak language + re-knit
corybrunson Sep 28, 2026
4baa9bf
add missing announcement & content
corybrunson Sep 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ordered
Title: 'parsnip' Engines and Wrappers for Ordinal Classification Models
Version: 0.1.0.9002
Version: 0.1.0.9003
Authors@R: c(
person("Max", "Kuhn", , "max@posit.co",
role = "aut",
Expand All @@ -22,13 +22,15 @@ Description: Bindings, methods, and tuners for using ordinal classification
of Hornung (2020) <doi:10.1007/s00357-018-9302-x>
in 'ordinalForest'.
License: MIT + file LICENSE
Depends:
parsnip (> 1.6.0)
Depends:
R (>= 4.1),
parsnip (>= 1.6.1)
Imports:
cli,
dials (>= 1.4.3),
dials (> 1.4.4),
purrr,
rlang (>= 1.1.4),
scales (>= 1.3.0),
tibble,
tidyr
Suggests:
Expand All @@ -38,20 +40,20 @@ Suggests:
ordinalNet,
rms (>= 7.0.0),
glmnetcr,
VGAM,
VGAM (>= 1.1-9),
rpartScore,
ordinalForest,
orf,
QSARdata,
spelling,
testthat (>= 3.0.0)
Remotes:
tidymodels/parsnip
corybrunson/dials@parallel-reg
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
URL: https://corybrunson.github.io/ordered/
BugReports: https://github.com/corybrunson/ordered/issues
Config/Needs/website: rmarkdown
Config/roxygen2/version: 8.0.0
Config/roxygen2/version: 8.1.0
21 changes: 15 additions & 6 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ S3method(predict_classprob,"_ordinalNet")
S3method(predict_raw,"_ordinalNet")
export(VGAM_vgam_wrapper)
export(VGAM_vglm_wrapper)
export(clm_wrapper)
export(honesty)
export(honesty_fraction)
export(multi_predict_glmnetcr_wrapper)
export(naive_scores)
export(num_score_perms)
export(num_score_trees)
Expand All @@ -22,21 +24,28 @@ export(ord_metric)
export(ordinalForest_wrapper)
export(ordinalNet_wrapper)
export(orf_wrapper)
export(parallel_penalty_factor)
export(predict_glmnetcr_wrapper)
export(predict_lrm_wrapper)
export(predict_ordinalNet_wrapper)
export(prune_func)
export(rpartScore_wrapper)
export(sample_fraction)
export(split_func)
export(threshold_structure)
export(values_ord_metric)
export(values_ordinal_link_VGAM)
export(values_ordinal_link_clm)
export(values_threshold_structure_VGAM)
import(parsnip)
import(rlang)
importFrom(parsnip,eval_args)
importFrom(parsnip,multi_predict)
importFrom(parsnip,predict_raw)
importFrom(stats,approx)
importFrom(stats,predict)
importFrom(parsnip,
eval_args,
multi_predict,
predict_raw
)
importFrom(stats,
approx,
as.formula,
coef,
predict
)
49 changes: 40 additions & 9 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# next version

## additional engines
## maintenance

This version introduces source code and unit tests for new engines:
### bug fix

A bug in the prediction of `vglm` models, and associated tests, were patched.
Previously, `predict()` was used, which triggers S3 dispatch when **VGAM** is not attached but S4 dispatched when it is.
Now `predictvglm()` is used instead.

### refactor

`ordinal_reg()` argument value translation has been moved from the `translate()` method in parsnip to engine wrappers in ordered, with the exception of penalty path assembly for `ordinalNet` and `glmnetcr`, in coordination with [parsnip PR #1393](https://github.com/tidymodels/parsnip/pull/1393).

### penalty paths (breaking change)

Penalty path arguments in `ordinalNet` are no longer silently internally modified; for example, the user must specify `includeLambda0 = TRUE` if they want the path to include zero.
Extrapolative predictions, which err in `ordinalNet`, are overridden to use path endpoint values for consistency with `glmnet` and `glmnetcr`.

## new features

### additional ordinal regression and random forest engines

This version introduces source code and unit tests for new engines and dials:
* `clm` from the **ordinal** package
- cumulative link ordinal regression
- fit wrapper
- additional `ordinal_link` dial values
- dial for `threshold` argument
* `lrm` and `orm` from the **rms** package
- regularized cumulative probability ordinal regression
- shared prediction wrapper
Expand All @@ -18,19 +37,31 @@ This version introduces source code and unit tests for new engines:
- conditional probability ordered random forests
- fit wrapper
- dials for `sample.fraction`, `honesty`, and `honesty.fraction` arguments
* `ordinalNet` from the **ordinalNet** package (pre-existing engine)
- dial for the `parallelPenaltyFactor` argument

Engine additions were coordinated with [parsnip PR #1384](https://github.com/tidymodels/parsnip/pull/1384).
Coordinated with [parsnip PR #1384](https://github.com/tidymodels/parsnip/pull/1384).

## linear predictions
### linear prediction type

Linear predictions are enabled for the `clm`, `lrm`, `orm`, `vglm`, and `ordinalNet` ordinal regression engines and for the `vgam` generalized additive model engine.
They consistently return a single column of linear predictors (without threshold contributions).

## bug fix
Coordinated with [parsnip PR #1391](https://github.com/tidymodels/parsnip/pull/1391).

A bug in the prediction of `vglm` models, and associated tests, were patched.
Previously, `predict()` was used, which triggers S3 dispatch when **VGAM** is not attached but S4 dispatched when it is.
Now `predictvglm()` is used instead.
### threshold structure and parallel regression model arguments

The `threshold_structure` model argument for `ordinal_reg()` controls what constraints, if any, are imposed on the ordered thresholds.
It can be used by the `clm` and `vglm` engines, including with VGAM version 1.1-9.

The `parallel_reg` model argument for `ordinal_reg()` controls the parallel regression assumption with a logical value applied to all predictors.
It can be used by the `clm`, `vglm`, and `ordinalNet` engines.
Note that the default is to defer to the engine, and the `vglm` engine defaults to non-parallel terms.

The `gen_additive_mod()` `vgam` engine additionally registers the `Thresh` and `parallel` engine arguments.
These may be tuned using the `threshold_structure` and `parallel_reg` dials.

Coordinated with [parsnip PR #1393](https://github.com/tidymodels/parsnip/pull/1393) and [dials PR #462](https://github.com/tidymodels/dials/pull/462).

# ordered 0.1.0

Expand Down
2 changes: 1 addition & 1 deletion R/decision_tree-rpartScore.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' A wrapper for `rpartScore`
#' Fit wrapper for `rpartScore`
#'
#' A wrapper is used because the model interface requires the response variable
#' to be numeric rather than ordered or factor; the wrapper edits the input
Expand Down
20 changes: 17 additions & 3 deletions R/gen_additive_mod-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@ make_gen_additive_mod_vgam <- function() {
func = list(pkg = "dials", fun = "odds_link"),
has_submodel = FALSE
)
parsnip::set_model_arg(
model = "gen_additive_mod",
eng = "vgam",
parsnip = "Thresh",
original = "Thresh",
func = list(pkg = "dials", fun = "threshold_structure"),
has_submodel = FALSE
)
parsnip::set_model_arg(
model = "gen_additive_mod",
eng = "vgam",
parsnip = "parallel",
original = "parallel",
func = list(pkg = "dials", fun = "parallel_reg"),
has_submodel = FALSE
)

parsnip::set_fit(
model = "gen_additive_mod",
Expand All @@ -53,9 +69,7 @@ make_gen_additive_mod_vgam <- function() {
interface = "formula",
protect = c("formula", "data", "weights"),
func = c(pkg = "ordered", fun = "VGAM_vgam_wrapper"),
defaults = list(
parallel = TRUE
)
defaults = list()
)
)

Expand Down
2 changes: 1 addition & 1 deletion R/ordered-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#'
#' fit_orf <- rand_forest(mode = "classification") %>%
#' set_engine("ordinalForest") %>%
#' set_args(nsets = 50, ntreefinal = 100, perffunction = "probability") %>%
#' set_args(nsets = 50, trees = 100, perffunction = "probability") %>%
#' fit(Sat ~ Infl + Type + Cont, data = house_train)
#' predict(fit_orf, house_test, type = "prob")
#'
Expand Down
Loading
Loading