# otplot: Visulize a partition on 2 dimensional space In OTclust: Mean Partition, Uncertainty Assessment, Cluster Validation and Visualization Selection for Cluster Analysis

## Description

This function plots a partition on 2 dimensional reduced space.

## Usage

 ```1 2``` ```otplot(data, labels, convex.hull = F, title = "", xlab = "", ylab = "", legend.title = "", legend.labels = NULL, add.text = T) ```

## Arguments

 `data` – cordinates matrix of data. `labels` – cluster labels. `convex.hull` – logical. If it is `True`, the plot draws convex hull for each cluster. `title` – title `xlab` – xlab `ylab` – ylab `legend.title` – legend title `legend.labels` – legend labels `add.text` – default True

none

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17``` ```data(sim1) # the number of clusters. C = 4 ens.data = ensemble(sim1\$X[1:50,], nbs=50, clust_param=C, clustering="kmeans", perturb_method=1) # find mean partition and uncertainty statistics. ota = otclust(ens.data) # calculate baseline method for comparison. kcl = kmeans(sim1\$X[1:50],C) # align clustering results for convenience of comparison. compar = align(cbind(sim1\$z[1:50],kcl\$cluster,ota\$meanpart)) lab.match = lapply(compar\$weight,function(x) apply(x,2,which.max)) kcl.algnd = match(kcl\$cluster,lab.match[[1]]) ota.algnd = match(ota\$meanpart,lab.match[[2]]) # plot the result on two dimensional space. otplot(sim1\$X[1:50,],ota.algnd,con=FALSE,title='Mean partition') # mean partition by OTclust ```

OTclust documentation built on May 6, 2019, 9 a.m.