| 
    SNAP Library 2.3, Developer Reference
    2014-06-16 11:58:46
    
   SNAP, a general purpose, high performance system for analysis and manipulation of large networks 
   | 
 
#include <circles.h>

Public Member Functions | |
| TCluster (PGraphAttributes GraphAttributes, TInt K, TFlt Lambda) | |
| ~TCluster () | |
| void | Train (TInt OuterReps, TInt GradientReps, TInt MCMCReps) | 
| Train the model to predict K Clusters.  More... | |
| TVec< TIntSet > | GetCircles (void) | 
Public Attributes | |
| TCRef | CRef | 
Private Member Functions | |
| TFlt | LogLikelihood () | 
| Compute the log-likelihood of Parameters and cluster assignments.  More... | |
| TIntSet | MCMC (TInt k, TInt MCMCReps) | 
| Optimize the cluster assignments for the k'th cluster.  More... | |
| void | Gradient () | 
| Update partial derivatives of log-likelihood.  More... | |
Private Attributes | |
| TFlt * | Theta | 
| TFlt * | Derivative | 
| TVec< TIntSet > | CHat | 
| PGraphAttributes | GraphAttributes | 
| TInt | K | 
| TFlt | Lambda | 
      
  | 
  inline | 
| GraphAttributes | attributed graph object with attributes | 
| K | number of communities to detect | 
| Lambda | regularization parameter | 
Definition at line 35 of file circles.h.
References CHat, Derivative, K, TGraphAttributes::NFeatures, and Theta.
      
  | 
  inline | 
      
  | 
  private | 
Update partial derivatives of log-likelihood.
Definition at line 456 of file circles.h.
References CHat, Derivative, TGraphAttributes::EdgeFeatures, TGraphAttributes::G, THashKeyDatI< TKey, TDat >::GetDat(), GraphAttributes, Inner(), TUNGraph::IsEdge(), K, Lambda, TGraphAttributes::NFeatures, Theta, TPair< TVal1, TVal2 >::Val1, and TPair< TVal1, TVal2 >::Val2.
Referenced by Train().


      
  | 
  private | 
Compute the log-likelihood of Parameters and cluster assignments.
Definition at line 499 of file circles.h.
References CHat, TGraphAttributes::EdgeFeatures, TGraphAttributes::G, GraphAttributes, Inner(), TUNGraph::IsEdge(), K, TGraphAttributes::NFeatures, Theta, TPair< TVal1, TVal2 >::Val1, and TPair< TVal1, TVal2 >::Val2.
Referenced by Train().


Optimize the cluster assignments for the k'th cluster.
| k | community index on which to run MCMC | 
| MCMCReps | number of iterations of MCMC | 
Definition at line 358 of file circles.h.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), THashSet< TKey, THashFunc >::AddKey(), CHat, TGraphAttributes::EdgeFeatures, TGraphAttributes::G, THash< TKey, TDat, THashFunc >::GetDat(), TRnd::GetUniDev(), GraphAttributes, Inner(), TUNGraph::IsEdge(), K, TVec< TVal, TSizeTy >::Len(), TGraphAttributes::NFeatures, TGraphAttributes::NodeIDs, Theta, TPair< TVal1, TVal2 >::Val1, and TPair< TVal1, TVal2 >::Val2.
Referenced by Train().


Train the model to predict K Clusters.
| OuterReps | number of coordinate ascent iterations | 
| GradientReps | number of iterations of gradient ascent | 
| MCMCReps | number of iterations of MCMC | 
Definition at line 292 of file circles.h.
References CHat, Derivative, TRnd::GetUniDevInt(), Gradient(), GraphAttributes, K, TVec< TVal, TSizeTy >::Len(), LogLikelihood(), MCMC(), TGraphAttributes::NFeatures, TGraphAttributes::NodeIDs, and Theta.

Definition at line 73 of file circles.h.
Referenced by GetCircles(), Gradient(), LogLikelihood(), MCMC(), TCluster(), and Train().
      
  | 
  private | 
Definition at line 71 of file circles.h.
Referenced by Gradient(), TCluster(), Train(), and ~TCluster().
      
  | 
  private | 
Definition at line 74 of file circles.h.
Referenced by Gradient(), LogLikelihood(), MCMC(), and Train().
      
  | 
  private | 
Definition at line 76 of file circles.h.
Referenced by Gradient(), LogLikelihood(), MCMC(), TCluster(), and Train().
      
  | 
  private | 
Definition at line 77 of file circles.h.
Referenced by Gradient().
      
  | 
  private | 
Definition at line 70 of file circles.h.
Referenced by Gradient(), LogLikelihood(), MCMC(), TCluster(), Train(), and ~TCluster().