CS-E4820 Machine Learning: Advanced Probabilistic Methods
CS-E4820 Machine Learning: Advanced Probabilistic Methods
CS-E4820 Machine Learning: Advanced Probabilistic Methods
with ν > p − 1.
3 See documentation https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.
wishart.html.
(a) Familiarize yourself with the Wishart distribution, e.g., by reading from Wikipedia
or any available book. What are the mean and variance of the Wishart distribu-
tion?
(b) Specify parameters of the Wishart distribution such that the expected value of
the Λ matrix would be equal to A. Use e.g. scipy.stats.wishart.rvs(df, scale, size)
to simulate samples from the distribution you have specified, and confirm by
averaging over the samples that the expectation indeed is equal to A. Try 1, 10
and 1000 samples. (The average should converge to A as the number of samples
increases.)
(c) How should one select the parameter values to make the matrices simulated
from the Wishart distribution arbitrarily close to A? Show a few examples of this
by adjusting the parameters to get increasingly closer to A.
Your solution should include code (with some comments) that accomplishes (b) and
(c).