changeparam: Change simulation control parameter object

Description Usage Arguments Details Value Examples

View source: R/01Classes.R

Description

Preprosim parameter objects contain eight contaminations: noise, lowvar, misval, irfeature, classswap, classimbalance, volumedecrease and outlier. Each contamination has three sub parameters: cols as columns the contamination is applied to, param as the parameter of the contaminations itself (i.e. intensity of contamination) and order as order in which the parameter is applied to the data.

Usage

1
changeparam(object, contamination, param, value)

Arguments

object

(preprosimparameter object)

contamination

(character) one of the following: noise, lowvar, misval, irfeature, classswap, classimbalance, volumedecrease, outlier

param

(character) one of the following: cols, param, order

value

(numeric) scalar (for order) or vector (for cols and param) of parameter values

Details

The order of contaminations (cols parameter) must be between 1 and 8, and no two contaminations can have the same order. The contamination parameter (param parameter) must start with 0 (e.g. param="param", value=c(0,0.3))

Value

preprosimparameter class object

Examples

1
2
3
4
pa <- newparam(iris)
pa <- changeparam(pa, "noise", "cols", value=1)
pa <- changeparam(pa, "noise", "param", value=c(0,0.1))
pa <- changeparam(pa, "noise", "order", value=1)

mvattulainen/preprosim documentation built on May 23, 2019, 10:54 a.m.