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)
classification model
data set used in model
number of points to generate
method to use, currently either grid (an evenly spaced grid), random (uniform random distribution across cube), or nonaligned (grid + some random peturbationb)
if TRUE
, compute advantage, otherwise don't
data.frame of classified data
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.