opf_train: Executes the training phase of the OPF classifier

View source: R/LibOPF.R

opf_trainR Documentation

Executes the training phase of the OPF classifier

Description

Executes the training phase of the OPF classifier

Usage

opf_train(dataSet, precomputedDistance = NA)

Arguments

dataSet

The training object produced by the opf_split (subGraph object)

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

Examples

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)


LibOPF documentation built on Feb. 16, 2023, 10:13 p.m.