-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sampling using the maximum entropy probability distribution #34
Comments
@TolisChal @vissarion we might find useful the following publications: and probably the most helpful: |
hi again! Based on the The code is not that clean but is it just the void ellipsHR(){ // hit and run with ellipsoid
for(int i=0;i<=r-1;i++) previous[i]=flux[i];
for(int yes=0;yes<=r-1;yes++){ // sweep over the axis directions
long double tp,tm;
findextrema(tp,tm,yes);
long double t=0;
int count=0;
do {
long double c = cb[yes];
c*=BETA;
long double ranvar = casual();
if(fabs(c)<EPSILON) t = tm+(tp-tm)*ranvar;
else{ // flux maximization
if(fabs(c*(tp-tm))<MAXIMUM_EXP) t = tm + log( 1 + ranvar*(exp(c*(tp-tm))-1))/c;
else{
if(c<0) t = tm+log(1-ranvar)/c;
else t = tp+log(ranvar)/c;
}
}
count++;
} while ( (t-tm<EPSILON || tp-t<EPSILON) && count<10 );
}
if(count==10) t=0;
for(int i=0;i<=r-1;i++) flux[i] += t*versori[yes][i];
int oko=1;
for(int i=0;i<=N-1;i++){
double flux1=0;
if(matrice[i].size()>0) for(int j=0;j<=matrice[i].size()-1;j++) flux1+=matrice2[i][j]*flux[matrice[i][j]];
if(flux1<boundmin[i] || flux1>boundmax[i])oko=0;
}
if(oko==1) for(int i=0;i<=r-1;i++) previous[i]=flux[i];
else for(int i=0;i<=r-1;i++) flux[i]=previous[i];
}
|
Up to now,
dingo
supports sampling using the uniform, themultivariate exponential and the multivariate Gaussian distributions.
A quite interesting addition from the biologist-point-of-view would be
to enable sampling using the maximum entropy probability distribution.
You may see more about why this would be the case under this study.
"In addition to accounting for fluctuations, the maximum entropy construction provides a principled interpolation between two extremal regimes of metabolic network function. In the “uniform” (no-optimization) limit, no control is exerted over metabolic fluxes: they are selected at random as long as they are permitted by stoichiometry, resulting in broad yet non-trivial flux distributions that support a small, non-zero growth rate. In
the FBA limit, fluxes are controlled precisely to maximize the growth rate, with zero fluctuations. "
For more about max entropy distribution:
https://journals.aps.org/pr/abstract/10.1103/PhysRev.106.620
The text was updated successfully, but these errors were encountered: