returns a named vector, the names being the terminal node id in the tree and the values being the classification it corresponds to

get_cluster_mapping(tree)

Arguments

tree

a partykit::ctree fit

Value

a named vector

Examples

my_tree <- fit_ctree(small_5050_mix, c('CKB', 'ADA', 'ASNS', 'PRDX6', 'MZB1')) get_cluster_mapping(my_tree)
#> 3 5 6 8 9 #> 0 0 1 0 1 #> Levels: 0 1