Description Usage Arguments Details Value Author(s) See Also Examples
Computes the leave-one-out one-nearest-neighbor cross-validation of an arbitrary distance matrix.
1 | loo1nn.cv(d, G)
|
d |
A |
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. |
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.
The computed proportion.
Pablo Montero Manso, José Antonio Vilar.
cluster.evaluation
, loo1nn
, knn.cv
,
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)
|
Loading required package: wmtsa
Loading required package: pdc
Loading required package: cluster
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
[1] 0.4444444
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.