ls_clust {lazy.cluster}R Documentation

k-means cluster analysis

Description

This function uses stats::kmeans to perform Least Squares cluster analysis under homoschedastic multivariate normal model.
The main purpose of this function is to be used from "dhclust" function.

Usage

ls_clust(df, ncl = 2, maxiter = 100, nstart = 1,
  init_method = "ward.D2", algorithm = "Hartigan-Wong", print = 1)

Arguments

df

obs x variable data frame

ncl

# of clusters to be sought

maxiter

max # of iterations

nstart

= 0 to use hclust solution as the initial
= n to use n random initails.

init_method

method for hclust

algorithm

parameter for kmeans

print

= 1 or 2 to print some result

Details

Since native kmeans does not work when nrow(df) == ncl,
including the case where nrow(df) == 2, some modifications were made
to the final result.

Value

A class "kemans" object which has
betweenss, totss, tot.withinss
are added.

Examples

resml <- ml_clust( circle2, 5, print=2 )


[Package lazy.cluster version 0.1.2 Index]