Skip to content

Fix Thompson sampling posterior covariance draws - #1

Open
Yinkai-Dong wants to merge 1 commit into
maegant:masterfrom
Yinkai-Dong:fix-ts-covariance
Open

Yinkai-Dong wants to merge 1 commit into
maegant:masterfrom
Yinkai-Dong:fix-ts-covariance

Conversation

@Yinkai-Dong

Copy link
Copy Markdown

ThompsonSampling drew R = mean + cov_scale .* sigma * X with X ~ N(0,I), where sigma = model.sigma is the posterior covariance Σ. This samples from N(mean, cov_scale^2 * Σ^2) instead of the intended N(mean, cov_scale^2 * Σ).

Factor the covariance once with L = chol(sigma,'lower') so L*L' = Σ, and draw R = mean + cov_scale .* (L * X) to sample with the intended covariance.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant