| add_perturb | R Documentation |
add_perturb() adds an perturbation step to a transformation pipeline
(NB: intended for numeric data). When ran as a transformation, each
specified variable is transformed by the noise function.
add_perturb(object, ..., noise = adaptive_noise(0.1))
object |
Either a |
... |
variables to be transformed. |
noise |
a single-argument function that applies randomness. |
A 'DeidentList' representing the untrained transformation pipeline. The object contains fields:
deident_methods a list of each step in the pipeline (consisting of variables and method)
and methods:
mutate apply the pipeline to a new data set
to_yaml serialize the pipeline to a '.yml' file
adaptive_noise(), white_noise(), and lognorm_noise()
pipe.perturb <- add_perturb(ShiftsWorked, `Daily Pay`)
pipe.perturb$mutate(ShiftsWorked)
pipe.perturb.white_noise <- add_perturb(ShiftsWorked, `Daily Pay`, noise=white_noise(0.1))
pipe.perturb.white_noise$mutate(ShiftsWorked)
pipe.perturb.noisy_adaptive <- add_perturb(ShiftsWorked, `Daily Pay`, noise=adaptive_noise(1))
pipe.perturb.noisy_adaptive$mutate(ShiftsWorked)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.