Skip to contents

Computes the unsplit/root concentration-index objective for a data set using the same validation and scoring convention as tune_ci_tree() and tune_ci_forest(). This is useful as a baseline for interpreting training and validation gain.

Usage

ci_root_impurity(
  data,
  rank_name,
  outcome_name,
  weights = NULL,
  type = c("CI", "CIg", "CIc", "L")
)

Arguments

data

A data frame containing the rank and outcome columns.

rank_name

Name of the socioeconomic rank variable.

outcome_name

Name of the outcome variable.

weights

Optional non-negative case weights. Defaults to equal weights.

type

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

Value

A single numeric root impurity value.