Skip to contents

Experimental Rcpp-backed versions of the greedy concentration-index split search helpers. These functions keep the same return shape as the current R split helpers, but take type instead of a prebuilt ci_fun because the concentration-index scoring is evaluated in C++.

Usage

best_numeric_split_cpp(
  x,
  y,
  wt,
  varid,
  ctrl,
  type = c("CI", "CIg", "CIc", "L"),
  return = c("split", "candidate")
)

best_factor_split_cpp(
  x_full,
  keep,
  y_full,
  wt_full,
  varid,
  ctrl,
  type = c("CI", "CIg", "CIc", "L"),
  return = c("split", "candidate")
)

best_split_for_one_variable_cpp(
  x,
  y,
  wt,
  varid,
  ctrl,
  type = c("CI", "CIg", "CIc", "L")
)

best_global_ci_split_cpp(
  x,
  y,
  wt,
  ctrl,
  type = c("CI", "CIg", "CIc", "L"),
  vars = seq_along(x)
)

Arguments

x

A numeric predictor vector.

y, y_full

A two-column numeric response matrix.

wt, wt_full

Case weights.

varid

Integer identifier of the splitting variable.

ctrl

A control list created by ci_tree_control() or compatible.

type

One of "CI", "CIg", "CIc", or "L".

return

Either "split" or "candidate".

x_full

A factor predictor containing all original levels.

keep

A logical vector selecting the observations currently available for splitting.

vars

Optional integer variable ids to search. Defaults to all columns of x.

Value

A partysplit object, split candidate list, or NULL.