Learn R Programming

LibOPF (version 2.6.2)

opf_classify: Executes the test phase of the OPF classifier

Description

Executes the test phase of the OPF classifier

Usage

opf_classify(dataSet, classifier, precomputedDistance = NA)

Value

Returns the given subGraph classification list (predicted labels)

Arguments

dataSet

The testing data object produced by the opf_split function (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)

Examples

Run this code
dat <- opf_read_subGraph(system.file("extdata/boat.dat",package = "LibOPF"))
X <- opf_split(dat,0.5,0,0.5,0)
T <- X$training
T2 <- X$testing
Y <- opf_train(T)
class <- opf_classify(T2, Y$classifier)
acc <- opf_accuracy(T2, class)

Run the code above in your browser using DataLab