prune | R Documentation |
a nearest neighbor pruning using neighborhood graphs.
prune(x, classes, prox = "Gabriel", ignore.ties = TRUE, ...)
x |
a data matrix. |
classes |
a vector of class labels. |
prox |
type of proximity graph. |
ignore.ties |
do not prune if there is a tie vote. |
... |
arguments passed to the proximity graph. |
First a proximity graph is computed on the data. Then points are marked if their neighbors have a different class than they do: if the most common class among the neighbors is different than the point. Then all marked points are removed.
A list with attributes:
x |
the pruned data. |
v |
the indices of the retained data. |
g |
the proximity graph. |
David J. Marchette, david.marchette@navy.mil
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.