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

Gap statitistic is a measurement of goodness of clustering result. This is a convenient function to calculate the gap statistic of clustering "moa".

1 2 3 4 5 | ```
moGap(x, K.max, B = 100, cluster = c("kmeans", "hclust"), plot = TRUE,
dist.method = "euclidean", dist.diag = FALSE, dist.upper = FALSE, dist.p = 2,
hcl.method = "complete", hcl.members = NULL,
km.iter.max = 10, km.nstart = 10,
km.algorithm = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen"), km.trace = FALSE)
``` |

`x` |
An object of class |

`K.max` |
The maximum number of clusters to consider, passed to |

`B` |
The number of bootstrap, passed to |

`cluster` |
A charater string could be either "kmeans" or "hclust" to specify the clustering algorithm. |

`plot` |
Logical; whether return the gap statistic plot. |

`dist.method` |
Distance meaurement, passed to function |

`dist.diag` |
Passed to function |

`dist.upper` |
Passed to function |

`dist.p` |
Passed to function |

`hcl.method` |
Hierarchical clustering method, passed to |

`hcl.members` |
Passed to |

`km.iter.max` |
Maximum number of iteration in kmeans, passed to |

`km.nstart` |
An integer to specify how many random sets should be chosen. passed to |

`km.algorithm` |
Kmeans algorithm, passed to |

`km.trace` |
See function |

It returns a list consists of five components:

"Tab", "n", "B", "FUNcluster" - see `clusGap`

"nClust" - the estimated number of clusters using different method, see `maxSE`

Chen Meng

Tibshirani, R., Walther, G. and Hastie, T. (2001). Estimating the number of data clusters via the Gap statistic. Journal of the Royal Statistical Society B, 63, 411-423.

Maechler, M., Rousseeuw, P., Struyf, A., Hubert, M., Hornik, K.(2015). cluster: Cluster Analysis Basics and Extensions. R package version 2.0.1.

Function "clusGap" in "cluster" package Function "dist", "hclust", "kmeans"

1 2 3 4 5 6 7 8 9 10 |

mengchen18/mogsa documentation built on Dec. 1, 2018, 7:13 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.