anna-pa-m / Metabolic-EP

Code and data for analysis of metabolic networks
Other
9 stars 3 forks source link

Covariance matrix from EP sampling #10

Open chaitrasarathy opened 5 years ago

chaitrasarathy commented 5 years ago

Hello, I have been trying out your Metabolic-EP code and I hope you can help me with what I’m trying to do. Specifically, I want to use the covariance matrix for a principal component analysis. So, I would like to know if the covariance matrix as written out by your code is calculated after already performing mean subtraction on the distribution. if not, can this be implemented somehow? Thank you in advance,

anna-pa-m commented 5 years ago

Hi chaitrasarathy, one of the results that you get from Metabolic-EP is a multivariate Gaussian approximation of the probability of the fluxes. The covariance matrix is the \Sigma matrix of the standard form \mathcal{N} (\mu, \Sigma) so the means have already been subtracted. You can directly compute the eigenvectors of the matrix or first compute a Pearson correlation matrix from the output. Best!

chaitrasarathy commented 4 years ago

Thank you for your response. A follow up question, did you also check if the covariance matrices converge between the two sampling approaches (MC and EP) that you compare in your study?