View source: R/cm_findNearestPrototype.R
findNearestPrototype | R Documentation |
For each cell of the initial design, select the closest observation to its center and use it as a representative for that cell.
findNearestPrototype(feat.object, dist_meth, mink_p, fast_k, ...)
feat.object |
[ |
dist_meth |
[ |
mink_p |
[ |
fast_k |
[ |
... |
[any] |
[data.frame
].
A data.frame
containing one prototype (i.e. a representative
observation) per cell. Each prototype consists of its values from the
decision space, the corresponding objective value, its own cell ID and the
cell ID of the cell, which it represents.
# (1) create the initial sample and feature object: X = createInitialSample(n.obs = 1000, dim = 2, control = list(init_sample.lower = -10, init_sample.upper = 10)) feat.object = createFeatureObject(X = X, fun = function(x) sum(x^2), blocks = 10) # (2) find the nearest prototypes of all cells: findNearestPrototype(feat.object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.