SNAP Library 2.1, User Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <kronecker.h>
Classes | |
class | TFEval |
Public Member Functions | |
TKronMaxLL (const PNGraph &GraphPt, const TKronMtx &StartParam) | |
void | SetPerm (const char &PermId) |
void | GradDescent (const int &NIter, const double &LrnRate, const double &MnStep, const double &MxStep, const double &WarmUp, const double &NSamples) |
Static Public Member Functions | |
static void | RoundTheta (const TFltV &ThetaV, TFltV &NewThetaV) |
static void | RoundTheta (const TFltV &ThetaV, TKronMtx &Kronecker) |
static void | Test () |
Private Attributes | |
THash< TKronMtx, TFEval > | FEvalH |
TKroneckerLL | KronLL |
Definition at line 265 of file kronecker.h.
TKronMaxLL::TKronMaxLL | ( | const PNGraph & | GraphPt, |
const TKronMtx & | StartParam | ||
) | [inline] |
Definition at line 283 of file kronecker.h.
: KronLL(GraphPt, StartParam) { }
void TKronMaxLL::GradDescent | ( | const int & | NIter, |
const double & | LrnRate, | ||
const double & | MnStep, | ||
const double & | MxStep, | ||
const double & | WarmUp, | ||
const double & | NSamples | ||
) |
void TKronMaxLL::RoundTheta | ( | const TFltV & | ThetaV, |
TFltV & | NewThetaV | ||
) | [static] |
Definition at line 2354 of file kronecker.cpp.
{ NewThetaV.Gen(ThetaV.Len()); for (int i = 0; i < ThetaV.Len(); i++) { NewThetaV[i] = TMath::Round(ThetaV[i], 3); } }
void TKronMaxLL::RoundTheta | ( | const TFltV & | ThetaV, |
TKronMtx & | Kronecker | ||
) | [static] |
Definition at line 2361 of file kronecker.cpp.
{ Kronecker.GenMtx((int)sqrt((double)ThetaV.Len())); for (int i = 0; i < ThetaV.Len(); i++) { Kronecker.At(i) = TMath::Round(ThetaV[i], 3); } }
void TKronMaxLL::SetPerm | ( | const char & | PermId | ) |
Definition at line 2297 of file kronecker.cpp.
{ if (PermId == 'o') KronLL.SetOrderPerm(); else if (PermId == 'd') KronLL.SetDegPerm(); else if (PermId == 'r') KronLL.SetRndPerm(); else FailR("Unknown permutation type (o,d,r)"); }
void TKronMaxLL::Test | ( | ) | [static] |
Definition at line 2367 of file kronecker.cpp.
{ TKronMtx::PutRndSeed(1); TKronMtx KronParam = TKronMtx::GetMtx("0.8 0.7; 0.6 0.5"); PNGraph Graph = TKronMtx::GenFastKronecker(KronParam, 8, true, 1); TKronMaxLL KronMaxLL(Graph, TFltV::GetV(0.9, 0.7, 0.5, 0.3)); KronMaxLL.SetPerm('d'); //KronMaxLL.MaximizeLL(10000, 50000); /*TKroneckerLL KronLL(Graph, *TKronMtx::GetMtx("0.9 0.7; 0.5 0.3")); KronLL.SetDegPerm(); KronLL.GradDescent(0.005/double(Graph->GetNodes()));*/ }
THash<TKronMtx, TFEval> TKronMaxLL::FEvalH [private] |
Definition at line 280 of file kronecker.h.
TKroneckerLL TKronMaxLL::KronLL [private] |
Definition at line 281 of file kronecker.h.