KNOBSynC: Kernel-estimated Nonparametric Overlap-Based Syncytial...

Description Usage Arguments Author(s) References Examples

View source: R/KNOB-SynC.R

Description

Merge clustering components using smooth estimation of the missclassification probabilities

Usage

1
KNOBSynC(x, kmns.results=NULL, K.given = NULL,Kmax = NULL,desired.ncores=2, EstK="jump",kernel = "RIG",kappa = NULL,b = NULL, idsTrue=NULL,inv.roles=FALSE,setseed=787,verbose=FALSE,...)

Arguments

x

vector or matrix

kmns.results

Default is NULL. If k-means results is provided will use it, if not will run k-means until Kmax and estimate the number of groups.

K.given

If the user wants to use a k-means with a K solution.

Kmax

Default is NULL.If not provided will choose Kmax = max50,sqrt(n)

desired.ncores

Number of desired cores. By default is min(detectCores(),desired.ncores=2)

EstK

If need to estimate the number of groups will use the Jump method of Sugar and James (2003). If EstK = "KL" will estimate the number of groups using Krznaswoki and Lai (1985).

kernel

Choice of the kernel to be use in the smooth estimation. Default is Reciprocal Inverse Gaussian (RIG), other choices are Gamma kernel, Gamma kernel with inverse roles and Gaussian kernel.

kappa

Merging parameter. This defined as kappa * gen.overlap. See Almodovar-Rivera and Maitra (2018).

b

Smoothing parameter (bandwith) to be use in the smooth estimation of the distribution function. If not value is provided will use a estimate of the MISE

idsTrue

If provided will compute the adjusted Rand Index at each step

inv.roles

Inverse role when using a gamma kernel estimator, Jeon and Kim (2013). Default is FALSE using Chen (2000).

setseed

Set seed values for replication purposes. Default seed is 787

verbose

FALSE

Show progress

Author(s)

Israel Almodóvar-Rivera and Ranjan Maitra.

References

Almodóvar-Rivera, I., & Maitra, R. (2018). Kernel-estimated Nonparametric Overlap-Based Syncytial Clustering. arXiv preprint arXiv:1805.09505.

Examples

 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
set.seed(787)
## Example 1: Merging will occur. Best clustering solution when generalized overlap = 
data(Bullseye)
oo <- KNOBSynC(x = Bullseye[,-3],verbose = TRUE)
Bullseye$IdsKmeans <- oo$Ids
Bullseye$IdsKNOBSynC <- oo$IdsMerge

par(mfrow=c(1,3))
with(Bullseye,plot(x = x,y = y, col=Ids,main="True"))
with(Bullseye,plot(x = x,y = y, col=IdsKmeans,main="k-means"))
with(Bullseye,plot(x = x,y = y, col=IdsKNOBSynC,main="KNOB-SynC"))

## Example 2 Merging will not occur since generalized-overlap approx max-overlap 

data(Spherical7)
oo <- KNOBSynC(x = Spherical7[,-3],verbose = TRUE)
Spherical7$IdsKmeans <- oo$Ids
Spherical7$IdsKNOBSynC <- oo$IdsMerge

par(mfrow=c(1,3))
with(Spherical7,plot(x = x,y = y, col=Ids,main="True"))
with(Spherical7,plot(x = x,y = y, col=IdsKmeans,main="k-means"))
with(Spherical7,plot(x = x,y = y, col=IdsKNOBSynC,main="KNOB-SynC"))

## Example 3 a more difficult data 
## take some time to finish

##data(SSS)
##oo <- KNOBSynC(x = SSS[,-3],verbose = TRUE,nstart = 100)
##SSS$IdsKmeans <- oo$Ids
##SSS$IdsKNOBSynC <- oo$IdsMerge

##par(mfrow=c(1,3))
##with(SSS,plot(x = x,y = y, col=Ids,main="True"))
##with(SSS,plot(x = x,y = y, col=IdsKmeans,main="k-means"))
##with(SSS,plot(x = x,y = y, col=IdsKNOBSynC,main="KNOB-SynC"))

ialmodovar/RSynC documentation built on Jan. 25, 2020, 8:41 p.m.