Thompson sampling uses a Beta probability distribution to sample parameters. After each sample, the distribution is changed, according to the sample value got.
Currently I am doing the following :
dist = new BetaDistribution(alpha, beta);
"sample"
"find new params"
dist = new BetaDistribution(alphaNew, betaNew);
Is there a way I can do it without having to create a new beta distribution every time I change the params? (I feel this may be inefficient)
I found that there had been setalpha()
and setBeta()
methods, which would allow to change the distribution, without creating a new one. But, these methods are now deprecated.