Validates a candidate clustering result returned by
KmeansInference::kmeans_inference() for a given seed: it
must have exactly NC distinct clusters, and both requested
clusters must be present among them. Stops with an informative
error asking the user to try a different seed otherwise.
Arguments
- candidate
The output of
KmeansInference::kmeans_inference().- NC
Integer scalar giving the number of clusters.
- clusters
Integer vector of length 2 specifying the pair of clusters to compare. Entries must belong to
1:NC.- seed
The seed used to produce
candidate(orNULL), only used to compose the error message.
See also
Other Utilities:
ARI(),
is.CS(),
preserve.cl(),
setup.model(),
test_statistic(),
validate_hc_setting(),
validate_km_setting(),
validate_ndraws(),
validate_seed()