% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GenData.R \name{GenData} \alias{GenData} \title{Generates multi-dimensional random partition.} \usage{ GenData(n, p, C, k = 0, s = 5, dg = 5) } \arguments{ \item{n}{Size of observations.} \item{p}{Dimension of data.} \item{C}{The number of clusters.} \item{k}{Default is 0. The number of small clusters. Proportion of sum of small clusters is set to have 10\% of data.} \item{s}{Positive number. Default is 5. A partition is generated in (-s,s) p-cells.} \item{dg}{Positive number. Default is 5*p. Degree of inverse Wishart distribution, which determine the separability of clusters.} } \value{ List of n by p data coordinates matrix (X) and n length cluster label vector (m). } \description{ This function generates multi-dimensional Gaussian random partition for simulation study. } \examples{ # set OTA package directory and compile C code. SetOTA(directory) set.seed(2070) dat = GenData(n=5000,p=2,C=4) # set parameters for 'kmeans' method in GenBsSamps. C=4 bs.samps = GenBsSamps(dat$X,100,"kmeans") # find mean partition and uncertainty statistics. idx = align2(bs.samps$Z,100) res = MeanPart(bs.samps$Z, 100, idx) # plot the result on two dimensional space. plot.part(dat$X,dat$z) # ground truth plot.part(dat$X,kmeans(dat$X,C)$cluster) # baseline method plot.part(dat$X,res$repre) # OTA # distance between ground truth and each partition WassDist(c(dat$z,kmeans(dat$X,C)$cluster,res$repre),3) }