View source: R/ClusterReduction.R
Reduce the amount of data through using kmeans clustering algorithm Call the in R kmean cluster function in order to reduce a pool of data into a few, clustered points
1 2 | reduce_cluster(x, k, fileName, iter.max = 10, nstart = 1,
algorithm = "Lloyd", trace = FALSE)
|
x |
Data in the form of a data frame or data matrix, for safety, please use data.matrix(...) as a wrapper |
k |
Number of clusters to form |
fileName |
Name of file you wish to save a .csv formatted file to |
iter.max |
Number of iterations to use at a maximum (default = 10) |
nstart |
How many random sets to be chosen |
algorithm |
What algorithm to use (default="Lloyd"). choices include: "Hartigan-Wong", "LLoyd", "MacQueen", and "Forgy" |
trace |
logical or integer number, currently only used in the default method ("Hartigan-Wong"): if positive (or true), tracing information on the progress of the algorithm is produced. Higher values may produce more tracing information. @examples reduce_cluster(data.matrix(iris), 10, "myFile.csv") reduce_cluster(df, 15, "myManyIterationsFile.csv", iter.max=1000, algorithm="MacQueen") |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.