Skip to content

Commit

Permalink
Adding time information into VB output and disabling rhat logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Glaus committed Nov 11, 2013
1 parent 44b1fff commit 4c17589
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion VariationalBayes.cpp
Expand Up @@ -129,6 +129,7 @@ void VariationalBayes::optimize(bool verbose,OPT_TYPE method,long maxIter,double
double boundOld,bound,squareNorm,squareNormOld=1,valBeta=0,valBetaDiv,natGrad_i,gradGamma_i,phiGradPhiSum_r;
double *gradPhi,*natGrad,*gradGamma,*searchDir,*tmpD,*phiOld;
gradPhi=natGrad=gradGamma=searchDir=tmpD=phiOld=NULL;
MyTimer timer;
// allocate stuff {{{
//SimpleSparse *phiGradPhi=new SimpleSparse(beta);
gradPhi = new double[T];
Expand All @@ -151,6 +152,7 @@ void VariationalBayes::optimize(bool verbose,OPT_TYPE method,long maxIter,double
#endif
#endif
boundOld=getBound();
timer.start();
while(true){
negGradient(gradPhi);
// "yuck"
Expand Down Expand Up @@ -248,7 +250,7 @@ void VariationalBayes::optimize(bool verbose,OPT_TYPE method,long maxIter,double
#ifdef SHOW_FIXED
messageF("iter(%c): %5.ld bound: %.3lf grad: %.7lf beta: %.7lf fixed: %ld\n",(usedSteepest?'s':'o'),iteration,bound,squareNorm,valBeta,phi->countAboveDelta(0.999));
#else
messageF("iter(%c): %5.ld bound: %.3lf grad: %.7lf beta: %.7lf\n",(usedSteepest?'s':'o'),iteration,bound,squareNorm,valBeta);
messageF("iter(%c)[%5.lds]: %5.ld bound: %.3lf grad: %.7lf beta: %.7lf\n",(usedSteepest?'s':'o'),(long)timer.getTime(),iteration,bound,squareNorm,valBeta);
#endif
}else if(!quiet){
messageF("\riter(%c): %5.ld bound: %.3lf grad: %.7lf beta: %.7lf ",(usedSteepest?'s':'o'),iteration,bound,squareNorm,valBeta);
Expand Down
2 changes: 1 addition & 1 deletion estimateExpression.cpp
Expand Up @@ -24,7 +24,7 @@
#define SS second

//#define LOG_NEED
#define LOG_RHAT
//#define LOG_RHAT
TranscriptInfo trInfo;

long M;//, mAll; // M : number of transcripts (include transcript 0 ~ Noise)
Expand Down

0 comments on commit 4c17589

Please sign in to comment.