Description Usage Arguments Value Examples

Partition Assisted Clustering PAC 1) utilizes dsp or bsp-ll to recursively partition the data space and 2) applies a short round of kmeans style postprocessing to efficiently output clustered labels of data points.

1 |

`data` |
a n x p data matrix |

`K` |
number of final clusters in the output |

`maxlevel` |
the maximum level of the partition |

`method` |
partition method, either "dsp(discrepancy based partition)", or "bsp(bayesian sequantial partition)" |

`max.iter` |
maximum iteration for the kmeans step |

y cluter labels for the input

1 2 3 4 5 6 7 8 9 10 | ```
n = 5e3 # number of observations
p = 1 # number of dimensions
K = 3 # number of clusters
w = rep(1,K)/K # component weights
mu <- c(0,2,4) # component means
sd <- rep(1,K)/K # component standard deviations
g <- sample(1:K,prob=w,size=n,replace=TRUE) # ground truth for clustering
X <- as.matrix(rnorm(n=n,mean=mu[g],sd=sd[g]))
y <- PAC(X, K)
print(fmeasure(g,y))
``` |

```
Input Data: 5000 by 1
Partition method: Discrepancy based partition
Maximum level: 40
partition completed
[1] "Initial Clustering..."
[1] "Merging..."
[1] 0.9964212
```

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.