Skip to content

Register C5.0 and Cubist engine arguments; pass C5.0Control() args to the control object - #99

Open
topepo wants to merge 3 commits into
mainfrom
register-engine-args
Open

topepo wants to merge 3 commits into
mainfrom
register-engine-args

Conversation

@topepo

@topepo topepo commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Registrations. Engine arguments are now registered with parsnip::set_model_arg(), replacing the custom tunable.C5_rules() and tunable.cubist_rules() methods (and c5_rules_engine_args / add_engine_parameters()).

  • C5_rules() / C5.0: CF (confidence_factor()), noGlobalPruning (no_global_pruning()), winnow (predictor_winnowing()), fuzzyThreshold (fuzzy_thresholding()), bands (rule_bands()).
  • cubist_rules() / Cubist: extrapolation (extrapolation()), unbiased (unbiased_rules()).
  • Non-default main-argument ranges from the old methods moved into the registrations:
    • C5.0 trees: c(1, 100).
    • C5.0 min_n: c(2, 40).
    • Cubist committees: c(1, 100).
    • Cubist neighbors: c(0, 9).

The engine arguments now always appear in tunable() with component_id = "engine", as with other parsnip engines. Previously they appeared only if one was already marked tune().

Bug fix in c5_fit(). Engine arguments such as CF or winnow were passed to C50::C5.0() directly, which ignores them, so tuning them had no effect. They are now put into C50::C5.0Control().

  • An explicit control argument is now actually modified (minCases, default seed, earlyStopping = FALSE). Previously the modification was applied to the quosure and lost.
  • Defaults are no longer dropped when other engine args are supplied.
  • Passing both control and control arguments now errors.

Test fix. The Cubist "argument/call assembly" tests now derive their expected control lists from Cubist::cubistControl(). They had hard-coded the fields, and failed on main once Cubist added strip_time_stamps.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant