How to calculate probability as correlation matrix?

We just want to calculate the co-occurrence probability of features (output like a correlation matrix, Input is an M*N matrix (M features, N samples). From our experience, we have known the distribution might be learned through pyro. Could you kindly tell us which tutorial or code can solve a similar problem, with a pyro style method? Your advice is curial for us.
Thanks.