Clusters the vectors using 2-stage clustering algorithm
cluster_text(mat, dev_mat, n_clusters, cleanDFM, num_terms)
mat | The clean dfm as a matrix and transposed, from |
---|---|
dev_mat | The deviation matrix of the dfm, from |
n_clusters | number of desired clusters |
cleanDFM | DFM object from |
num_terms | Minimum number of terms per document |
Applies 2 stage clustering algorithm, using Ward's method for hierarchical agglomerative clustering to set the centers for the specified number of clusters. K-means algorithm uses these centers as a starting point and fits its model. @export