opf_distance | R Documentation |
Generates the precomputed distance file for the OPF classifier
opf_distance(dataSet, distanceOp, normalize = 0)
dataSet |
The subGraph object, normaly is the whole data |
distanceOp |
Distance calculation option |
normalize |
Distance normalization? 1- yes 0 - no |
Options for distance calculation:
1 - Euclidean
2 - Chi-Square
3 - Manhattan (L1)
4 - Canberra
5 - Squared Chord
6 - Squared Chi-Squared
7 - BrayCurtis
Returns the distance matrix
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.