For codes above, what does “ε=10.0” mean?
And I know that it will give 10 random numbers from the distribution N(0,1). If I want to fetch from N(0,2), what should I do?

Could you kindly provide me with the ε meaning and example code?
Thank you

In this function, ε is the scaling of the perturbation, which corresponds to the standard deviation for a Gaussian variable. So your code will actually perturb the knapsack_maximizer with nb_samples=10 random numbers from the distribution N(0, ε^2).
Ping @BatyLeo

You should read the documentation ?PerturbedAdditive. ε is the standard deviation in the normal random variable case. The perturbation keyword, which is what you are seeing printed with Normal(0, 1), is the base sampling distribution for that perturbation (which defaults to perturbation=nothing or equivalent Normal(0, 1)).

Thank you !
I see.
It means we fetch one random number z from distribution N(0,1) first. Then, we mutiple z with ε as our final perturbation?
I think I fully understood now.
Thanks

Hi, here is the full formula behind the hood: \text{co_layer}(\theta) = \dfrac{1}{\text{nb_samples}} \sum\limits_{i=1}^{\text{nb_samples}} \text{knapsack_maximizer}(\theta + \varepsilon Z_i),
where Z_i are sampled from Normal(0, 1).