relative
parameter in order to preserve the underlying structure of the data. Then the computation is carried as follows:
new value = original value + relative scaling factor * random sample from the distribution.
If this relative
parameter is not given or is set to abs
, then the relative scaling factor is 1.
Usage
The following examples show how the step can be used in a recipe.Examples
Examples
- Example 1
- Example 2
- Signature
Add white noise to a column of embeddings
Inputs & Outputs
The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name
), datasets (ds
or ds[["first_name", "last_name"]]
) or models (referenced
by name e.g. "churn-clf"
).
Inputs
Inputs
The original column.
Outputs
Outputs
The result of applying noise to it.
Configuration
The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e.step(..., {"param": "value", ...}) -> (output)
.
Parameters
Parameters
Mode to use.
Either set to “std” to use the standard deviation, or use a number to scale the sampling.
Options
Options
- number
- string
number.
Distribution Function that noise is sampled from.Values must be one of the following:
gumbel
laplace
logistic
normal
Mean (“centre”) of the chosen distribution.
Standard deviation (spread or “width”) of the distribution.
The seed to use for the random distribution, if you wish to get reproducibility in your results.