Description Usage Arguments Details Value Functions Examples
Add Random Noise to Data
1 2 3 4 5 |
x |
a data.frame |
cols |
the columns that are to be affected. Must be numeric. If no value is given, all columns are affected. |
magnitude |
a shortcut for the potential size of noise - see details |
minNoise |
the smallest possible value for noise that may be added. If neither minNoise nor minNoiseQuantile is provided, minNoise defaults to 0. |
maxNoise |
the largest possible value for noise that may be added |
minNoiseQuantile |
the smallest possible value for noise that may be added. Rather than an actual value, this is a decimal, representing a quantile of the values in that column. If both minNoise and minNoiseQuantile are provided, maxNoise takes priority. |
maxNoiseQuantile |
the largest possible value for noise that may be added. Rather than an actual value, this is a decimal, representing a quantile of the values in that column. If both maxNoise and maxNoiseQuantile are provided, maxNoise takes priority. |
Adds a random value between minNoise and maxNoise to each element in each of the specified columns. If minNoiseQuantile or maxNoiseQuantile is provided instead of minNoise or maxNoise, then minNoise and maxNoise are calculated for every column based on the quantiles provided. magnitude is a shortcut for minNoise and maxNoiseQuantile parameters:
LOW: minNoise = 0 maxNoiseQuantile = .25
MEDIUM: minNoise = 0 maxNoiseQuantile = .5
HIGH: minNoise = 0 maxNoiseQuantile = .75
This makes magnitude ideal when the user desires to have a noise value between 0 and some quantile for all specified columns.
data.frame with with noise added all elements in specified columns
randomNoise
: identical to perturbation
1 2 3 4 5 | perturbation(data)
perturbation(data, 1:5)
perturbation(data, magnitude="HIGH")
perturbation(data, "Gender", minNoise = 10, maxNoise = 50)
perturbation(data, minNoiseQuantile = .1, maxNoise = .9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.