findNearestPrototype {flacco} | R Documentation |
Find Nearest Prototype
Description
For each cell of the initial design, select the closest observation to its center and use it as a representative for that cell.
Usage
findNearestPrototype(feat.object, dist_meth, mink_p, fast_k, ...)
Arguments
feat.object |
[ |
dist_meth |
[ |
mink_p |
[ |
fast_k |
[ |
... |
[any] |
Value
[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.
Examples
# (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)