CEC: Cross-Entropy Clustering

Description Usage Arguments Examples

View source: R/cec.R

Description

Create CEC model object

Usage

1
2
3
4
5
CEC(x = NULL, k = 0, method.type = "standard", method.init = "kmeans++",
  params.r = 0, params.cov = matrix(0), params.centroids = NULL,
  params.mix = NULL, params.function = NULL, control.nstart = 10,
  control.eps = 0.05, control.itmax = 25, log.energy = TRUE,
  log.ncluster = TRUE, seed = NULL)

Arguments

x

Numeric matrix of data.

k

Initial number of clusters.

method.type

Type of clustering (Gaussian family).

  1. 'diagonal' Gaussians with diagonal covariance. The clustering will try to divide the data into ellipsoid with radiuses parallel to coordinate axes

  2. 'fixed_spherical' Spherical (radial) Gaussian densities (additional parameter - radius)

  3. 'fixed_covariance' The clustering will have the tendency to divide the data into clusters resembling the unit circles in the Mahalanobis distance (additional parameter - covaraince matrix required)

  4. 'func' Own function dependent on m and sigma (additional parameter)

  5. 'standard' We divide dataset into ellipsoid-like clusters without any preferences (default)

  6. 'spherical' The clustering will try to divide the data into circles of arbitrary sizes

method.init

Method to initialize clusters.

  1. 'centroids'

  2. 'kmeans++'

  3. 'random'

params.r

Radius for spherical family.

params.cov

Covariance matrix for covariance family.

params.centroids

List of centroids.

params.mix

List of cluster with mixed Gaussian types.

params.function

User energy function

control.nstart

How many times to perform algorithm.

control.eps

What change of value should terminate algorithm.

control.itmax

Maximum number of iterations at each start.

log.energy

Records collected energy of all clusters in each iteration.

log.ncluster

Records number of clusters in each iteration.

seed

User seed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 
CEC(k=3, x=dataset)

CEC(k=3, x=dataset, control.nstart=10, method.type='spherical', control.eps=0.05)

CEC(k=2, x=dataset, method.type='spherical', method.init='centroids',
   params.centroids=list(c(-0.5,0.5),c(0,0)))

CEC(k=5, x=dataset, method.type='fixed_spherical', params.r=0.01,
   control.nstart=10, control.eps=0.07)

CEC(k=5, x=dataset, method.type='fixed_covariance',
   params.cov=matrix(c(0.03,0,0,0.01),2), control.nstart=10, control.eps=0.06)

CEC(k=1, x=dataset, method.type='func',
   params.function='name_of_my_own_function')

fixed_spherical_cluster_param = list(method.type = 'fixed_spherical', params.r = 0.001),
covariance_cluster_param = list(method.type = 'fixed_covariance',
   params.cov=matrix(c(0.05, 0, 0, 0.001), 2))
CEC(x = dataset, params.mix = list(covariance_cluster_param,
   fixed_spherical_cluster_param, fixed_spherical_cluster_param,
   fixed_spherical_cluster_param, fixed_spherical_cluster_param), control.nstart = 10)

p1 = list(method.type='spherical', k=3)
p2 = list(method.type='diagonal', k=2)
CEC(x=dataset, params.mix=list(p1, p2))

## End(Not run)

gmum.r documentation built on May 29, 2017, 3:52 p.m.

Related to CEC in gmum.r...