contamination_random: Contamination Through Swapping

View source: R/select_parameters.R

contamination_randomR 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])

ssMRCD documentation built on Sept. 11, 2024, 5:14 p.m.