draw8sele: returns the candidate individuals for an empidata node.

Description Usage Arguments Details Value Examples

Description

(dn) For a given individual (ind), the distances with all individuals in the rows of E are computed according to some requirement. From them a set of candidates of the E rows is returned. This set is comprised of candidates with distances greater or equal than di[1] and less or equal than di[2]. Their number is at least equal to nb[1] and no more than nb[2]. When the number of candidates is too small No candidates are returned; when it is too big the maximum number is returned with the smallest distances.
Details about the distance formula are given into the /rebastaba/ manual.

Usage

1
draw8sele(ind, E, wgt, kk, di, nb, nat)

Arguments

ind

Value of the individual to predict (one row data.frame.

E

data.frame with the candidates in its rows.

wgt

the weights to be used for the distance computation.

kk

power coefficient for the distance computation.

di

extreme values of acceptable distances.

nb

minimum and maximum numbers of candidates.

nat

nature of the ind variables (named character).

Details

No check are made

Value

a data.frame with the same columns as those of 'E' containing the selected subset of candidates sorted according to the distance. Except for those with names given by rebastaba.ena[2] which are filled accordingly to the draw (their own distances).
When empty the returned data.frame has got no row.

Examples

1
2
3
4
 rebastaba3k("RESET"); # to comply R checking
 E <- data.frame(A=1:100, c=100:1); # the empirical distribution
 draw8sele(data.frame(A=20), E, structure(1, .Names="A"), 1, c(0, 1), c(1, 2), 
 structure("conti", .Names="A"));

rebastaba documentation built on May 2, 2019, 5:24 p.m.