View source: R/classification.r
generate_classification_data | R Documentation |
Given a model, this function generates points within the range of the data, classifies them, and attempts to locate boundaries by looking at advantage.
generate_classification_data(model, data, n, method, advantage)
model |
classification model |
data |
data set used in model |
n |
number of points to generate |
method |
method to use, currently either grid (an evenly spaced grid), random (uniform random distribution across cube), or nonaligned (grid + some random peturbationb) |
advantage |
if |
If posterior probabilities of classification are available, then the
advantage
will be calculated directly. If not,
knn
is used calculate the advantage based on the number of
neighbouring points that share the same classification. Because knn is
$O(n^2)$ this method is rather slow for large (>20,000 say) data sets.
By default, the boundary points are identified as those below the 5th-percentile for advantage.
data.frame of classified data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.