contamination_random {ssMRCD}R Documentation

Contamination Through Swapping

Description

This function swaps observations completely random in order to introduce contamination in the data. Used in parameter_tuning.

Usage

contamination_random(cont, data)

Arguments

cont

numeric, amount of contamination in data.

data

data whose observations should be switched.

Value

A matrix with switched observations.

Examples

# set seed
set.seed(1)

# get data
data(weatherAUT2021)

# switch 5% of observations
contamination_random(cont = 0.05, data = weatherAUT2021[,1:6])

[Package ssMRCD version 0.1.0 Index]