Skip to contents

This function calculates variable importances when clustering with variable selection.

Usage

calc_cluster_importances(df, nrep = 100, ...)

Arguments

df

data.frame

nrep

(positive int) number of repetitions in the simulation (default 100)

...

arguments passed to add_cluster_assignment()

Value

(table) percentage of times each variable was used in the final clustering step

Details

Variable importances are estimated through simulation with nrep calls to add_cluster_assignment() with the specified configuration via .... The function retrieves the number of times each variable was kept at the final step of clustering.

Examples

if (FALSE) {
df |>
  calc_cluster_importances(k=2,
                           maxit=100,
                           elimination="bidirectional",
                           max_vars_rm_or_add_each_it=1)
}