opf_knn_classify {LibOPF}R Documentation

Executes the test phase of the OPF classifier with knn adjacency

Description

Executes the test phase of the OPF classifier with knn adjacency

Usage

opf_knn_classify(dataSet, classifier, precomputedDistance = NA)

Arguments

dataSet

The testing object produced by the opf_split (subGraph object)

classifier

The classifier object produced by one of the classification functions (model object)

precomputedDistance

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

Value

Returns the given subGraph classification list

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]