td.kmeans: K-Means Clustering

Description Usage Arguments Details Value Examples

View source: R/td.kmeans.R

Description

Perform k-means clustering on data in Teradata

Usage

1
td.kmeans(x, centers, iter.max=10, nstart=1)

Arguments

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.

Details

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).

Value

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.

Examples

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)

nonsleepr/teradataR documentation built on May 23, 2019, 9:32 p.m.