opf_distance {LibOPF} | R Documentation |
Generates the precomputed distance file for the OPF classifier
Description
Generates the precomputed distance file for the OPF classifier
Usage
opf_distance(dataSet, distanceOp, normalize = 0)
Arguments
dataSet |
The subGraph object, normaly is the whole data |
distanceOp |
Distance calculation option |
normalize |
Distance normalization? 1- yes 0 - no |
Details
Options for distance calculation:
1 - Euclidean
2 - Chi-Square
3 - Manhattan (L1)
4 - Canberra
5 - Squared Chord
6 - Squared Chi-Squared
7 - BrayCurtis
Value
Returns the distance matrix
Examples
dat <- opf_read_subGraph(system.file("extdata/boat.dat",package = "LibOPF"))
dist <- opf_distance(dat,3,0)
X <- opf_split(dat,0.5,0,0.5,0)
T <- X$training
T2 <- X$testing
Y <- opf_train(T,dist)
class <- opf_classify(T2, Y$classifier,dist)
acc <- opf_accuracy(T2, class)
[Package LibOPF version 2.6.2 Index]