eval_cluster_performance: Evaluate clustering performance

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utils.R

Description

eval_cluster_performance is a wrapper function for computing clustering performance in terms of ARI and clustering assignment error.

Usage

1

Arguments

obj

Output of Melissa inference object.

C_true

True cluster assignemnts.

Value

The 'melissa' object, with an additional slot named 'clustering', containing the ARI and clustering assignment error performance.

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

See Also

create_melissa_data_obj, melissa, filter_regions, eval_imputation_performance, eval_cluster_performance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Extract synthetic data
dt <- melissa_synth_dt

# Partition to train and test set
dt <- partition_dataset(dt)

# Create basis object from BPRMeth package
basis_obj <- BPRMeth::create_rbf_object(M = 3)

# Run Melissa
melissa_obj <- melissa(X = dt$met, K = 2, basis = basis_obj, vb_max_iter = 10,
  vb_init_nstart = 1, is_parallel = FALSE, is_verbose = FALSE)

# Compute cluster performance
melissa_obj <- eval_cluster_performance(melissa_obj, dt$opts$C_true)

cat("ARI: ", melissa_obj$clustering$ari)

Melissa documentation built on Nov. 8, 2020, 5:37 p.m.