circMclust: Circular Clustering

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Computation of cluster center points for circular regression data. A cluster method based on redescending M-estimators is used.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  circMclust(datax, datay, bw,
    method = "const", prec = 4,
    minsx = min(datax), maxsx = max(datax), nx = 10,
    minsy = min(datay), maxsy = max(datay), ny = 10,
    minsr = 0.01 * max(datax, datay),
    maxsr = (max(datax, datay) - min(datax, datay)),
    nr = 10, nsc = 5, nc = NULL,
    minsd = NULL, maxsd = NULL,
    brminx = minsx, brmaxx = maxsx,
    brminy = minsy, brmaxy = maxsy,
    brminr = minsr, brmaxr = maxsr,
    brmaxit = 1000)

## S3 method for class 'circMclust'
plot(x, datax, datay, ccol="black", clty=1, clwd=3, ...)
## S3 method for class 'circMclust'
print(x, ...)

Arguments

datax, datay

numerical vectors of coordinates of the observations.

bw

positive number. Bandwidth for the cluster method.

method

optional string. Method of choosing starting values for maximization. Possible values are:

  • "const": a constant number of circles is used. By default, nx*ny equidistant midpoints within the range of the observations with nr different radiuses are uses as starting circles. The domain of the midpoints and radiuses can optionally be given by [minsx, maxsx], [minsy, maxsy], and [minsr, maxsr].

  • "all": every circle through any three observations is used.

  • "prob": Clusters are searched iteratively with randomly chosen starting circles until either no new clusters are found (default), or until nc clusters are found. The precision of distinguishing the clusters can be tuned with the parameter prec. In each iteration nc times a circle through three randomly chosen observations is used as starting value. With the parameters minsd and maxsd the minimal and maximal distance of these observations could be limited.

nx, ny

optional positive integer. Number of starting midpoints for method "const"

nr

optional positive integer. Number of starting radiuses for method "const"

prec

optional positive integer. Tuning parameter for distinguishing different clusters, which is passed to deldupMclust.

minsx, maxsx, minsy, maxsy, minsr

optional numbers determining the domain of starting midpoints and the range of radii for method "const"

maxsr

optional number determining the maximum radius used as starting value. Note that this is valid for all methods while minsx, maxsx, minsy, maxsy, and minsr are only used for method "const".

nsc

optional positive integer. Number of starting circles in each iteration for method "prob".

nc

optional positive integer. Number of clusters to search if method "const" is chosen. Note that if nc is too large, i.e., nc clusters cannot be found, the function does not terminate. Attention! Using Windows, it is impossible to interrupt the routine manually in this case!

minsd, maxsd

optional positive numbers. Minimal and maximal distance of starting points which are used for method "const".

brminx, brmaxx, brminy, brmaxy, brminr, brmaxr

optional numbers. The maximization is stopped if the midpoint leaves the domain [brminx, brmaxx] x [brminy, brmaxy] or if the radius leaves [brminr, brmaxr].

brmaxit

optional positive integer. Since the maximization could be very slow in some cases, depending on the starting value, the maximization is stopped after brmaxit iterations.

x

object returned by circMclust

ccol, clty, clwd

optional graphic parameters used for plotting the circles.

...

additional parameters passed to plot.

Details

circMclust implements a cluster method using local maxima of redescending M-estimators for the case of circular regression. This method is based on a method introduced by Mueller and Garlipp in 2003 (see references).

See also bestMclust, projMclust, and envMclust for choosing the 'best' clusters out of all found clusters.

Value

Numerical matrix containing one row for every found cluster circle. The columns "cx" and "cy" are their midpoints and "r" are the radii.

The columns "value" and "count" give the value of the objective function and the number how often each cluster is found.

Author(s)

Tim Garlipp, TimGarlipp@gmx.de

References

Mueller, C. H., & Garlipp, T. (2005). Simple consistent cluster methods based on redescending M-estimators with an application to edge identification in images. Journal of Multivariate Analysis, 92(2), 359–385.

See Also

bestMclust, projMclust, envMclust, deldupMclust

Examples

1
2
3
4
5
6
7
8
  z = (1:100 * pi)/50
  x = c(sin(z) * 10 + 20, sin(z) * 30 + 80) + rnorm(200,0,2)
  y = c(cos(z) * 10 + 20, cos(z) * 30 + 80) + rnorm(200,0,2)

  circ = circMclust(x, y, 5, method = "prob",
    prec = 1, nsc = 20, minsd = 10, maxsd = 40)
  bestMclust(circ, 2)
  plot(bestMclust(circ, 2), x, y)

Example output

Break with <CTRL>-C (linux) or <ESC> (windows)
Found clusters:  2 
Found clusters:  2 
       cx   cy    r    value count
[1,] 19.9 20.0 10.4 37.18032    34
[2,] 80.2 79.8 30.0 37.04152     5

edci documentation built on May 1, 2019, 7:44 p.m.

Related to circMclust in edci...