opf_cluster {LibOPF}R Documentation

Computes clusters by unsupervised OPF

Description

Computes clusters by unsupervised OPF

Usage

opf_cluster(dataSet, kmax, calculateOp, value, precomputedDistance = NA)

Arguments

dataSet

The training object produced by the opf_split function (subGraph object)

kmax

The kmax (maximum degree for the knn graph)

calculateOp

Clusters by: 0 for height, 1 for area and 2 for volume

value

Value of parameter "calculateOp" in [0-1]

precomputedDistance

The precomputed distance matrix produced by the opf_distance (leave it in blank if you are not using this resource)

Value

Returns a list which contains the classifier object and the classification list object (i.e., clusters' id)

Examples

dat <- opf_read_subGraph(system.file("extdata/boat.dat",package = "LibOPF"))
X <- opf_split(dat,0.8,0,0.2,0)
T <- X$training
T2 <- X$testing
Y <- opf_cluster(T,100,1,0.2)
class <- opf_knn_classify(T2, Y$classifier)
acc <- opf_accuracy(T2, class)


[Package LibOPF version 2.6.2 Index]