caches an group of posterior states in a vector and provides member functions to characterize the posterior from this distribution and produce statistical diagnostics on the convergence of the simulation.
|
| int | count |
| | State variables and vectors.
|
|
int | offset |
| | Offset of current count list from zero.
|
|
int | burnIn |
| | Offset at convergence.
|
|
int | cur_index |
| | The current index in the cache.
|
|
int | ibeg |
| | Currently unused (remove?).
|
|
int | clev |
| | Level on creation.
|
|
vector< double > | ccum |
| | Fraction of states in each subspace.
|
|
vector< pair< double, int > > | fraction |
| | For sampling.
|
|
deque< StateData > | states |
| | State cache.
|
|
Uniform * | unit |
| | Uniform random number generator.
|
|
DiscreteUniform * | disc |
| | Discrete uniform random number generator.
|
|
bool | dimensions_set |
| | True if the ensemble has had its mixture cardinality and model dimension set somehow (either in the constructor or by the member function).
|
|
bool | verbose |
| | Verbose output.
|
|
int | _id |
| | Local instance number.
|
|
static int | instance |
| | Count instances.
|
| static int | keep |
| | Global variables.
|
|
static double | thresh |
| | Principal component threshold (default=1.0e-12).
|
| static bool | continuous |
| | For variable component mixtures, specify whether to determine the range of continuously adjacent non-zero components (continuous=true, default) or the minimum and maximum (allowing for the possibility of zero frequency component counts (continuous=false).
|
|
static int | key_pos |
| | Which element of parameter vector to be used as index key (default=0).
|
|
int | sampleSubspace () |
| | Sample from marginalized component number distribution.
|
|
void | makeSampleFraction (vector< int > &) |
| | Make fraction map for sampling.
|
ComputeDistribution |
| Computes the covariance matrix and its eigenvalues/vectors
Return = 1 (variance computed), Return = 0 (too few values)
|
|
class | boost::serialization::access |
|
virtual void | ComputeDistribution () |
| | Compute distribution estimate as needed.
|
|
virtual void | ComputeDistribution (int n) |
| virtual void | stats (int n, double &m, double &s) |
| | Returns the mean and variance for the posterior probabilties for the last $n$ states in the ensemble.
|
|
virtual int | Nstates () |
|
virtual double | PDFSubspace (int m) |
|
virtual double | logPDF (State &p) |
| | Log of differential distribution function.
|
| virtual double | logPDFMarginal (int m, int n, vector< double > &V) |
| | Log of differential distribution function for a component in subspace.
|
|
virtual Ensemble * | New () |
| | Object factory (clone).
|
|
virtual vector< double > | Mean (int m) |
| | Retrieve the mean per subspace.
|
|
virtual vector< double > | StdDev (int m) |
| | Retrieve the std dev per subspace.
|
|
virtual vector< double > | StdDev (void) |
| | Retrieve the std dev.
|
|
virtual vector< double > | Mean (void) |
| | Retrieve the mean.
|
|
virtual vector< double > | Sample (int m) |
| | Sample the distribution.
|
|
virtual vector< double > | Sample () |
| | Sample the distribution.
|
|
virtual vector< double > | Width (int m) |
| | Width.
|
|
virtual vector< double > | StdDevMarginal (int m, int n) |
| | Retrieve the std dev for the component marginal.
|
|
virtual vector< double > | MeanMarginal (int m, int n) |
| | Retrieve the mean for the component marginal.
|
|
virtual vector< double > | SampleMarginal (int m, int n) |
| | Sample the distribution for the component marginal.
|
|
virtual vector< double > | WidthMarginal (int m, int n) |
| | Width.
|
|
virtual void | PrintDiag (ostream &out) |
| | Print current covariance matrix (debug and diag).
|
|
virtual void | PrintDiag (string &outfile) |
|
virtual int | MinC () |
| | State with minimum number of components.
|
|
virtual int | MaxC () |
| | State with maximum number of components.
|
|
virtual void | Broadcast () |
| | Copy state to all nodes.
|
Public Member Functions |
|
| Ensemble () |
| | Constructor.
|
| | Ensemble (int nmix, int ndim) |
| | Mixture constructor.
|
| | Ensemble (int nmix, int ndim, int level, int nburn, string filename, int keypos) |
| | General constructor.
|
|
| Ensemble (const Ensemble &) |
| | Copy constructor.
|
|
| ~Ensemble () |
| | Destructor.
|
|
virtual void | Reset (int nmix, int ndim) |
| | Reinitialize the Ensemble.
|
|
virtual void | Reset (int nmix, int ndim, int level, int nburn, string filename, int keypos) |
| | Reinitialize the Ensemble.
|
|
virtual void | setDimensions (int nmix, int ndim) |
| | Set total size of arrays.
|
|
virtual void | setContinuous () |
| | Set multiple component range to continuous.
|
|
virtual void | setMaxRange () |
| | Set multiple component range to maximum range (allow zero freq. states).
|
|
virtual void | setNKeep (int n) |
| | Set the maximum number of states to keep in cache.
|
|
virtual void | Order (int n) |
| | Order the mixture by the given component n<0 is the weight n>=0 is the parameter vector index.
|
|
virtual void | setVerboseOn () |
| | Diagnostics for intermediate computation.
|
|
virtual void | setVerboseOff () |
| | Turn off intermediate computation diagnostics.
|
|
virtual bool | AccumData (double, State &) |
| | Adds a state to the deque.
|
|
virtual bool | AccumData (StateData &s) |
| | Adds a state to the deque (using StateData structure).
|
|
virtual bool | AccumulateData (double v, RecordBuffer *datapoint) |
| | Required member but not used here.
|
Protected Attributes |
|
int | M |
| | Number of components in the state.
|
|
vector< int > | cnts |
| | The number of states used in the distribution.
|
|
vector< int > | mcnt |
|
int | minc |
| | Mininum number of component states (from cnts).
|
|
int | maxc |
| | Mmaximum number of component states (from cnts).
|
|
int | N |
| | Dimension per component.
|
caches an group of posterior states in a vector and provides member functions to characterize the posterior from this distribution and produce statistical diagnostics on the convergence of the simulation.
The posterior state is characterized from the ensemble variance by a principal component analysis.