get_rafs_occurrence_matrix {RAFS} | R Documentation |
Get co-occurrence matrix from RAFS results
Description
This function obtains a matrix describing a graph of co-occurrence
at each count of clusters (from n_clusters_range
) computed
over all runs of RAFS.
Usage
get_rafs_occurrence_matrix(
rafs_results,
interesting_reps,
n_clusters_range = 2:15
)
Arguments
rafs_results |
RAFS results as obtained from |
interesting_reps |
the interesting representatives to build matrices for (in principle, these need not be representatives but it is more common) |
n_clusters_range |
range of clusters number to obtain matrices for |
Details
If a single result over a cluster number range is desired, the selected matrices can be summed.
Value
A nested list
with matrices.
The first level is per the RAFS variant (combination of feature dissimilarity function and hclust method).
The second level is per the number of clusters.
The third (and last) level is the co-occurrence matrix.
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)
rafs_top_reps <- get_rafs_top_reps_from_popcnts(rafs_reps_popcnts$stig_single, 5)
get_rafs_occurrence_matrix(rafs_results, rafs_top_reps, 5)
[Package RAFS version 0.2.4 Index]