get_rafs_top_reps_from_popcnts {RAFS}R Documentation

Get top (i.e., most common) representatives from their popcnts

Description

This helper function works on results of get_rafs_reps_popcnts to obtain the desired number of top (most common) representatives at the chosen number of clusters.

Usage

get_rafs_top_reps_from_popcnts(reps_popcnts, n_clusters, n_reps = n_clusters)

Arguments

reps_popcnts

popcnts for the chosen variant as obtained from get_rafs_reps_popcnts

n_clusters

the desired number of clusters

n_reps

the desired number of top representatives

Value

A vector of top representatives.

Examples

library(MDFS)
mdfs_omp_set_num_threads(1)  # only to pass CRAN checks
data(madelon)
rafs_results <- run_rafs(madelon$data, madelon$decision, 2, c(12345))
rafs_reps_popcnts <- get_rafs_reps_popcnts(rafs_results, 5)
get_rafs_top_reps_from_popcnts(rafs_reps_popcnts$stig_single, 5)

[Package RAFS version 0.2.4 Index]