SNAP Library 6.0, Developer Reference
2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <agmdirected.h>
Public Member Functions | |
TCoda (const PNGraph &GraphPt, const int &InitComs, const int RndSeed=0) | |
TCoda () | |
void | SetGraph (const PNGraph &GraphPt) |
PNGraph | GetGraph () |
PNGraph | GetGraphRawNID () |
void | SetRegCoef (const double _RegCoef) |
double | GetRegCoef () |
void | RandomInit (const int InitComs) |
int | GetNumComs () |
void | NeighborComInit (const int InitComs) |
void | NeighborComInit (TFltIntPrV &NIdPhiV, const int InitComs) |
void | SetCmtyVV (const TVec< TIntV > &CmtyVVOut, const TVec< TIntV > &CmtyVVIn) |
double | Likelihood (const bool DoParallel=false) |
double | LikelihoodForNode (const bool IsRow, const int UID) |
double | LikelihoodForNode (const bool IsRow, const int UID, const TIntFltH &FU) |
void | GetNonEdgePairScores (TFltIntIntTrV &ScoreV) |
void | GetNIDValH (TIntFltH &NIdValInOutH, TIntFltH &NIdValOutH, TIntFltH &NIdValInH, const int CID, const double Thres) |
void | DumpMemberships (const TStr &OutFNm, const TStrHash< TInt > &NodeNameH) |
void | DumpMemberships (const TStr &OutFNm, const TStrHash< TInt > &NodeNameH, const double Thres) |
void | GetCmtyS (TIntSet &CmtySOut, TIntSet &CmtySIn, const int CID, const double Thres) |
void | DumpMemberships (const TStr &OutFNm, const double Thres) |
void | DumpMemberships (const TStr &OutFNm) |
void | GetCommunity (TIntV &CmtyVIn, TIntV &CmtyVOut, const int CID) |
void | GetCommunity (TIntV &CmtyVIn, TIntV &CmtyVOut, const int CID, const double Thres) |
extract community affiliation for given community ID More... | |
void | GetTopCIDs (TIntV &CIdV, const int TopK, const int IsAverage=1, const int MinSz=1) |
void | GradientForNode (const bool IsRow, const int UID, TIntFltH &GradU, const TIntSet &CIDSet) |
void | SetHoldOut (const double HOFrac) |
void | GetCmtyVV (TVec< TIntV > &CmtyVVOut, TVec< TIntV > &CmtyVVIn, const int MinSz=3) |
void | GetCmtyVV (TVec< TIntV > &CmtyVVOut, TVec< TIntV > &CmtyVVIn, const double ThresOut, const double ThresIn, const int MinSz=3) |
void | GetCmtyVV (const bool IsOut, TVec< TIntV > &CmtyVV) |
void | GetCmtyVV (const bool IsOut, TVec< TIntV > &CmtyVV, const double Thres, const int MinSz=3) |
extract community affiliation for outgoing edges from F_uc More... | |
void | GetCmtyVVUnSorted (const bool IsOut, TVec< TIntV > &CmtyVV, const double Thres, const int MinSz=3) |
void | GetCmtyVVUnSorted (TVec< TIntV > &CmtyVVOut, TVec< TIntV > &CmtyVVIn) |
int | FindComsByCV (TIntV &ComsV, const double HOFrac=0.2, const int NumThreads=20, const TStr PlotLFNm=TStr(), const int EdgesForCV=100, const double StepAlpha=0.3, const double StepBeta=0.1) |
int | FindComsByCV (const int NumThreads, const int MaxComs, const int MinComs, const int DivComs, const TStr OutFNm, const int EdgesForCV=100, const double StepAlpha=0.3, const double StepBeta=0.3) |
estimate number of communities using cross validation More... | |
double | LikelihoodHoldOut (const bool DoParallel=false) |
double | GetStepSizeByLineSearch (const bool IsRow, const int UID, const TIntFltH &DeltaV, const TIntFltH &GradV, const double &Alpha, const double &Beta, const int MaxIter=10) |
int | MLEGradAscent (const double &Thres, const int &MaxIter, const TStr PlotNm, const double StepAlpha=0.3, const double StepBeta=0.1) |
int | MLEGradAscentParallel (const double &Thres, const int &MaxIter, const int ChunkNum, const int ChunkSize, const TStr PlotNm, const double StepAlpha=0.3, const double StepBeta=0.1) |
int | MLEGradAscentParallel (const double &Thres, const int &MaxIter, const int ChunkNum, const TStr PlotNm=TStr(), const double StepAlpha=0.3, const double StepBeta=0.1) |
void | Save (TSOut &SOut) |
void | Load (TSIn &SIn, const int &RndSeed=0) |
TFlt & | GetSumVal (const bool IsOut, const int CID) |
double | GetCom (const bool IsOut, const int &NID, const int &CID) |
double | GetComOut (const int &NID, const int &CID) |
double | GetComIn (const int &NID, const int &CID) |
void | AddCom (const bool IsOut, const int &NID, const int &CID, const double &Val) |
void | AddComOut (const int &NID, const int &CID, const double &Val) |
void | AddComIn (const int &NID, const int &CID, const double &Val) |
void | DelCom (const bool IsOut, const int &NID, const int &CID) |
void | DelComOut (const int &NID, const int &CID) |
void | DelComIn (const int &NID, const int &CID) |
double | DotProduct (const TIntFltH &UV, const TIntFltH &VV) |
double | DotProductUtoV (const int &UID, const int &VID) |
double | Prediction (const TIntFltH &FU, const TIntFltH &HV) |
double | Prediction (const int &UID, const int &VID) |
double | Sum (const TIntFltH &UV) |
double | Norm2 (const TIntFltH &UV) |
Public Attributes | |
TFlt | MinVal |
TFlt | MaxVal |
TFlt | NegWgt |
TFlt | PNoCom |
TBool | DoParallel |
Private Attributes | |
PNGraph | G |
TVec< TIntFltH > | F |
TVec< TIntFltH > | H |
TRnd | Rnd |
TIntV | NIDV |
TFlt | RegCoef |
TFltV | SumFV |
TFltV | SumHV |
TBool | NodesOk |
TInt | NumComs |
TVec< TIntSet > | HOVIDSV |
Definition at line 7 of file agmdirected.h.
|
inline |
Definition at line 27 of file agmdirected.h.
References RandomInit(), and SetGraph().
|
inline |
Definition at line 29 of file agmdirected.h.
References TNGraph::New().
|
inline |
Definition at line 114 of file agmdirected.h.
References AddComIn(), and AddComOut().
Referenced by MLEGradAscent().
|
inline |
Definition at line 128 of file agmdirected.h.
References TVec< TVal, TSizeTy >::GetDat().
Referenced by AddCom(), NeighborComInit(), RandomInit(), and SetCmtyVV().
|
inline |
Definition at line 121 of file agmdirected.h.
References TVec< TVal, TSizeTy >::GetDat().
Referenced by AddCom(), NeighborComInit(), RandomInit(), and SetCmtyVV().
|
inline |
Definition at line 135 of file agmdirected.h.
References DelComIn(), and DelComOut().
Referenced by MLEGradAscent().
|
inline |
Definition at line 148 of file agmdirected.h.
References TVec< TVal, TSizeTy >::GetDat().
Referenced by DelCom().
|
inline |
Definition at line 142 of file agmdirected.h.
References TVec< TVal, TSizeTy >::GetDat().
Referenced by DelCom().
Definition at line 154 of file agmdirected.h.
References THash< TKey, TDat, THashFunc >::BegI(), THash< TKey, TDat, THashFunc >::EndI(), THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), and THash< TKey, TDat, THashFunc >::Len().
Referenced by DotProductUtoV(), GetStepSizeByLineSearch(), LikelihoodForNode(), and Prediction().
|
inline |
Definition at line 171 of file agmdirected.h.
References DotProduct().
Definition at line 45 of file agmdirected.h.
References DumpMemberships().
Referenced by DumpMemberships().
void TCoda::DumpMemberships | ( | const TStr & | OutFNm, |
const TStrHash< TInt > & | NodeNameH, | ||
const double | Thres | ||
) |
Definition at line 617 of file agmdirected.cpp.
References TStr::CStr(), G, THash< TKey, TDat, THashFunc >::GetKey(), TStrHash< TDat, TStringPool, THashFunc >::GetKey(), GetNIDValH(), TNGraph::GetNodes(), GetSumVal(), IAssert, THash< TKey, TDat, THashFunc >::Len(), TStrHash< TDat, TStringPool, THashFunc >::Len(), NumComs, and TFlt::Val.
void TCoda::DumpMemberships | ( | const TStr & | OutFNm, |
const double | Thres | ||
) |
Definition at line 668 of file agmdirected.cpp.
References TStrHash< TDat, TStringPool, THashFunc >::AddKey(), DumpMemberships(), TStr::Fmt(), G, TNGraph::GetNodes(), TVec< TVal, TSizeTy >::Len(), and NIDV.
|
inline |
Definition at line 49 of file agmdirected.h.
References DumpMemberships().
Referenced by DumpMemberships().
int TCoda::FindComsByCV | ( | TIntV & | ComsV, |
const double | HOFrac = 0.2 , |
||
const int | NumThreads = 20 , |
||
const TStr | PlotLFNm = TStr() , |
||
const int | EdgesForCV = 100 , |
||
const double | StepAlpha = 0.3 , |
||
const double | StepBeta = 0.1 |
||
) |
Definition at line 746 of file agmdirected.cpp.
References TVec< TVal, TSizeTy >::Add(), TStr::Empty(), G, TAGMFastUtil::GenHoldOutPairs(), TNGraph::GetNodes(), HOVIDSV, TVec< TVal, TSizeTy >::Last(), TVec< TVal, TSizeTy >::Len(), Likelihood(), LikelihoodHoldOut(), MLEGradAscent(), MLEGradAscentParallel(), TFlt::Mn, NeighborComInit(), TGnuPlot::PlotValV(), RandomInit(), and Rnd.
Referenced by FindComsByCV().
int TCoda::FindComsByCV | ( | const int | NumThreads, |
const int | MaxComs, | ||
const int | MinComs, | ||
const int | DivComs, | ||
const TStr | OutFNm, | ||
const int | EdgesForCV = 100 , |
||
const double | StepAlpha = 0.3 , |
||
const double | StepBeta = 0.3 |
||
) |
estimate number of communities using cross validation
Definition at line 733 of file agmdirected.cpp.
References TVec< TVal, TSizeTy >::Add(), FindComsByCV(), TVec< TVal, TSizeTy >::Last(), TVec< TVal, TSizeTy >::Len(), TMath::Log(), and TInt::Val.
Definition at line 674 of file agmdirected.cpp.
References G, THashSet< TKey, THashFunc >::Gen(), GetCom(), TNGraph::GetNodes(), TVec< TVal, TSizeTy >::Len(), and NIDV.
Definition at line 717 of file agmdirected.cpp.
References G, and TNGraph::GetNodes().
Referenced by GetCmtyVV().
void TCoda::GetCmtyVV | ( | TVec< TIntV > & | CmtyVVOut, |
TVec< TIntV > & | CmtyVVIn, | ||
const double | ThresOut, | ||
const double | ThresIn, | ||
const int | MinSz = 3 |
||
) |
Definition at line 727 of file agmdirected.cpp.
References GetCmtyVV().
Definition at line 501 of file agmdirected.cpp.
References G, GetCmtyVV(), and TNGraph::GetNodes().
void TCoda::GetCmtyVV | ( | const bool | IsOut, |
TVec< TIntV > & | CmtyVV, | ||
const double | Thres, | ||
const int | MinSz = 3 |
||
) |
extract community affiliation for outgoing edges from F_uc
Definition at line 539 of file agmdirected.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), TVec< TVal, TSizeTy >::Gen(), THash< TKey, TDat, THashFunc >::GetKey(), THash< TKey, TDat, THashFunc >::GetKeyV(), GetNIDValH(), GetSumVal(), TVec< TVal, TSizeTy >::Len(), NumComs, and THash< TKey, TDat, THashFunc >::SortByDat().
void TCoda::GetCmtyVVUnSorted | ( | const bool | IsOut, |
TVec< TIntV > & | CmtyVV, | ||
const double | Thres, | ||
const int | MinSz = 3 |
||
) |
Definition at line 563 of file agmdirected.cpp.
References TVec< TVal, TSizeTy >::Add(), G, TVec< TVal, TSizeTy >::Gen(), GetCom(), TNGraph::GetNodes(), GetSumVal(), TVec< TVal, TSizeTy >::Len(), NIDV, and NumComs.
Referenced by GetCmtyVVUnSorted().
Definition at line 722 of file agmdirected.cpp.
References G, GetCmtyVVUnSorted(), and TNGraph::GetNodes().
|
inline |
Definition at line 93 of file agmdirected.h.
References GetComIn(), and GetComOut().
Referenced by GetCmtyS(), GetCmtyVVUnSorted(), GetCommunity(), GetNIDValH(), GetStepSizeByLineSearch(), GradientForNode(), LikelihoodForNode(), and MLEGradAscent().
|
inline |
Definition at line 107 of file agmdirected.h.
References TVec< TVal, TSizeTy >::GetDat().
Referenced by GetCom().
Definition at line 50 of file agmdirected.h.
References GetCommunity().
Referenced by GetCommunity(), and GetTopCIDs().
extract community affiliation for given community ID
Definition at line 506 of file agmdirected.cpp.
References F, GetCom(), TVec< TVal, TSizeTy >::Len(), NIDV, and NodesOk.
|
inline |
Definition at line 100 of file agmdirected.h.
References TVec< TVal, TSizeTy >::GetDat().
Referenced by GetCom().
|
inline |
PNGraph TCoda::GetGraphRawNID | ( | ) |
Definition at line 577 of file agmdirected.cpp.
References TNGraph::AddEdge(), TNGraph::AddNode(), TNGraph::BegNI(), TNGraph::EndNI(), G, TNGraph::GetEdges(), TNGraph::GetNodes(), IAssert, TNGraph::IsNode(), TNGraph::New(), and NIDV.
Referenced by TCodaAnalyzer::TCodaAnalyzer().
void TCoda::GetNIDValH | ( | TIntFltH & | NIdValInOutH, |
TIntFltH & | NIdValOutH, | ||
TIntFltH & | NIdValInH, | ||
const int | CID, | ||
const double | Thres | ||
) |
Definition at line 596 of file agmdirected.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::Gen(), GetCom(), GetSumVal(), TVec< TVal, TSizeTy >::Len(), NIDV, and THash< TKey, TDat, THashFunc >::SortByDat().
Referenced by DumpMemberships(), GetCmtyVV(), and TCodaAnalyzer::TCodaAnalyzer().
void TCoda::GetNonEdgePairScores | ( | TFltIntIntTrV & | ScoreV | ) |
Definition at line 153 of file agmdirected.cpp.
References TVec< TVal, TSizeTy >::Add(), G, TVec< TVal, TSizeTy >::Gen(), TNGraph::GetNIdV(), TNGraph::GetNodes(), TNGraph::IsEdge(), TVec< TVal, TSizeTy >::Len(), NIDV, and Prediction().
|
inline |
Definition at line 36 of file agmdirected.h.
References TInt::Val.
Referenced by GetTopCIDs(), and TCodaAnalyzer::TCodaAnalyzer().
|
inline |
double TCoda::GetStepSizeByLineSearch | ( | const bool | IsRow, |
const int | UID, | ||
const TIntFltH & | DeltaV, | ||
const TIntFltH & | GradV, | ||
const double & | Alpha, | ||
const double & | Beta, | ||
const int | MaxIter = 10 |
||
) |
Definition at line 859 of file agmdirected.cpp.
References DotProduct(), GetCom(), THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::GetKey(), THash< TKey, TDat, THashFunc >::Len(), LikelihoodForNode(), MaxVal, and MinVal.
Referenced by MLEGradAscent(), and MLEGradAscentParallel().
|
inline |
Definition at line 86 of file agmdirected.h.
Referenced by DumpMemberships(), GetCmtyVV(), GetCmtyVVUnSorted(), GetNIDValH(), GetTopCIDs(), GradientForNode(), and LikelihoodForNode().
void TCoda::GetTopCIDs | ( | TIntV & | CIdV, |
const int | TopK, | ||
const int | IsAverage = 1 , |
||
const int | MinSz = 1 |
||
) |
Definition at line 520 of file agmdirected.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), GetCommunity(), THash< TKey, TDat, THashFunc >::GetKeyV(), GetNumComs(), GetSumVal(), THash< TKey, TDat, THashFunc >::Len(), TVec< TVal, TSizeTy >::Len(), THash< TKey, TDat, THashFunc >::SortByDat(), and TVec< TVal, TSizeTy >::Trunc().
Referenced by TCodaAnalyzer::TCodaAnalyzer().
void TCoda::GradientForNode | ( | const bool | IsRow, |
const int | UID, | ||
TIntFltH & | GradU, | ||
const TIntSet & | CIDSet | ||
) |
Definition at line 377 of file agmdirected.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), G, THash< TKey, TDat, THashFunc >::Gen(), TVec< TVal, TSizeTy >::Gen(), GetCom(), TNGraph::TNodeI::GetInDeg(), TNGraph::TNodeI::GetInNId(), THashSet< TKey, THashFunc >::GetKey(), TNGraph::GetNI(), TNGraph::TNodeI::GetOutDeg(), TNGraph::TNodeI::GetOutNId(), GetSumVal(), HOVIDSV, IAssert, THash< TKey, TDat, THashFunc >::Len(), TVec< TVal, TSizeTy >::Len(), THashSet< TKey, THashFunc >::Len(), NegWgt, NumComs, Prediction(), RegCoef, and SumHV.
Referenced by MLEGradAscent(), and MLEGradAscentParallel().
double TCoda::Likelihood | ( | const bool | DoParallel = false | ) |
Definition at line 231 of file agmdirected.cpp.
References F, and LikelihoodForNode().
Referenced by FindComsByCV(), MLEGradAscent(), and MLEGradAscentParallel().
double TCoda::LikelihoodForNode | ( | const bool | IsRow, |
const int | UID | ||
) |
Definition at line 251 of file agmdirected.cpp.
Referenced by GetStepSizeByLineSearch(), and Likelihood().
double TCoda::LikelihoodForNode | ( | const bool | IsRow, |
const int | UID, | ||
const TIntFltH & | FU | ||
) |
Definition at line 259 of file agmdirected.cpp.
References THash< TKey, TDat, THashFunc >::BegI(), DotProduct(), THash< TKey, TDat, THashFunc >::EndI(), F, G, TVec< TVal, TSizeTy >::Gen(), GetCom(), TNGraph::TNodeI::GetInDeg(), TNGraph::TNodeI::GetInNId(), TNGraph::GetNI(), TNGraph::TNodeI::GetOutDeg(), TNGraph::TNodeI::GetOutNId(), GetSumVal(), H, HOVIDSV, TVec< TVal, TSizeTy >::Len(), NegWgt, Norm2(), NumComs, Prediction(), RegCoef, Sum(), and SumHV.
double TCoda::LikelihoodHoldOut | ( | const bool | DoParallel = false | ) |
Definition at line 841 of file agmdirected.cpp.
References G, HOVIDSV, TNGraph::IsEdge(), NegWgt, and Prediction().
Referenced by FindComsByCV().
void TCoda::Load | ( | TSIn & | SIn, |
const int & | RndSeed = 0 |
||
) |
Definition at line 25 of file agmdirected.cpp.
References F, G, H, HOVIDSV, TNGraph::Load(), TVec< TVal, TSizeTy >::Load(), TBool::Load(), TInt::Load(), TFlt::Load(), MaxVal, MinVal, NegWgt, NIDV, NodesOk, NumComs, PNoCom, TRnd::PutSeed(), RegCoef, Rnd, SumFV, and SumHV.
int TCoda::MLEGradAscent | ( | const double & | Thres, |
const int & | MaxIter, | ||
const TStr | PlotNm, | ||
const double | StepAlpha = 0.3 , |
||
const double | StepBeta = 0.1 |
||
) |
Definition at line 885 of file agmdirected.cpp.
References TVec< TVal, TSizeTy >::Add(), AddCom(), THashSet< TKey, THashFunc >::AddKey(), THash< TKey, TDat, THashFunc >::BegI(), DelCom(), TStr::Empty(), THashSet< TKey, THashFunc >::Empty(), THash< TKey, TDat, THashFunc >::EndI(), F, G, GetCom(), TNGraph::TNodeI::GetInDeg(), TNGraph::TNodeI::GetInNId(), TNGraph::GetNI(), TNGraph::GetNodes(), TNGraph::TNodeI::GetOutDeg(), TNGraph::TNodeI::GetOutNId(), GetStepSizeByLineSearch(), TExeTm::GetTmStr(), GradientForNode(), H, HOVIDSV, IAssert, THashSet< TKey, THashFunc >::IsKey(), Likelihood(), TFlt::Mn, Norm2(), NumComs, TGnuPlot::PlotValV(), and Rnd.
Referenced by FindComsByCV().
int TCoda::MLEGradAscentParallel | ( | const double & | Thres, |
const int & | MaxIter, | ||
const int | ChunkNum, | ||
const int | ChunkSize, | ||
const TStr | PlotNm, | ||
const double | StepAlpha = 0.3 , |
||
const double | StepBeta = 0.1 |
||
) |
Definition at line 962 of file agmdirected.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), THashSet< TKey, THashFunc >::AddKey(), THash< TKey, TDat, THashFunc >::BegI(), THash< TKey, TDat, THashFunc >::Clr(), THash< TKey, TDat, THashFunc >::Defrag(), THash< TKey, TDat, THashFunc >::DelIfKey(), TStr::Empty(), THashSet< TKey, THashFunc >::Empty(), THash< TKey, TDat, THashFunc >::EndI(), F, G, THash< TKey, TDat, THashFunc >::GetDat(), TVec< TVal, TSizeTy >::GetDat(), TNGraph::TNodeI::GetDeg(), TNGraph::TNodeI::GetInDeg(), TNGraph::TNodeI::GetInNId(), THash< TKey, TDat, THashFunc >::GetKey(), TNGraph::TNodeI::GetNbrNId(), TNGraph::GetNI(), TNGraph::GetNodes(), TNGraph::TNodeI::GetOutDeg(), TNGraph::TNodeI::GetOutNId(), GetStepSizeByLineSearch(), GradientForNode(), H, HOVIDSV, IAssert, THash< TKey, TDat, THashFunc >::IsKey(), THashSet< TKey, THashFunc >::IsKey(), THash< TKey, TDat, THashFunc >::Len(), TVec< TVal, TSizeTy >::Len(), Likelihood(), Norm2(), TGnuPlot::PlotValV(), TVec< TVal, TSizeTy >::PutAll(), Rnd, SumFV, and SumHV.
Referenced by FindComsByCV(), and MLEGradAscentParallel().
|
inline |
Definition at line 74 of file agmdirected.h.
References TNGraph::GetNodes(), and MLEGradAscentParallel().
void TCoda::NeighborComInit | ( | const int | InitComs | ) |
Definition at line 83 of file agmdirected.cpp.
Referenced by FindComsByCV().
void TCoda::NeighborComInit | ( | TFltIntPrV & | NIdPhiV, |
const int | InitComs | ||
) |
Definition at line 91 of file agmdirected.cpp.
References AddComIn(), AddComOut(), F, G, TVec< TVal, TSizeTy >::Gen(), TNGraph::TNodeI::GetDeg(), TNGraph::TNodeI::GetInDeg(), TNGraph::TNodeI::GetNbrNId(), TNGraph::GetNI(), TNGraph::GetNodes(), TNGraph::TNodeI::GetOutDeg(), TRnd::GetUniDev(), TRnd::GetUniDevInt(), H, TVec< TVal, TSizeTy >::Len(), NumComs, Rnd, TVec< TVal, TSizeTy >::Sort(), SumFV, and SumHV.
|
inline |
Definition at line 189 of file agmdirected.h.
References THash< TKey, TDat, THashFunc >::BegI(), and THash< TKey, TDat, THashFunc >::EndI().
Referenced by LikelihoodForNode(), MLEGradAscent(), and MLEGradAscentParallel().
Definition at line 174 of file agmdirected.h.
References DotProduct(), TStr::Fmt(), and IAssertR.
Referenced by GetNonEdgePairScores(), GradientForNode(), LikelihoodForNode(), LikelihoodHoldOut(), and Prediction().
|
inline |
Definition at line 179 of file agmdirected.h.
References Prediction().
void TCoda::RandomInit | ( | const int | InitComs | ) |
Definition at line 43 of file agmdirected.cpp.
References AddComIn(), AddComOut(), F, G, TVec< TVal, TSizeTy >::Gen(), TNGraph::TNodeI::GetInDeg(), TNGraph::GetNI(), TNGraph::GetNodes(), TNGraph::TNodeI::GetOutDeg(), TRnd::GetUniDev(), TRnd::GetUniDevInt(), H, TVec< TVal, TSizeTy >::Len(), NumComs, Rnd, SumFV, and SumHV.
Referenced by FindComsByCV(), and TCoda().
void TCoda::Save | ( | TSOut & | SOut | ) |
Definition at line 8 of file agmdirected.cpp.
References F, G, H, HOVIDSV, MaxVal, MinVal, NegWgt, NIDV, NodesOk, NumComs, PNoCom, RegCoef, TNGraph::Save(), TVec< TVal, TSizeTy >::Save(), TBool::Save(), TInt::Save(), TFlt::Save(), SumFV, and SumHV.
Definition at line 171 of file agmdirected.cpp.
References AddComIn(), AddComOut(), THash< TKey, TDat, THashFunc >::AddDat(), F, G, TVec< TVal, TSizeTy >::Gen(), TVec< TVal, TSizeTy >::GetDat(), TNGraph::GetNodes(), H, IAssert, TNGraph::IsNode(), TVec< TVal, TSizeTy >::Len(), NIDV, NodesOk, NumComs, SumFV, and SumHV.
void TCoda::SetGraph | ( | const PNGraph & | GraphPt | ) |
Definition at line 204 of file agmdirected.cpp.
References TSnap::DelSelfEdges(), DoParallel, G, TNGraph::GetNIdV(), TNGraph::GetNodes(), TSnap::GetSubGraph(), HOVIDSV, IAssert, TNGraph::IsNode(), TFlt::Mx, NegWgt, NIDV, NodesOk, and PNoCom.
Referenced by TCoda().
|
inline |
Definition at line 54 of file agmdirected.h.
References TAGMFastUtil::GenHoldOutPairs().
|
inline |
Definition at line 33 of file agmdirected.h.
|
inline |
Definition at line 182 of file agmdirected.h.
References THash< TKey, TDat, THashFunc >::BegI(), and THash< TKey, TDat, THashFunc >::EndI().
Referenced by LikelihoodForNode().
TBool TCoda::DoParallel |
Definition at line 25 of file agmdirected.h.
Referenced by SetGraph().
Definition at line 10 of file agmdirected.h.
Referenced by GetCommunity(), Likelihood(), LikelihoodForNode(), Load(), MLEGradAscent(), MLEGradAscentParallel(), NeighborComInit(), RandomInit(), Save(), and SetCmtyVV().
|
private |
Definition at line 9 of file agmdirected.h.
Referenced by DumpMemberships(), FindComsByCV(), GetCmtyS(), GetCmtyVV(), GetCmtyVVUnSorted(), GetGraph(), GetGraphRawNID(), GetNonEdgePairScores(), GradientForNode(), LikelihoodForNode(), LikelihoodHoldOut(), Load(), MLEGradAscent(), MLEGradAscentParallel(), NeighborComInit(), RandomInit(), Save(), SetCmtyVV(), and SetGraph().
Definition at line 11 of file agmdirected.h.
Referenced by LikelihoodForNode(), Load(), MLEGradAscent(), MLEGradAscentParallel(), NeighborComInit(), RandomInit(), Save(), and SetCmtyVV().
Definition at line 19 of file agmdirected.h.
Referenced by FindComsByCV(), GradientForNode(), LikelihoodForNode(), LikelihoodHoldOut(), Load(), MLEGradAscent(), MLEGradAscentParallel(), Save(), and SetGraph().
TFlt TCoda::MaxVal |
Definition at line 22 of file agmdirected.h.
Referenced by GetStepSizeByLineSearch(), Load(), and Save().
TFlt TCoda::MinVal |
Definition at line 21 of file agmdirected.h.
Referenced by GetStepSizeByLineSearch(), Load(), and Save().
TFlt TCoda::NegWgt |
Definition at line 23 of file agmdirected.h.
Referenced by GradientForNode(), LikelihoodForNode(), LikelihoodHoldOut(), Load(), Save(), and SetGraph().
|
private |
Definition at line 13 of file agmdirected.h.
Referenced by DumpMemberships(), GetCmtyS(), GetCmtyVVUnSorted(), GetCommunity(), GetGraphRawNID(), GetNIDValH(), GetNonEdgePairScores(), Load(), Save(), SetCmtyVV(), and SetGraph().
|
private |
Definition at line 17 of file agmdirected.h.
Referenced by GetCommunity(), Load(), Save(), SetCmtyVV(), and SetGraph().
|
private |
Definition at line 18 of file agmdirected.h.
Referenced by DumpMemberships(), GetCmtyVV(), GetCmtyVVUnSorted(), GradientForNode(), LikelihoodForNode(), Load(), MLEGradAscent(), NeighborComInit(), RandomInit(), Save(), and SetCmtyVV().
TFlt TCoda::PNoCom |
Definition at line 24 of file agmdirected.h.
Referenced by Load(), Save(), SetGraph(), and TCodaAnalyzer::TCodaAnalyzer().
|
private |
Definition at line 14 of file agmdirected.h.
Referenced by GetRegCoef(), GradientForNode(), LikelihoodForNode(), Load(), and Save().
|
private |
Definition at line 12 of file agmdirected.h.
Referenced by FindComsByCV(), Load(), MLEGradAscent(), MLEGradAscentParallel(), NeighborComInit(), and RandomInit().
|
private |
Definition at line 15 of file agmdirected.h.
Referenced by Load(), MLEGradAscentParallel(), NeighborComInit(), RandomInit(), Save(), and SetCmtyVV().
|
private |
Definition at line 16 of file agmdirected.h.
Referenced by GradientForNode(), LikelihoodForNode(), Load(), MLEGradAscentParallel(), NeighborComInit(), RandomInit(), Save(), and SetCmtyVV().