acca | R Documentation |
A C++ implementation of the Average Correlation Clustering Algorithm (ACCA) https://www.sciencedirect.com/science/article/pii/S1532046410000158, originally developed for genetic studies using Pearson correlation as a similarity measure. Unlike traditional clustering methods that rely on distance metrics such as Euclidean or Mahalanobis distance, ACCA groups data based on correlation patterns.
This implementation works directly with the correlation matrix derived from the corr_matrix
function and supports mixed data types along with various correlation methods.
ACCA is an unsupervised clustering method, meaning it identifies patterns without predefined labels. Similar to k-means, it requires defining the K parameter, which controls the number of clusters.
acca(m, k, ...)
## S3 method for class 'cmatrix'
acca(m, k, maxrep = 2L, maxiter = 100L, ...)
## S3 method for class 'matrix'
acca(m, k, maxrep = 2L, maxiter = 100L, ...)
m |
[ |
k |
[ |
... |
Not used. Included for S3 method consistency. |
maxrep |
[ |
maxiter |
[ |
[acca_list
]
A list with the final result of the clustering method.
That is, every element of the list group names of the variables belonging to each cluster k.
Igor D.S. Siciliani, Paulo H. dos Santos
Bhattacharya, Anindya, and Rajat K. De. "Average correlation clustering algorithm (ACCA) for grouping of co-regulated genes with similar pattern of variation in their expression values." Journal of Biomedical Informatics 43.4 (2010): 560-568.
# Clustering a correlation matrix with 3 clusters
x <- corrp::corrp(iris)
m <- corrp::corr_matrix(x)
result <- corrp::acca(m, k = 3)
print(result)
# Clustering with 5 clusters and increasing the maximum number of interactions
x <- corrp::corrp(iris)
m <- corrp::corr_matrix(x)
result <- corrp::acca(m, k = 5, maxiter = 200)
print(result)
# Adjusting the maximum number of iterations without change in clusters
x <- corrp::corrp(iris)
m <- corrp::corr_matrix(x)
result <- corrp::acca(m, k = 2, maxrep = 50)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.