knnTree {knnTree} | R Documentation |
Construct or predict with a knnTree object, which is a set of k-nearest neighbor classifiers, one for each leaf of a tree.
knnTree (trg.set, trg.classes, v = 10, k.vec = seq(1, 31, by = 2), seed = 0, opt.tree = "ignore", opt.tree.size = 4, scaling = 1, prune.function = prune.misclass, one.SE = TRUE, backward = FALSE, max.steps=-1, v.start = 1, leaf.start = 1, verbose = FALSE, debug = 0, fname = "", use.big = FALSE, save.output = "")
trg.set |
|
trg.classes |
|
v |
|
k.vec |
|
seed |
|
opt.tree |
|
opt.tree.size |
|
scaling |
|
prune.function |
|
one.SE |
|
backward |
|
max.steps |
|
v.start |
|
leaf.start |
|
verbose |
|
debug |
|
fname |
|
use.big |
|
save.output |
{character; if not empty, the resulting object is assigned to results in frame 1 and also dumped to disk in the file named in save.output. This can be useful for parallel processing.}
Object of class knnTree. If the tree has n leaves, this will be a list with n+2 elements. The first is the global tree. The next n elements are the n individual knn.var objects, one per leaf. Each of these objects has two additional pieces: leaf (giving the leaf number) and where (giving the row number of the global tree's frame for this leaf). The n+2-th element of the list is named call and is the call used to create the object.