compute.laplacian.NJW {sClust}R Documentation

Gram similarity matrix checker

Description

Function which select the number of cluster to compute thanks to a selected method

Usage

compute.laplacian.NJW(W, verbose = FALSE)

Arguments

W

Gram Similarity Matrix.

verbose

To output the verbose in the terminal.

Value

returns a list containing the following elements:

Author(s)

Emilie Poisson Caillault and Erwan Vincent

Examples

### Example 1: 2 disks of the same size
n<-100 ; r1<-1
x<-(runif(n)-0.5)*2;
y<-(runif(n)-0.5)*2
keep1<-which((x*2+y*2)<(r1*2))
disk1<-data.frame(x+3*r1,y)[keep1,]
disk2 <-data.frame(x-3*r1,y)[keep1,]
sameTwoDisks <- rbind(disk1,disk2)
W <- compute.similarity.ZP(scale(sameTwoDisks))
W <- checking.gram.similarityMatrix(W)
res <- compute.laplacian.NJW(W,verbose = TRUE)

### Example 2: Speed and Stopping Distances of Cars
W <- compute.similarity.ZP(scale(cars))
W <- checking.gram.similarityMatrix(W)
res <- compute.laplacian.NJW(W,verbose = TRUE)

[Package sClust version 1.0 Index]