SNAP Library 6.0, User Reference
2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
!!!!! MYUNGHWAN, CHECK! More...
#include <kronecker.h>
Public Member Functions | |
TKroneckerLL () | |
TKroneckerLL (const PNGraph &GraphPt, const TFltV &ParamV, const double &PermPSwapNd=0.2) | |
TKroneckerLL (const PNGraph &GraphPt, const TKronMtx &ParamMtx, const double &PermPSwapNd=0.2) | |
TKroneckerLL (const PNGraph &GraphPt, const TKronMtx &ParamMtx, const TIntV &NodeIdPermV, const double &PermPSwapNd=0.2) | |
int | GetNodes () const |
int | GetKronIters () const |
PNGraph | GetGraph () const |
void | SetGraph (const PNGraph &GraphPt) |
const TKronMtx & | GetProbMtx () const |
const TKronMtx & | GetLLMtx () const |
int | GetParams () const |
int | GetDim () const |
void | SetDebug (const bool Debug) |
const TFltV & | GetLLHist () const |
const TVec< TKronMtx > & | GetParamHist () const |
bool | IsObsNode (const int &NId) const |
bool | IsObsEdge (const int &NId1, const int &NId2) const |
bool | IsLatentNode (const int &NId) const |
bool | IsLatentEdge (const int &NId1, const int &NId2) const |
void | SetPerm (const char &PermId) |
void | SetOrderPerm () |
void | SetRndPerm () |
void | SetDegPerm () |
void | SetBestDegPerm () |
!!!!! MYUNGHWAN, CHECK! More... | |
void | SetPerm (const TIntV &NodePermV) |
void | SetIPerm (const TIntV &Perm) |
!!!!! MYUNGHWAN, CHECK! More... | |
const TIntV & | GetPermV () const |
void | AppendIsoNodes () |
void | RestoreGraph (const bool RestoreNodes=true) |
!!!!! MYUNGHWAN, CHECK! More... | |
double | GetFullGraphLL () const |
double | GetFullRowLL (int RowId) const |
double | GetFullColLL (int ColId) const |
double | GetEmptyGraphLL () const |
double | GetApxEmptyGraphLL () const |
void | InitLL (const TFltV &ParamV) |
void | InitLL (const TKronMtx &ParamMtx) |
void | InitLL (const PNGraph &GraphPt, const TKronMtx &ParamMtx) |
double | CalcGraphLL () |
double | CalcApxGraphLL () |
double | GetLL () const |
double | GetAbsErr () const |
double | NodeLLDelta (const int &NId) const |
double | SwapNodesLL (const int &NId1, const int &NId2) |
bool | SampleNextPerm (int &NId1, int &NId2) |
double | GetEmptyGraphDLL (const int &ParamId) const |
double | GetApxEmptyGraphDLL (const int &ParamId) const |
const TFltV & | CalcGraphDLL () |
const TFltV & | CalcFullApxGraphDLL () |
const TFltV & | CalcApxGraphDLL () |
double | NodeDLLDelta (const int ParamId, const int &NId) const |
void | UpdateGraphDLL (const int &SwapNId1, const int &SwapNId2) |
const TFltV & | GetDLL () const |
double | GetDLL (const int &ParamId) const |
void | SampleGradient (const int &WarmUp, const int &NSamples, double &AvgLL, TFltV &GradV) |
double | GradDescent (const int &NIter, const double &LrnRate, double MnStep, double MxStep, const int &WarmUp, const int &NSamples) |
double | GradDescent2 (const int &NIter, const double &LrnRate, double MnStep, double MxStep, const int &WarmUp, const int &NSamples) |
void | SetRandomEdges (const int &NEdges, const bool isDir=true) |
!!!!! MYUNGHWAN, CHECK! More... | |
void | MetroGibbsSampleSetup (const int &WarmUp) |
void | MetroGibbsSampleNext (const int &WarmUp, const bool DLLUpdate=false) |
void | RunEStep (const int &GibbsWarmUp, const int &WarmUp, const int &NSamples, TFltV &LLV, TVec< TFltV > &DLLV) |
double | RunMStep (const TFltV &LLV, const TVec< TFltV > &DLLV, const int &GradIter, const double &LrnRate, double MnStep, double MxStep) |
void | RunKronEM (const int &EMIter, const int &GradIter, double LrnRate, double MnStep, double MxStep, const int &GibbsWarmUp, const int &WarmUp, const int &NSamples, const TKronEMType &Type=kronNodeMiss, const int &NMissing=-1) |
TFltV | TestSamplePerm (const TStr &OutFNm, const int &WarmUp, const int &NSamples, const TKronMtx &TrueMtx, const bool &DoPlot=true) |
TFltQu | TestKronDescent (const bool &DoExact, const bool &TruePerm, double LearnRate, const int &WarmUp, const int &NSamples, const TKronMtx &TrueParam) |
void | GradDescentConvergence (const TStr &OutFNm, const TStr &Desc1, const bool &SamplePerm, const int &NIters, double LearnRate, const int &WarmUp, const int &NSamples, const int &AvgKGraphs, const TKronMtx &TrueParam) |
Static Public Member Functions | |
static PKroneckerLL | New () |
static PKroneckerLL | New (const PNGraph &GraphPt, const TKronMtx &ParamMtx, const double &PermPSwapNd=0.1) |
static PKroneckerLL | New (const PNGraph &GraphPt, const TKronMtx &ParamMtx, const TIntV &NodeIdPermV, const double &PermPSwapNd=0.2) |
static double | CalcChainR2 (const TVec< TFltV > &ChainLLV) |
static void | ChainGelmapRubinPlot (const TVec< TFltV > &ChainLLV, const TStr &OutFNm, const TStr &Desc) |
static void | TestBicCriterion (const TStr &OutFNm, const TStr &Desc1, const PNGraph &G, const int &GradIters, double LearnRate, const int &WarmUp, const int &NSamples, const int &TrueN0) |
static void | TestGradDescent (const int &KronIters, const int &KiloSamples, const TStr &Permutation) |
Friends | |
class | TPt< TKroneckerLL > |
!!!!! MYUNGHWAN, CHECK!
Definition at line 116 of file kronecker.h.
|
inline |
Definition at line 150 of file kronecker.h.
TKroneckerLL::TKroneckerLL | ( | const PNGraph & | GraphPt, |
const TFltV & | ParamV, | ||
const double & | PermPSwapNd = 0.2 |
||
) |
Definition at line 783 of file kronecker.cpp.
TKroneckerLL::TKroneckerLL | ( | const PNGraph & | GraphPt, |
const TKronMtx & | ParamMtx, | ||
const double & | PermPSwapNd = 0.2 |
||
) |
Definition at line 787 of file kronecker.cpp.
TKroneckerLL::TKroneckerLL | ( | const PNGraph & | GraphPt, |
const TKronMtx & | ParamMtx, | ||
const TIntV & | NodeIdPermV, | ||
const double & | PermPSwapNd = 0.2 |
||
) |
Definition at line 791 of file kronecker.cpp.
void TKroneckerLL::AppendIsoNodes | ( | ) |
Definition at line 914 of file kronecker.cpp.
const TFltV & TKroneckerLL::CalcApxGraphDLL | ( | ) |
Definition at line 1194 of file kronecker.cpp.
double TKroneckerLL::CalcApxGraphLL | ( | ) |
Definition at line 1037 of file kronecker.cpp.
Definition at line 1895 of file kronecker.cpp.
const TFltV & TKroneckerLL::CalcFullApxGraphDLL | ( | ) |
Definition at line 1176 of file kronecker.cpp.
const TFltV & TKroneckerLL::CalcGraphDLL | ( | ) |
Definition at line 1158 of file kronecker.cpp.
double TKroneckerLL::CalcGraphLL | ( | ) |
Definition at line 1022 of file kronecker.cpp.
|
static |
Definition at line 1924 of file kronecker.cpp.
|
inline |
Definition at line 205 of file kronecker.h.
double TKroneckerLL::GetApxEmptyGraphDLL | ( | const int & | ParamId | ) | const |
double TKroneckerLL::GetApxEmptyGraphLL | ( | ) | const |
Definition at line 987 of file kronecker.cpp.
|
inline |
Definition at line 165 of file kronecker.h.
|
inline |
Definition at line 218 of file kronecker.h.
|
inline |
Definition at line 219 of file kronecker.h.
double TKroneckerLL::GetEmptyGraphDLL | ( | const int & | ParamId | ) | const |
Definition at line 1136 of file kronecker.cpp.
double TKroneckerLL::GetEmptyGraphLL | ( | ) | const |
Definition at line 976 of file kronecker.cpp.
double TKroneckerLL::GetFullColLL | ( | int | ColId | ) | const |
Definition at line 966 of file kronecker.cpp.
double TKroneckerLL::GetFullGraphLL | ( | ) | const |
Definition at line 943 of file kronecker.cpp.
double TKroneckerLL::GetFullRowLL | ( | int | RowId | ) | const |
Definition at line 956 of file kronecker.cpp.
|
inline |
Definition at line 160 of file kronecker.h.
|
inline |
Definition at line 159 of file kronecker.h.
|
inline |
Definition at line 204 of file kronecker.h.
|
inline |
Definition at line 168 of file kronecker.h.
|
inline |
Definition at line 163 of file kronecker.h.
|
inline |
Definition at line 158 of file kronecker.h.
Definition at line 169 of file kronecker.h.
|
inline |
Definition at line 164 of file kronecker.h.
|
inline |
Definition at line 185 of file kronecker.h.
|
inline |
Definition at line 162 of file kronecker.h.
double TKroneckerLL::GradDescent | ( | const int & | NIter, |
const double & | LrnRate, | ||
double | MnStep, | ||
double | MxStep, | ||
const int & | WarmUp, | ||
const int & | NSamples | ||
) |
!!!!! MYUNGHWAN, CHECK!
!!!!! MYUNGHWAN, CHECK!
Definition at line 1299 of file kronecker.cpp.
double TKroneckerLL::GradDescent2 | ( | const int & | NIter, |
const double & | LrnRate, | ||
double | MnStep, | ||
double | MxStep, | ||
const int & | WarmUp, | ||
const int & | NSamples | ||
) |
Definition at line 1355 of file kronecker.cpp.
void TKroneckerLL::GradDescentConvergence | ( | const TStr & | OutFNm, |
const TStr & | Desc1, | ||
const bool & | SamplePerm, | ||
const int & | NIters, | ||
double | LearnRate, | ||
const int & | WarmUp, | ||
const int & | NSamples, | ||
const int & | AvgKGraphs, | ||
const TKronMtx & | TrueParam | ||
) |
Definition at line 2017 of file kronecker.cpp.
void TKroneckerLL::InitLL | ( | const TFltV & | ParamV | ) |
Definition at line 996 of file kronecker.cpp.
void TKroneckerLL::InitLL | ( | const TKronMtx & | ParamMtx | ) |
Definition at line 1000 of file kronecker.cpp.
Definition at line 1010 of file kronecker.cpp.
|
inline |
Definition at line 175 of file kronecker.h.
|
inline |
Definition at line 174 of file kronecker.h.
|
inline |
Definition at line 173 of file kronecker.h.
|
inline |
Definition at line 172 of file kronecker.h.
void TKroneckerLL::MetroGibbsSampleNext | ( | const int & | WarmUp, |
const bool | DLLUpdate = false |
||
) |
Definition at line 1503 of file kronecker.cpp.
void TKroneckerLL::MetroGibbsSampleSetup | ( | const int & | WarmUp | ) |
Definition at line 1476 of file kronecker.cpp.
|
inlinestatic |
Definition at line 154 of file kronecker.h.
|
static |
Definition at line 797 of file kronecker.cpp.
|
static |
Definition at line 801 of file kronecker.cpp.
double TKroneckerLL::NodeDLLDelta | ( | const int | ParamId, |
const int & | NId | ||
) | const |
Definition at line 1214 of file kronecker.cpp.
double TKroneckerLL::NodeLLDelta | ( | const int & | NId | ) | const |
Definition at line 1055 of file kronecker.cpp.
void TKroneckerLL::RestoreGraph | ( | const bool | RestoreNodes = true | ) |
!!!!! MYUNGHWAN, CHECK!
Definition at line 923 of file kronecker.cpp.
void TKroneckerLL::RunEStep | ( | const int & | GibbsWarmUp, |
const int & | WarmUp, | ||
const int & | NSamples, | ||
TFltV & | LLV, | ||
TVec< TFltV > & | DLLV | ||
) |
Definition at line 1567 of file kronecker.cpp.
void TKroneckerLL::RunKronEM | ( | const int & | EMIter, |
const int & | GradIter, | ||
double | LrnRate, | ||
double | MnStep, | ||
double | MxStep, | ||
const int & | GibbsWarmUp, | ||
const int & | WarmUp, | ||
const int & | NSamples, | ||
const TKronEMType & | Type = kronNodeMiss , |
||
const int & | NMissing = -1 |
||
) |
Definition at line 1692 of file kronecker.cpp.
double TKroneckerLL::RunMStep | ( | const TFltV & | LLV, |
const TVec< TFltV > & | DLLV, | ||
const int & | GradIter, | ||
const double & | LrnRate, | ||
double | MnStep, | ||
double | MxStep | ||
) |
Definition at line 1597 of file kronecker.cpp.
void TKroneckerLL::SampleGradient | ( | const int & | WarmUp, |
const int & | NSamples, | ||
double & | AvgLL, | ||
TFltV & | GradV | ||
) |
Definition at line 1271 of file kronecker.cpp.
bool TKroneckerLL::SampleNextPerm | ( | int & | NId1, |
int & | NId2 | ||
) |
Definition at line 1111 of file kronecker.cpp.
void TKroneckerLL::SetBestDegPerm | ( | ) |
!!!!! MYUNGHWAN, CHECK!
Definition at line 842 of file kronecker.cpp.
|
inline |
Definition at line 167 of file kronecker.h.
void TKroneckerLL::SetDegPerm | ( | ) |
Definition at line 828 of file kronecker.cpp.
void TKroneckerLL::SetGraph | ( | const PNGraph & | GraphPt | ) |
Definition at line 882 of file kronecker.cpp.
void TKroneckerLL::SetIPerm | ( | const TIntV & | Perm | ) |
!!!!! MYUNGHWAN, CHECK!
Definition at line 875 of file kronecker.cpp.
void TKroneckerLL::SetOrderPerm | ( | ) |
Definition at line 813 of file kronecker.cpp.
void TKroneckerLL::SetPerm | ( | const char & | PermId | ) |
Definition at line 805 of file kronecker.cpp.
|
inline |
Definition at line 183 of file kronecker.h.
void TKroneckerLL::SetRandomEdges | ( | const int & | NEdges, |
const bool | isDir = true |
||
) |
!!!!! MYUNGHWAN, CHECK!
Definition at line 1417 of file kronecker.cpp.
void TKroneckerLL::SetRndPerm | ( | ) |
Definition at line 820 of file kronecker.cpp.
double TKroneckerLL::SwapNodesLL | ( | const int & | NId1, |
const int & | NId2 | ||
) |
Definition at line 1083 of file kronecker.cpp.
|
static |
Definition at line 2109 of file kronecker.cpp.
|
static |
Definition at line 2138 of file kronecker.cpp.
TFltQu TKroneckerLL::TestKronDescent | ( | const bool & | DoExact, |
const bool & | TruePerm, | ||
double | LearnRate, | ||
const int & | WarmUp, | ||
const int & | NSamples, | ||
const TKronMtx & | TrueParam | ||
) |
Definition at line 1942 of file kronecker.cpp.
TFltV TKroneckerLL::TestSamplePerm | ( | const TStr & | OutFNm, |
const int & | WarmUp, | ||
const int & | NSamples, | ||
const TKronMtx & | TrueMtx, | ||
const bool & | DoPlot = true |
||
) |
Definition at line 1795 of file kronecker.cpp.
void TKroneckerLL::UpdateGraphDLL | ( | const int & | SwapNId1, |
const int & | SwapNId2 | ||
) |
Definition at line 1241 of file kronecker.cpp.
|
friend |
Definition at line 245 of file kronecker.h.
|
private |
Definition at line 119 of file kronecker.h.
|
private |
Definition at line 141 of file kronecker.h.
|
private |
Definition at line 138 of file kronecker.h.
|
private |
Definition at line 125 of file kronecker.h.
|
private |
Definition at line 136 of file kronecker.h.
|
private |
Definition at line 120 of file kronecker.h.
|
private |
Definition at line 129 of file kronecker.h.
|
private |
Definition at line 121 of file kronecker.h.
|
private |
Definition at line 126 of file kronecker.h.
|
private |
Definition at line 134 of file kronecker.h.
|
private |
Definition at line 142 of file kronecker.h.
|
private |
Definition at line 135 of file kronecker.h.
|
private |
Definition at line 127 of file kronecker.h.
|
private |
Definition at line 139 of file kronecker.h.
Definition at line 143 of file kronecker.h.
|
private |
Definition at line 128 of file kronecker.h.
|
private |
Definition at line 121 of file kronecker.h.
|
private |
Definition at line 123 of file kronecker.h.
|
private |
Definition at line 134 of file kronecker.h.
|
private |
Definition at line 132 of file kronecker.h.
|
private |
Definition at line 131 of file kronecker.h.