mspec {SpectralClMixed}R Documentation

Preforms spectral clustering on mix typed data

Description

Preforms spectral clustering of mix-type data

Usage

mspec(
  z,
  k = 2,
  sigma = c(20, 20),
  c_wt = NULL,
  starts = 10,
  its = 300,
  verbose = FALSE
)

Arguments

z

data to be clustered

k

the number of clusters.

sigma

vector of lower,upper bounds for sigma

c_wt

the category weights, is assigned to c(0.9999, 0.999, .99, seq(0.95, 0.05,-0.05), .01, 0.001, 0.0001) if null.

starts

the number of random starts

its

the max number of iterations for the kmeans algorithm

verbose

if you would like printed output during running of function

Value

A class SpectralClMixed list with components

ct_wt

the selected category weight

bt/wt_ss

the between divided by the within sum of squares

tot_wt_ss

the total within sum of squares

cluster

the cluster assignments

data

the original data

References

F. Mbuga and, C. Tortora. Spectral Clustering of Mixed-Type Data. Stats, 5(1) 2022

Examples

c1=data.frame(v1=rnorm(30,0),v2=rnorm(30,0),v3=factor(round(runif(30))+1))
c2=data.frame(v1=rnorm(30,2),v2=rnorm(30,4),v3=factor(round(runif(30))+4))
data=rbind(c1,c2)
res=mspec(data, k = 2)
summary(res)
plot(res)

[Package SpectralClMixed version 1.0.1 Index]