Learn R Programming

TDMR (version 2.2)

tdmParaBootstrap: Parametric bootstrap: add 'noisy copies' to a data frame (training data).

Description

A normal distribution is approximated from the data given in dset[,input.variables] and new data are drawn from this distribution for the columns input.variables. The column resp is filled at random with levels with the same relative frequency as in dset[,resp]. Other columns of dset are filled by copying the entries from the first row of dset.

Usage

tdmParaBootstrap(dset, resp, input.variables, opts)

Arguments

dset

data frame with training set

resp

name of column in dset which carries the target variable

input.variables

vector with names of input columns

opts

additional parameters [defaults in brackets]

ncopies

how many noisy copies to add

ncsigma

[1.0] multiplicative factor for each std.dev.

ncmethod

[3] which method to use for parametric bootstrap =1: each 'old' record from X in turn is the centroid for a new pattern; =2: the centroid is the average of all records from the same class, the std.dev. is the same for all classes; =3: centroid as in '2', the std.dev. is the std.dev. of all records from the same class (*recommended*)

TST.COL

(optional) name of column in dset where each PB record is marked with a 0

Value

data frame dset with the new parametric bootstrap records added as last rows.

See Also

tdmClassify