| 
    SNAP Library 2.0, Developer Reference
    2013-05-13 16:33:57
    
   SNAP, a general purpose, high performance system for analysis and manipulation of large networks 
   | 
  
  
  
 
#include <agm.h>

Public Member Functions | |
| TLogRegPredict (const TFltV &_bb) | |
| TLogRegPredict (TSIn &SIn) | |
| void | Save (TSOut &SOut) const | 
| UndefDefaultCopyAssign (TLogRegPredict) | |
| double | GetCfy (const TFltV &AttrV) | 
| void | GetTheta (TFltV &_Theta) | 
| void | GetCfy (const TVec< TFltV > &X, TFltV &OutV) | 
| void | PrintTheta () | 
Static Public Member Functions | |
| static PLogRegPredict | Load (TSIn &SIn) | 
| static void | GetCfy (const TVec< TFltV > &X, TFltV &OutV, const TFltV &NewTheta) | 
| static double | GetCfy (const TFltV &AttrV, const TFltV &NewTheta) | 
Private Attributes | |
| TCRef | CRef | 
| TFltV | Theta | 
Friends | |
| class | TPt< TLogRegPredict > | 
| TLogRegPredict::TLogRegPredict | ( | const TFltV & | _bb | ) |  [inline] | 
        
| TLogRegPredict::TLogRegPredict | ( | TSIn & | SIn | ) |  [inline] | 
        
| void TLogRegPredict::GetCfy | ( | const TVec< TFltV > & | X, | 
| TFltV & | OutV, | ||
| const TFltV & | NewTheta | ||
| ) |  [static] | 
        
Definition at line 913 of file agm.cpp.
References TVec< TVal, TSizeTy >::Gen(), and TVec< TVal, TSizeTy >::Len().
Referenced by TLogRegFit::Gradient(), TLogRegFit::Hessian(), and TLogRegFit::Likelihood().


| double TLogRegPredict::GetCfy | ( | const TFltV & | AttrV, | 
| const TFltV & | NewTheta | ||
| ) |  [static] | 
        
Definition at line 902 of file agm.cpp.
References TVec< TVal, TSizeTy >::Last(), and TVec< TVal, TSizeTy >::Len().
                                                                       {
    int len = AttrV.Len();
    double res = 0;
    if (len < NewTheta.Len()) { res = NewTheta.Last(); } //if feature vector is shorter, add an intercept
    for (int i = 0; i < len; i++) {
      if (i < NewTheta.Len()) { res += AttrV[i] * NewTheta[i]; }
    }
    double mu = 1 / (1 + exp(-res));
    return mu;
}

| double TLogRegPredict::GetCfy | ( | const TFltV & | AttrV | ) |  [inline] | 
        
| void TLogRegPredict::GetCfy | ( | const TVec< TFltV > & | X, | 
| TFltV & | OutV | ||
| ) |  [inline] | 
        
| void TLogRegPredict::GetTheta | ( | TFltV & | _Theta | ) |  [inline] | 
        
| static PLogRegPredict TLogRegPredict::Load | ( | TSIn & | SIn | ) |  [inline, static] | 
        
Definition at line 179 of file agm.h.
References TLogRegPredict().
{ return new TLogRegPredict(SIn); };

| void TLogRegPredict::PrintTheta | ( | ) |  [inline] | 
        
| void TLogRegPredict::Save | ( | TSOut & | SOut | ) |  const [inline] | 
        
friend class TPt< TLogRegPredict > [friend] | 
        
TCRef TLogRegPredict::CRef [private] | 
        
TFltV TLogRegPredict::Theta [private] | 
        
Definition at line 173 of file agm.h.
Referenced by GetCfy(), GetTheta(), PrintTheta(), Save(), and TLogRegPredict().