SNAP Library 2.4, Developer Reference
2015-05-11 19:40:56
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Fitting the Affilialiton Graph Model (AGM). More...
#include <agmfit.h>
Public Member Functions | |
TAGMFit () | |
~TAGMFit () | |
TAGMFit (const PUNGraph &GraphPt, const TVec< TIntV > &CmtyVVPt, const int RndSeed=0) | |
COMMENT. Use to describribe parameters. More... | |
TAGMFit (const PUNGraph &GraphPt, const int InitComs, const int RndSeed=0) | |
COMMENT. Use to describribe parameters. More... | |
TAGMFit (const PUNGraph &GraphPt, const TVec< TIntV > &CmtyVVPt, const TRnd &RndPt) | |
COMMENT. Use to describribe parameters. More... | |
void | Save (TSOut &SOut) |
void | Load (TSIn &SIn, const int &RndSeed=0) |
void | RandomInitCmtyVV (const int InitComs, const double ComSzAlpha=1.3, const double MemAlpha=1.8, const int MinComSz=8, const int MaxComSz=200, const int MinMem=1, const int MaxMem=10) |
Randomly initialize bipartite community affiliation graph. More... | |
void | AddBaseCmty () |
Add Epsilon community (base community which includes all nodes) into community affiliation graph. This means that we will later fit the value of epsilon. More... | |
double | Likelihood () |
COMMENT. More... | |
double | Likelihood (const TFltV &NewLambdaV) |
double | Likelihood (const TFltV &NewLambdaV, double &LEdges, double &LNoEdges) |
void | SetRegCoef (const double Val) |
void | GetEdgeJointCom () |
For each (u, v) in edges, precompute C_uv (the set of communities nodes u and v share). More... | |
void | NeighborComInit (const int InitComs) |
Initialize node community memberships using best neighborhood communities (see D. Gleich et al. KDD'12). More... | |
void | GradLogLForLambda (TFltV &GradV) |
int | MLEGradAscentGivenCAG (const double &Thres=0.001, const int &MaxIter=10000, const TStr PlotNm=TStr()) |
Gradient descent for p_c while keeping the community affiliation graph (CAG) fixed. More... | |
void | SetDefaultPNoCom () |
Set Epsilon (the probability that two nodes sharing no communities connect) to the default value. More... | |
void | SetPNoCom (const double &Epsilon) |
Set Epsilon (the probability that two nodes sharing no communities connect) to the default value. More... | |
double | GetPNoCom () |
double | CalcPNoComByCmtyVV (const int &SamplePairs=-1) |
Compute the empirical edge probability between a pair of nodes who share no community (epsilon), based on current community affiliations. More... | |
double | SelectLambdaSum (const TIntSet &ComK) |
Compute sum of lambda_c (which is log (1 - p_c )) over C_uv (ComK ). The function is used to compute edge probability P_uv . More... | |
double | SelectLambdaSum (const TFltV &NewLambdaV, const TIntSet &ComK) |
COMMENT. More... | |
void | RandomInit (const int &MaxK) |
COMMENT. More... | |
void | RunMCMC (const int &MaxIter, const int &EvalLambdaIter, const TStr &PlotFPrx=TStr()) |
Main procedure for fitting the AGM to a given graph using MCMC. More... | |
void | SampleTransition (int &NID, int &JoinCID, int &LeaveCID, double &DeltaL) |
Sample MMCM transitions: Choose among (join, leave, switch ), and then sample (NID, CID ). More... | |
void | InitNodeData () |
COMMENT. More... | |
void | LeaveCom (const int &NID, const int &CID) |
After MCMC, NID leaves community CID . More... | |
void | JoinCom (const int &NID, const int &JoinCID) |
int | RemoveEmptyCom () |
Remove all communities with no members. More... | |
double | SeekLeave (const int &UID, const int &CID) |
Compute the change in likelihood (Delta) if node UID leaves community CID . More... | |
double | SeekJoin (const int &UID, const int &CID) |
Compute the change in likelihood (Delta) if node UID joins community CID . More... | |
double | SeekSwitch (const int &UID, const int &CurCID, const int &NewCID) |
double | GetStepSizeByLineSearchForLambda (const TFltV &DeltaV, const TFltV &GradV, const double &Alpha, const double &Beta) |
Step size search for updating P_c (which is parametarized by regularization parameter lambda). More... | |
void | SetLambdaV (const TFltV &LambdaPt) |
COMMENT. More... | |
void | GetLambdaV (TFltV &OutV) |
COMMENT. More... | |
void | GetQV (TFltV &OutV) |
Returns QV , a vector of (1 - p_c ) for each community c . More... | |
void | GetCmtyVV (TVec< TIntV > &CmtyVV, const double QMax=2.0) |
Get communities whose p_c is higher than 1 - QMax . More... | |
void | GetCmtyVV (TVec< TIntV > &CmtyVV, TFltV &QV, const double QMax=2.0) |
COMMENT. More... | |
void | SetCmtyVV (const TVec< TIntV > &CmtyVV) |
COMMENT. More... | |
void | PrintSummary () |
COMMENT. More... | |
Private Attributes | |
PUNGraph | G |
Graph to fit. More... | |
TVec< TIntSet > | CIDNSetV |
Community ID -> Member Node ID Sets. More... | |
THash< TIntPr, TIntSet > | EdgeComVH |
Edge -> Shared Community ID Set. More... | |
THash< TInt, TIntSet > | NIDComVH |
Node ID -> Communitie IDs the node belongs to. More... | |
TIntV | ComEdgesV |
The number of edges in each community. More... | |
TFlt | PNoCom |
Probability of edge when two nodes share no community (epsilon in the paper). More... | |
TFltV | LambdaV |
Parametrization of P_c (edge probability in community c), P_c = 1 - exp(-lambda). More... | |
TRnd | Rnd |
THash< TIntPr, TFlt > | NIDCIDPrH |
<Node ID, Community ID> pairs (for sampling MCMC moves). More... | |
THash< TIntPr, TInt > | NIDCIDPrS |
<Node ID, Community ID> pairs (for sampling MCMC moves). More... | |
TFlt | MinLambda |
Minimum value of regularization parameter lambda (default = 1e-5). More... | |
TFlt | MaxLambda |
Maximum value of regularization parameter lambda (default = 10). More... | |
TFlt | RegCoef |
Regularization parameter when we fit for P_c (for finding # communities). More... | |
TInt | BaseCID |
ID of the Epsilon-community (in case we fit P_c of the epsilon community). We do not fit for the Epsilon-community in general. More... | |
|
inline |
COMMENT. Use to describribe parameters.
Definition at line 29 of file agmfit.h.
References SetCmtyVV().
|
inline |
COMMENT. Use to describribe parameters.
Definition at line 31 of file agmfit.h.
References NeighborComInit().
|
inline |
COMMENT. Use to describribe parameters.
Definition at line 33 of file agmfit.h.
References SetCmtyVV().
void TAGMFit::AddBaseCmty | ( | ) |
Add Epsilon community (base community which includes all nodes) into community affiliation graph. This means that we will later fit the value of epsilon.
Definition at line 251 of file agmfit.cpp.
References TVec< TVal, TSizeTy >::Add(), BaseCID, CIDNSetV, G, GetCmtyVV(), TUNGraph::GetNIdV(), IAssert, InitNodeData(), TVec< TVal, TSizeTy >::Len(), PNoCom, and SetCmtyVV().
double TAGMFit::CalcPNoComByCmtyVV | ( | const int & | SamplePairs = -1 | ) |
Compute the empirical edge probability between a pair of nodes who share no community (epsilon), based on current community affiliations.
Definition at line 632 of file agmfit.cpp.
References G, TAGMUtil::GetIntersection(), TUNGraph::GetNIdV(), TUNGraph::GetNodes(), TUInt64::GetStr(), TUNGraph::IsEdge(), TVec< TVal, TSizeTy >::Len(), THashSet< TKey, THashFunc >::Len(), NIDComVH, PNoCom, and TFlt::Val.
Get communities whose p_c is higher than 1 - QMax
.
Definition at line 554 of file agmfit.cpp.
Referenced by AddBaseCmty(), and TAGMUtil::FindComsByAGM().
COMMENT.
Definition at line 559 of file agmfit.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), BaseCID, CIDNSetV, G, TVec< TVal, TSizeTy >::Gen(), TUNGraph::GetNodes(), IAssert, LambdaV, TVec< TVal, TSizeTy >::Len(), and MinLambda.
void TAGMFit::GetEdgeJointCom | ( | ) |
For each (u, v)
in edges, precompute C_uv
(the set of communities nodes u and v share).
Definition at line 50 of file agmfit.cpp.
References TUNGraph::BegNI(), CIDNSetV, ComEdgesV, EdgeComVH, TUNGraph::EndNI(), G, TVec< TVal, TSizeTy >::Gen(), TUNGraph::GetEdges(), TAGMUtil::GetIntersection(), IAssert, THashSet< TKey, THashFunc >::Len(), and NIDComVH.
Referenced by InitNodeData().
|
inline |
COMMENT.
Definition at line 94 of file agmfit.h.
References LambdaV.
|
inline |
Definition at line 58 of file agmfit.h.
References PNoCom.
void TAGMFit::GetQV | ( | TFltV & | OutV | ) |
Returns QV
, a vector of (1 - p_c
) for each community c
.
Definition at line 451 of file agmfit.cpp.
References TVec< TVal, TSizeTy >::Gen(), LambdaV, and TVec< TVal, TSizeTy >::Len().
double TAGMFit::GetStepSizeByLineSearchForLambda | ( | const TFltV & | DeltaV, |
const TFltV & | GradV, | ||
const double & | Alpha, | ||
const double & | Beta | ||
) |
Step size search for updating P_c (which is parametarized by regularization parameter lambda).
Definition at line 109 of file agmfit.cpp.
References TLinAlg::DotProduct(), IAssert, LambdaV, TVec< TVal, TSizeTy >::Len(), Likelihood(), MaxLambda, and MinLambda.
Referenced by MLEGradAscentGivenCAG().
void TAGMFit::GradLogLForLambda | ( | TFltV & | GradV | ) |
Definition at line 595 of file agmfit.cpp.
References THashSet< TKey, THashFunc >::BegI(), CIDNSetV, ComEdgesV, EdgeComVH, THashSet< TKey, THashFunc >::EndI(), TVec< TVal, TSizeTy >::Gen(), LambdaV, TVec< TVal, TSizeTy >::Len(), THashSet< TKey, THashFunc >::Len(), PNoCom, RegCoef, and SelectLambdaSum().
Referenced by MLEGradAscentGivenCAG().
void TAGMFit::InitNodeData | ( | ) |
COMMENT.
Definition at line 264 of file agmfit.cpp.
References TUNGraph::BegNI(), CIDNSetV, ComEdgesV, TSnap::DelSelfEdges(), TUNGraph::EndNI(), G, TVec< TVal, TSizeTy >::Gen(), GetEdgeJointCom(), TAGMUtil::GetNodeMembership(), TUNGraph::GetNodes(), LambdaV, MaxLambda, MinLambda, NIDCIDPrS, and NIDComVH.
Referenced by AddBaseCmty(), NeighborComInit(), RandomInit(), RunMCMC(), and SetCmtyVV().
void TAGMFit::JoinCom | ( | const int & | NID, |
const int & | JoinCID | ||
) |
Definition at line 309 of file agmfit.cpp.
References CIDNSetV, ComEdgesV, EdgeComVH, G, TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), TMath::Mn(), TMath::Mx(), NIDCIDPrS, and NIDComVH.
Referenced by RunMCMC().
void TAGMFit::LeaveCom | ( | const int & | NID, |
const int & | CID | ||
) |
After MCMC, NID
leaves community CID
.
Definition at line 293 of file agmfit.cpp.
References CIDNSetV, ComEdgesV, EdgeComVH, G, TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), TMath::Mn(), TMath::Mx(), NIDCIDPrS, and NIDComVH.
Referenced by RunMCMC().
double TAGMFit::Likelihood | ( | ) |
COMMENT.
Definition at line 104 of file agmfit.cpp.
References LambdaV.
Referenced by TAGMUtil::FindComsByAGM(), GetStepSizeByLineSearchForLambda(), MLEGradAscentGivenCAG(), PrintSummary(), and RunMCMC().
|
inline |
Definition at line 43 of file agmfit.h.
References Likelihood().
Referenced by Likelihood().
double TAGMFit::Likelihood | ( | const TFltV & | NewLambdaV, |
double & | LEdges, | ||
double & | LNoEdges | ||
) |
Definition at line 76 of file agmfit.cpp.
References CIDNSetV, ComEdgesV, EdgeComVH, IAssert, TVec< TVal, TSizeTy >::Len(), THashSet< TKey, THashFunc >::Len(), TFlt::Mn, PNoCom, RegCoef, SelectLambdaSum(), and TLinAlg::SumVec().
void TAGMFit::Load | ( | TSIn & | SIn, |
const int & | RndSeed = 0 |
||
) |
Definition at line 24 of file agmfit.cpp.
References BaseCID, CIDNSetV, ComEdgesV, EdgeComVH, G, LambdaV, THash< TKey, TDat, THashFunc >::Load(), TUNGraph::Load(), TVec< TVal, TSizeTy >::Load(), TInt::Load(), TFlt::Load(), MaxLambda, MinLambda, NIDCIDPrH, NIDCIDPrS, NIDComVH, PNoCom, TRnd::PutSeed(), RegCoef, and Rnd.
int TAGMFit::MLEGradAscentGivenCAG | ( | const double & | Thres = 0.001 , |
const int & | MaxIter = 10000 , |
||
const TStr | PlotNm = TStr() |
||
) |
Gradient descent for p_c
while keeping the community affiliation graph (CAG) fixed.
Definition at line 130 of file agmfit.cpp.
References TVec< TVal, TSizeTy >::Add(), TStr::Empty(), G, TUNGraph::GetEdges(), GetStepSizeByLineSearchForLambda(), TExeTm::GetTmStr(), GradLogLForLambda(), Kilo, LambdaV, TVec< TVal, TSizeTy >::Len(), Likelihood(), MaxLambda, MinLambda, TLinAlg::Norm(), and TGnuPlot::PlotValV().
Referenced by TAGMUtil::FindComsByAGM(), and RunMCMC().
void TAGMFit::NeighborComInit | ( | const int | InitComs | ) |
Initialize node community memberships using best neighborhood communities (see D. Gleich et al. KDD'12).
Definition at line 186 of file agmfit.cpp.
References CIDNSetV, G, TAGMUtil::GetConductance(), TUNGraph::TNodeI::GetDeg(), TUNGraph::GetEdges(), TUNGraph::TNodeI::GetId(), TAGMUtil::GetNbhCom(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), TUNGraph::GetNIdV(), TUNGraph::GetNodes(), TUNGraph::GetRndNI(), TExeTm::GetTmStr(), IAssert, InitNodeData(), TVec< TVal, TSizeTy >::Len(), and SetDefaultPNoCom().
Referenced by TAGMFit().
void TAGMFit::PrintSummary | ( | ) |
COMMENT.
Definition at line 659 of file agmfit.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), CIDNSetV, ComEdgesV, LambdaV, TVec< TVal, TSizeTy >::Len(), Likelihood(), NIDCIDPrS, PNoCom, and TFlt::Val.
void TAGMFit::RandomInit | ( | const int & | MaxK | ) |
COMMENT.
Definition at line 169 of file agmfit.cpp.
References CIDNSetV, G, TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetId(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), TRnd::GetUniDevInt(), InitNodeData(), Rnd, and SetDefaultPNoCom().
void TAGMFit::RandomInitCmtyVV | ( | const int | InitComs, |
const double | ComSzAlpha = 1.3 , |
||
const double | MemAlpha = 1.8 , |
||
const int | MinComSz = 8 , |
||
const int | MaxComSz = 200 , |
||
const int | MinMem = 1 , |
||
const int | MaxMem = 10 |
||
) |
Randomly initialize bipartite community affiliation graph.
Definition at line 42 of file agmfit.cpp.
References G, TAGMUtil::GenCmtyVVFromPL(), TUNGraph::GetNodes(), Rnd, and SetCmtyVV().
int TAGMFit::RemoveEmptyCom | ( | ) |
Remove all communities with no members.
Definition at line 459 of file agmfit.cpp.
References CIDNSetV, TVec< TVal, TSizeTy >::DelLast(), LambdaV, and TVec< TVal, TSizeTy >::Last().
void TAGMFit::RunMCMC | ( | const int & | MaxIter, |
const int & | EvalLambdaIter, | ||
const TStr & | PlotFPrx = TStr() |
||
) |
Main procedure for fitting the AGM to a given graph using MCMC.
MCMC fitting.
Definition at line 366 of file agmfit.cpp.
References TVec< TVal, TSizeTy >::Add(), TGnuPlot::AddPlot(), BaseCID, CIDNSetV, TStr::Fmt(), G, TUNGraph::GetEdges(), TUNGraph::GetNodes(), TExeTm::GetTmStr(), TRnd::GetUniDev(), gpwLinesPoints, InitNodeData(), JoinCom(), LambdaV, LeaveCom(), TStr::Len(), Likelihood(), MLEGradAscentGivenCAG(), TMath::Mx(), Rnd, SampleTransition(), TGnuPlot::SavePng(), TGnuPlot::SetDataPlotFNm(), TGnuPlot::SetTitle(), and TExeTm::Tick().
Referenced by TAGMUtil::FindComsByAGM().
void TAGMFit::SampleTransition | ( | int & | NID, |
int & | JoinCID, | ||
int & | LeaveCID, | ||
double & | DeltaL | ||
) |
Sample MMCM transitions: Choose among (join, leave, switch
), and then sample (NID, CID
).
Definition at line 325 of file agmfit.cpp.
References BaseCID, CIDNSetV, G, TUNGraph::GetNodes(), TUNGraph::GetRndNId(), TRnd::GetUniDevInt(), TFlt::Mn, NIDCIDPrS, NIDComVH, Rnd, SeekJoin(), SeekLeave(), SeekSwitch(), TPair< TVal1, TVal2 >::Val1, and TPair< TVal1, TVal2 >::Val2.
Referenced by RunMCMC().
void TAGMFit::Save | ( | TSOut & | SOut | ) |
Definition at line 8 of file agmfit.cpp.
References BaseCID, CIDNSetV, ComEdgesV, EdgeComVH, G, LambdaV, MaxLambda, MinLambda, NIDCIDPrH, NIDCIDPrS, NIDComVH, PNoCom, RegCoef, THash< TKey, TDat, THashFunc >::Save(), TUNGraph::Save(), TVec< TVal, TSizeTy >::Save(), TInt::Save(), and TFlt::Save().
double TAGMFit::SeekJoin | ( | const int & | UID, |
const int & | CID | ||
) |
Compute the change in likelihood (Delta) if node UID
joins community CID
.
Definition at line 502 of file agmfit.cpp.
References CIDNSetV, EdgeComVH, G, TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), IAssert, LambdaV, THashSet< TKey, THashFunc >::Len(), TMath::Mn(), TMath::Mx(), NIDComVH, PNoCom, and SelectLambdaSum().
Referenced by SampleTransition(), and SeekSwitch().
double TAGMFit::SeekLeave | ( | const int & | UID, |
const int & | CID | ||
) |
Compute the change in likelihood (Delta) if node UID
leaves community CID
.
Definition at line 475 of file agmfit.cpp.
References CIDNSetV, EdgeComVH, G, TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), IAssert, TUNGraph::IsNode(), LambdaV, THashSet< TKey, THashFunc >::Len(), TMath::Mn(), TMath::Mx(), NIDComVH, PNoCom, and SelectLambdaSum().
Referenced by SampleTransition(), and SeekSwitch().
double TAGMFit::SeekSwitch | ( | const int & | UID, |
const int & | CurCID, | ||
const int & | NewCID | ||
) |
Definition at line 525 of file agmfit.cpp.
References CIDNSetV, EdgeComVH, G, TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), IAssert, LambdaV, THashSet< TKey, THashFunc >::Len(), TMath::Mn(), TMath::Mx(), NIDComVH, PNoCom, SeekJoin(), SeekLeave(), SelectLambdaSum(), and TFlt::Val.
Referenced by SampleTransition().
double TAGMFit::SelectLambdaSum | ( | const TIntSet & | ComK | ) |
Compute sum of lambda_c
(which is log (1 - p_c
)) over C_uv
(ComK
). The function is used to compute edge probability P_uv
.
Definition at line 618 of file agmfit.cpp.
References LambdaV.
Referenced by GradLogLForLambda(), Likelihood(), SeekJoin(), SeekLeave(), and SeekSwitch().
COMMENT.
Definition at line 622 of file agmfit.cpp.
References THashSet< TKey, THashFunc >::BegI(), THashSet< TKey, THashFunc >::EndI(), and IAssert.
COMMENT.
Definition at line 584 of file agmfit.cpp.
References CIDNSetV, G, IAssert, InitNodeData(), TUNGraph::IsNode(), TVec< TVal, TSizeTy >::Len(), and SetDefaultPNoCom().
Referenced by AddBaseCmty(), RandomInitCmtyVV(), and TAGMFit().
void TAGMFit::SetDefaultPNoCom | ( | ) |
Set Epsilon (the probability that two nodes sharing no communities connect) to the default value.
Definition at line 72 of file agmfit.cpp.
References G, TUNGraph::GetNodes(), and PNoCom.
Referenced by NeighborComInit(), RandomInit(), and SetCmtyVV().
|
inline |
COMMENT.
Definition at line 92 of file agmfit.h.
References LambdaV.
|
inline |
Set Epsilon (the probability that two nodes sharing no communities connect) to the default value.
Definition at line 57 of file agmfit.h.
References BaseCID, and PNoCom.
Referenced by TAGMUtil::FindComsByAGM().
|
inline |
Definition at line 45 of file agmfit.h.
References RegCoef.
Referenced by TAGMUtil::FindComsByAGM().
|
private |
ID of the Epsilon-community (in case we fit P_c of the epsilon community). We do not fit for the Epsilon-community in general.
Definition at line 23 of file agmfit.h.
Referenced by AddBaseCmty(), GetCmtyVV(), Load(), RunMCMC(), SampleTransition(), Save(), and SetPNoCom().
Community ID -> Member Node ID Sets.
Definition at line 11 of file agmfit.h.
Referenced by AddBaseCmty(), GetCmtyVV(), GetEdgeJointCom(), GradLogLForLambda(), InitNodeData(), JoinCom(), LeaveCom(), Likelihood(), Load(), NeighborComInit(), PrintSummary(), RandomInit(), RemoveEmptyCom(), RunMCMC(), SampleTransition(), Save(), SeekJoin(), SeekLeave(), SeekSwitch(), and SetCmtyVV().
|
private |
The number of edges in each community.
Definition at line 14 of file agmfit.h.
Referenced by GetEdgeJointCom(), GradLogLForLambda(), InitNodeData(), JoinCom(), LeaveCom(), Likelihood(), Load(), PrintSummary(), and Save().
Edge -> Shared Community ID Set.
Definition at line 12 of file agmfit.h.
Referenced by GetEdgeJointCom(), GradLogLForLambda(), JoinCom(), LeaveCom(), Likelihood(), Load(), Save(), SeekJoin(), SeekLeave(), and SeekSwitch().
|
private |
Graph to fit.
Definition at line 10 of file agmfit.h.
Referenced by AddBaseCmty(), CalcPNoComByCmtyVV(), GetCmtyVV(), GetEdgeJointCom(), InitNodeData(), JoinCom(), LeaveCom(), Load(), MLEGradAscentGivenCAG(), NeighborComInit(), RandomInit(), RandomInitCmtyVV(), RunMCMC(), SampleTransition(), Save(), SeekJoin(), SeekLeave(), SeekSwitch(), SetCmtyVV(), and SetDefaultPNoCom().
|
private |
Parametrization of P_c (edge probability in community c), P_c = 1 - exp(-lambda).
Definition at line 16 of file agmfit.h.
Referenced by GetCmtyVV(), GetLambdaV(), GetQV(), GetStepSizeByLineSearchForLambda(), GradLogLForLambda(), InitNodeData(), Likelihood(), Load(), MLEGradAscentGivenCAG(), PrintSummary(), RemoveEmptyCom(), RunMCMC(), Save(), SeekJoin(), SeekLeave(), SeekSwitch(), SelectLambdaSum(), and SetLambdaV().
|
private |
Maximum value of regularization parameter lambda (default = 10).
Definition at line 21 of file agmfit.h.
Referenced by GetStepSizeByLineSearchForLambda(), InitNodeData(), Load(), MLEGradAscentGivenCAG(), and Save().
|
private |
Minimum value of regularization parameter lambda (default = 1e-5).
Definition at line 20 of file agmfit.h.
Referenced by GetCmtyVV(), GetStepSizeByLineSearchForLambda(), InitNodeData(), Load(), MLEGradAscentGivenCAG(), and Save().
<Node ID, Community ID> pairs (for sampling MCMC moves).
Definition at line 19 of file agmfit.h.
Referenced by InitNodeData(), JoinCom(), LeaveCom(), Load(), PrintSummary(), SampleTransition(), and Save().
Node ID -> Communitie IDs the node belongs to.
Definition at line 13 of file agmfit.h.
Referenced by CalcPNoComByCmtyVV(), GetEdgeJointCom(), InitNodeData(), JoinCom(), LeaveCom(), Load(), SampleTransition(), Save(), SeekJoin(), SeekLeave(), and SeekSwitch().
|
private |
Probability of edge when two nodes share no community (epsilon in the paper).
Definition at line 15 of file agmfit.h.
Referenced by AddBaseCmty(), CalcPNoComByCmtyVV(), GetPNoCom(), GradLogLForLambda(), Likelihood(), Load(), PrintSummary(), Save(), SeekJoin(), SeekLeave(), SeekSwitch(), SetDefaultPNoCom(), and SetPNoCom().
|
private |
Regularization parameter when we fit for P_c (for finding # communities).
Definition at line 22 of file agmfit.h.
Referenced by GradLogLForLambda(), Likelihood(), Load(), Save(), and SetRegCoef().
|
private |
Definition at line 17 of file agmfit.h.
Referenced by Load(), RandomInit(), RandomInitCmtyVV(), RunMCMC(), and SampleTransition().