pymc-devs / pymc-examples

Examples of PyMC models, including a library of Jupyter notebooks.
https://www.pymc.io/projects/examples/en/latest/
MIT License
259 stars 211 forks source link

Update Factor analysis notebook #587

Closed erik-werner closed 6 months ago

erik-werner commented 8 months ago

Factor analysis: https://www.pymc.io/projects/examples/en/latest/case_studies/factor_analysis.html:

Issue description

I think there's a small error in one of the equations at the end of the notebook. There's a missing $\Psi^{-1/2}$ in the last equation, the RHS should read $\Psi^{-1/2}N(F, (W^TW)^{-1})$. I think this error carries over to the sampling code. But there are quite a few unexplained steps in the derivation, so it's not obvious to me what is done, nor how it relates to the code.

Further, since the notebook uses synthetic data, it would be nice to end the notebook with a comparison between the true latent factors and the estimates from the factor analysis.

Todo:

drbenvincent commented 7 months ago

Hi @erik-werner. Did #586 address this issue? If so we can close this issue :)

erik-werner commented 7 months ago

Hi @drbenvincent. No. I"m working on some updates to address this issue, but got sidelined by some other stuff. I'm hoping to be able to pick it up later this week.