Description Usage Arguments Details Value References Examples

The Randomized Self-Updating Process Clustering (randomized SUP) is a modification of the original SUP algorithm. The randomized SUP randomly generates the partition of the instances during each iterations. At each iteration, the self updating process is conducted independently in each partition in order to reduce the computation and the memory.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 |

`x` |
data matrix. Each row is an instance of the data. |

`r` |
numeric vector or |

`rp` |
numeric vector or |

`t` |
either numeric vector, list of function, or one of |

`k` |
integer value. The number of the partitions. |

`groups` |
list. The first element is the partition of the first iteration, and the second element is the partition
of the second iteration, etc. If the number of the iteration exceeds |

`tolerance` |
numeric value. The threshold of convergence. |

`cluster.tolerance` |
numeric value. After iterations, if the distance of two points are smaller than |

`drop` |
logical value. Whether to delete the list structure if its length is 1. |

`implementation` |
eithor |

`sort` |
logical value. Whether to sort the cluster id by size. |

`verbose` |
logical value. Whether to show the iteration history. |

Please check the vignettes via `vignette("supc", package = "supc")`

for details.

`supc1`

returns a list of objects of class "supc".

Each "supc" object contains the following elements:

`x` |
The input matrix. |

`d0` |
The pairwise distance matrix of |

`r` |
The value of |

`t` |
The function |

`cluster` |
The cluster id of each instance. |

`centers` |
The center of each cluster. |

`size` |
The size of each cluster. |

`iteration` |
The number of iterations before convergence. |

`groups` |
The partition of each iteration. |

`result` |
The position of data after iterations. |

Shiu, Shang-Ying, and Ting-Li Chen. 2016. "On the Strengths of the Self-Updating Process Clustering Algorithm." Journal of Statistical Computation and Simulation 86 (5): 1010–1031. doi: 10.1080/00949655.2015.1049605.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ```
# The shape data has a structure of five clusters and a number of noise data points.
makecircle=function(N, seed){
n=0
x=matrix(NA, nrow=N, ncol=2)
while (n<N){
tmp=runif(2, min=0, max=1)*2-1
if (sum(tmp^2)<1) {
n=n+1
x[n,]=tmp
}
}
return(x)
}
makedata <- function(ns, seed) {
size=c(10,3,3,1,1)
mu=rbind(c(-0.3, -0.3), c(-0.55, 0.8), c(0.55, 0.8), c(0.9, 0), c(0.9, -0.6))
sd=rbind(c(0.7, 0.7), c(0.45, 0.2), c(0.45, 0.2), c(0.1, 0.1), c(0.1, 0.1))
x=NULL
for (i in 1:5){
tmp=makecircle(ns*size[i], seed+i)
tmp[,1]=tmp[,1]*sd[i,1]+mu[i,1]
tmp[,2]=tmp[,2]*sd[i,2]+mu[i,2]
x=rbind(x, tmp)
}
tmp=runif(floor(ns/3), min=0, max=1)/5-0.1
tmp=cbind(tmp, 0.8*rep(1, floor(ns/3)))
x=rbind(x, tmp)
x=rbind(x, matrix(1, nrow=2*ns, ncol=2)*2-1)
return(x)
}
shape1 <- makedata(250, 100)
dim(shape1)
plot(shape1)
X.supc=supc.random(shape1, r=0.5, t="dynamic", k = 500, implementation = "R")
plot(shape1, col=X.supc$cluster)
``` |

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.