Description Usage Arguments Details Value Examples
Perform k-means clustering on data in Teradata
1 | td.kmeans(x, centers, iter.max=10, nstart=1)
|
x |
td data frame |
centers |
The number of clusters to produce. |
iter.max |
The maximum number of iterations allowed. |
nstart |
How many random sets should be chosen from which to select the initial centers. |
The data given by x(data in Teradata) is clustered by the k-means method, which aims partition the points into k groups such that the sum of squares from points to the assigned cluster centers is minimized. At the minimum, all cluster centers are at the mean of their Voronoi sets(the set of data points which are nearest to the cluster center).
An object of class "kmeans" which is a list with components:
clusterFor a td data frame this is NULL due to no data rows being in memory. centersA matrix of cluster centers. withinssThe within-cluster sum of squares for each cluster. sizeThe number of points in each cluster. There is a print method for this class.
1 2 3 4 5 6 | ## Not run:
tdf <- td.data.frame("customer")
tkm <- td.kmeans(tdf, 3)
tkm #print out kmeans class results
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.