-
Notifications
You must be signed in to change notification settings - Fork 0
Module overview
The GHRG module provides the model structure and interface for all the functions related to the model. A user should be able import the GHRG module alone and have access to the full functionality.
This also means other functions should not import GHRG or GHRGmodel.
Separate modules are used for specialised functions, e.g. inference, sampling (Reason: readability/re-usability?). This also means that we can change internally how these functions operate (e.g. to improve performance) without changing the main interface. Hopefully this helps with backward compatibility, since changes inside GHRG indicate a change in operation/functionality, while those outside of GHRG are "safe[er]".
GHRGmodel.py
- The GHRG class
- internal construction of the GHRG object
- inference of parameters (call to external function)
- generation of networks (call to external function)
GHRGbuild.py (or something similar)
- specific GHRG constructors (e.g. 2 parameter version, flat version (SBM), general Omega)
- calculateDegreesFrom methods
sample_networks.py
- functions for generating networks from an SBM-type model
inference.py
- inference functions -- given an adjacency matrix infer and return a GHRG object Possibly this module is redundant since there may be only one or two functions that we need here (check!) and seems to be mainly about constructing an instance of a GHRG, perhaps we can include within the GHRG class?? Alternatively, the inference functions could take a GHRG object as an argument. Then the GHRG can call these functions by passing an instance of self. Also means we no longer need to import GHRGmodel here.
I think inference should be a function the GHRG object. As in: construct GHRG object, then call GHRG.fitHier(A) or GHRG.fitSBM(A)
spectral_algorithms.py
- construction of various linear operators
- algorithms for spectral decomposition
- clustering methods
[final_experiments].py module to store all the useful experiments
metrics.py
- performance measures
partialpooling.py
Deprecated. May be of use later on? Let's keep it temporary and then do a cleanup later (we can always revive the file at a later stage no matter what).