loo1nn.cv: Clustering Evaluation Index Based on Leave-one-out...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Computes the leave-one-out one-nearest-neighbor cross-validation of an arbitrary distance matrix.

Usage

1
loo1nn.cv(d, G)

Arguments

d

A dist object.

G

Integer vector with the labels of the true cluster solution. Each element of the vector specifies the cluster 'id' that the element belongs to.

Details

Computes the proportion of succesful clusters that the given distance matrix produces using leave-one-out one-nearest-neighbor cross-validation. Distance ties are solved by majority vote. A tie while voting produces a warning and is solved by selecting a candidate cluster at random.

Value

The computed proportion.

Author(s)

Pablo Montero Manso, José Antonio Vilar.

See Also

cluster.evaluation, loo1nn, knn.cv,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 data(synthetic.tseries)
 
 #create the ground thruth cluster 
 G <- rep(1:6, each = 3)
 
 #obtain candidate distance matrix (dist object)
 dACF <- diss(synthetic.tseries, "ACF")
 
 #calculate the cross-validation
 loo1nn.cv(dACF, G)
 


Search within the TSclust package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.