Add distance information to resampling objects
1 2 3 4 5 6 7
resampling or represampling object.
Additional arguments to dataset_distance and add.distance.resampling, respectively.
Nearest-neighbour distances are calculated for each sample in the
test set. These
nrow(???$test) nearest-neighbour distances are then
averaged. Aggregation methods other than
mean can be chosen using
fun argument, which will be passed on to
A resampling or represampling object
containing an additional.
$distance component in each resampling object.
distance component is a single numeric value indicating, for
test pair, the (by default, mean)
nearest-neighbour distance between the two sets.
dataset_distance represampling resampling
1 2 3 4 5 6 7 8 9 10
data(ecuador) # Muenchow et al. (2012), see ?ecuador nsp.parti <- partition_cv(ecuador) sp.parti <- partition_kmeans(ecuador) nsp.parti <- add.distance(nsp.parti, ecuador) sp.parti <- add.distance(sp.parti, ecuador) # non-spatial partioning: very small test-training distance: nsp.parti[][]$distance # spatial partitioning: more substantial distance, depending on number of # folds etc. sp.parti[][]$distance
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.