Description Usage Arguments Value Examples
If a specific algorithm is not specified by the user, it will perform all original cluster number approximation algorithms and their associated kluster forms and will provide data for comparative analysis of the results as well as the processing time. The actual number of clusters needs to be provided for the function to calculate approximation error. Please not that if the dataset is large (i.2., > 50k), the original algorithms may not work and R will crash.
1 | kluster_sim(data, clusters, iter_sim, iter_klust, smpl, algorithm = "Default", cluster = FALSE)
|
data |
|
clusters |
number of clusters, as we know, for calculating error. This is a requirement for this function. If you don't know the number of clusters, user 'kluster' function instead. |
iter_sim |
number of simulation iterations |
iter_klust |
number of iterations for clustering with sample_n size x |
smpl |
size of the sample_n to be taken with replacement out of data |
algorithm |
select analysis algorithm from BIC, PAMK, CAL, and AP. "Default" returns results from all available algorithms. |
cluster |
if TURE it'll do clustering which will take a lot longer! |
returns the following values:
sim |
For the selected algorithm, returns both the most frequent and the average approximated number of clusters produced by kluster procedure, results from running the original algorithm, and processing time and error for each |
m_bic_k,m_cal_k,m_ap_k,m_pam_k |
the average approximated number of cluster for each selected algorithm |
f_bic_k,f_cal_k,f_ap_k,f_pam_k |
the most frequent approximated number of cluster for each selected algorithm |
alg_orig |
the original algorithm's approximation |
1 2 3 | dat = read.csv("data/Breast_Cancer_Wisconsin.csv")
##returning kluster's most frequent product using the BIC algorithm:
k = kluster_sim(data = dat[,c("area_mean","texture_mean")], clusters = 2, iter_sim = 10, iter_klust = 100, smpl = 100)$sim
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.