View source: R/select_parameters.R
contamination_random | R Documentation |
This function swaps observations completely random in order to introduce contamination
in the data. Used in parameter_tuning
.
contamination_random(cont, data)
cont |
numeric, amount of contamination in data. |
data |
data whose observations should be switched. |
A matrix with switched observations.
# set seed
set.seed(1)
# get data
data(weatherAUT2021)
# switch 5% of observations
contamination_random(cont = 0.05, data = weatherAUT2021[,1:6])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.