Convergence problems with poor chain mixing pPCA model

Ignoring the specifics of what you’re trying to achieve, it seems that:

  1. You have too many z variables for the number of observations
  2. Not enough w variables for the sigma hyperprior.

Given these I am not surprised the sample struggles.

For point 1 you can try a more informative prior

For point 2 you can try a non centered parametrization instead with w = mu_w + pm.Normal("w_raw" 0, 1, shape=...) × sigma

1 Like