Changeset 203

Show
Ignore:
Timestamp:
11/20/08 18:04:40 (5 years ago)
Author:
vdebuen
Message:

At first iteration of Logit is B=0 and so p=X*B=0

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • tolp/trunk/tol/bmath/bstat/logit.cpp

    r6 r203  
    7474  clock_t tm_1, tm_0 = BTimer::Clocks(); 
    7575  BReal tm_dif; 
     76 
    7677  for(iter=0; iter<BDat::MaxIter(); iter++) 
    7778  { 
    7879    H_.SetAllValuesTo(0); 
    7980    G.SetAllValuesTo(0); 
    80     p = X*B; 
     81    if(iter==0) 
     82    { 
     83      p.SetAllValuesTo(0); 
     84    } 
     85    else 
     86    { 
     87    //Std(BText("\nTRACE Logit B=\n")+B.Name()); 
     88    //Std(BText("\nTRACE Logit X=\n")+X.Name()); 
     89      p = X*B; 
     90    //Std(BText("\nTRACE Logit p=\n")+p.Name()); 
     91    } 
    8192    oldLlh = lnLikelyhood; 
    8293    lnLikelyhood=0;