powered by
Add Laplace noise with mean 0 to predicted values with constant variance
add_noise_laplace( model, new_data, conf_model_data, outcome_var, col_schema, pred, variance = NULL, epsilon = NULL, sensitivity = NULL )
A numeric vector with noise added to each prediction
A model_spec or a list of model_specs from library(parsnip)
model_spec
library(parsnip)
A data frame used to generate predictions
A data frame for estimating the predictive model
A string name representing the outcome variable
A list of column schema specifications for the new variable
A vector of values predicted by the model
Sampling variance for additive noise
Alternative privacy loss budget prescribed by the Laplace mechanism under epsilon differential privacy.
Alternative sample sensitivity prescribed by the Laplace mechanism under epsilon differential privacy.
add_noise_laplace( model = NULL, new_data = NULL, conf_model_data = NULL, outcome_var = NULL, col_schema = NULL, pred = 1:100, variance = 3 )
Run the code above in your browser using DataLab