Skip to contents

Register xplus() as a parsnip model (pu_xplus with engine "xplus") so PU learning composes with tidymodels: tune::tune_grid(), finetune::tune_sim_anneal(), and rsample resamples all work against the backend contract. The backend argument selects the learner — a built-in name, an xplus_backend() spec, or a constructor name — and backend-constructor arguments (trees, learn_rate, tree_depth, min_n, mtry, sample_size, loss_reduction) are tunable through tune() placeholders. Registration happens automatically when parsnip is installed; call this function to re-register after loading parsnip manually.

Usage

xplus_parsnip_register()

Value

Invisibly, TRUE when the model was registered.

Examples

if (FALSE) { # \dontrun{
library(parsnip)
spec <- pu_xplus(backend = "xgboost", trees = 300, learn_rate = 0.05) |>
  set_engine("xplus")
fit <- fit_xy(spec, x = data.frame(x), y = factor(y, levels = 0:1))
} # }