Learn R Programming

datanugget (version 1.0.0)

WWCSS: Weighted Within Cluster Sum of Squares

Description

This function computes the weighted within cluster sum of squares (WWCSS) for a set of cluster assignments provided to a dataset with some weighting scheme.

Usage

WWCSS(x,
      k,
      P)

Arguments

x

A data matrix (data frame, data table, matrix, etc) containing only entries of class numeric (i.e. matrix of data nugget centers). Must contain the location, weight, and cluster assignment for each observation.

k

The number of possible clusters. Must be of class numeric.

P

The number of columns from the original dataset before clustering and without weight variable. Must be of class numeric.

Value

output

Vector of individual WWCSS's for each cluster

sum.output

Combined sum of all individual WWCSS's.

Details

The WWCSS is used for optimizing the cluster assignments in the WKmeans function. NOTE THAT THIS FUNCTION IS NOT DESIGNED FOR USE OUTSIDE OF THE WKmeans FUNCTION.

References

Data Nuggets: A Method for Reducing Big Data While Preserving Data Structure (Submitted for Publication, 2019)