openModeller
Version 1.5.0
|
#include <csmbs.hh>
Public Member Functions | |
CsmBS () | |
~CsmBS () | |
int | initialize () |
Public Member Functions inherited from Csm | |
Csm (AlgMetadata const *metadata) | |
~Csm () | |
int | iterate () |
int | done () const |
Scalar | getValue (const Sample &x) const |
int | getConvergence (Scalar *const val) const |
Public Member Functions inherited from AlgorithmImpl | |
AlgorithmImpl (AlgMetadata const *metadata) | |
virtual | ~AlgorithmImpl () |
void | setParameters (int nparam, AlgParameter const *param) |
void | setParameters (const ParamSetType &) |
std::string const | getID () const |
AlgMetadata const * | getMetadata () const |
AlgorithmPtr | getFreshCopy () |
virtual int | supportsModelProjection () const |
Model | createModel (const SamplerPtr &samp, CallbackWrapper *func=0) |
void | setSampler (const SamplerPtr &samp) |
virtual int | finalize () |
virtual float | getProgress () const |
virtual int | needNormalization () |
Normalizer * | getNormalizer () const |
void | setNormalization (const SamplerPtr &samp) const |
void | setNormalization (const EnvironmentPtr &env) const |
virtual Model | getModel () const |
ConfigurationPtr | getConfiguration () const |
void | setConfiguration (const ConstConfigurationPtr &) |
Public Member Functions inherited from Configurable | |
virtual | ~Configurable () |
Protected Member Functions | |
gsl_matrix * | createRandomMatrix (int size1, int size2) |
gsl_matrix * | randomiseColumns (gsl_matrix *original_matrix) |
int | discardComponents () |
Protected Member Functions inherited from Csm | |
int | SamplerToMatrix () |
bool | csm1 () |
int | calculateMeanAndSd (gsl_matrix *theMatrix, gsl_vector *theMeanVector, gsl_vector *theStdDevVector) |
int | center () |
void | displayVector (const gsl_vector *v, const char *name, const bool roundFlag=true) const |
void | displayMatrix (const gsl_matrix *m, const char *name, const bool roundFlag=true) const |
gsl_matrix * | transpose (gsl_matrix *m) |
double | product (gsl_vector *va, gsl_vector *vb) const |
gsl_matrix * | product (gsl_matrix *a, gsl_matrix *b) const |
gsl_matrix * | autoCovariance (gsl_matrix *m) |
virtual void | _getConfiguration (ConfigurationPtr &config) const |
virtual void | _setConfiguration (const ConstConfigurationPtr &config) |
Protected Member Functions inherited from AlgorithmImpl | |
int | dimDomain () |
int | getParameter (std::string const &name, std::string *value) |
int | getParameter (std::string const &name, double *value) |
int | getParameter (std::string const &name, float *value) |
int | getParameter (std::string const &name, int *value) |
Protected Attributes | |
float | numberOfStdDevsFloat |
int | numberOfRandomisationsInt |
gsl_rng * | _randomNumberGenerator |
Protected Attributes inherited from Csm | |
int | _initialized |
int | _done |
gsl_matrix * | _gsl_environment_matrix |
gsl_matrix * | _gsl_covariance_matrix |
gsl_vector * | _gsl_avg_vector |
gsl_vector * | _gsl_stddev_vector |
gsl_vector * | _gsl_eigenvalue_vector |
gsl_matrix * | _gsl_eigenvector_matrix |
int | _layer_count |
int | _retained_components_count |
int | _localityCount |
int | minComponentsInt |
bool | verboseDebuggingBool |
Protected Attributes inherited from AlgorithmImpl | |
SamplerPtr | _samp |
Normalizer * | _normalizerPtr |
ParamSetType | _param |
Additional Inherited Members | |
Public Types inherited from AlgorithmImpl | |
typedef std::map< icstring, std::string > | ParamSetType |
CsmBS::CsmBS | ( | ) |
Constructor for Csm
Constructor for CsmBS
Sampler | is class that will fetch environment variable values at each occurrence / locality |
Definition at line 170 of file csmbs.cpp.
References Csm::_initialized, and _randomNumberGenerator.
CsmBS::~CsmBS | ( | ) |
This is the descructor for the Csm class
Definition at line 184 of file csmbs.cpp.
References _randomNumberGenerator.
|
protected |
generate a matrix populated with random numbers between 0 and 1
Definition at line 261 of file csmbs.cpp.
References _randomNumberGenerator.
Referenced by randomiseColumns().
|
protectedvirtual |
Discard unwanted components. This method uses the broken-stick cutoff.
Implements Csm.
Definition at line 318 of file csmbs.cpp.
References Csm::_gsl_eigenvalue_vector, Csm::_gsl_eigenvector_matrix, Csm::_gsl_environment_matrix, Csm::_layer_count, Csm::_retained_components_count, Csm::autoCovariance(), Csm::calculateMeanAndSd(), Log::debug(), Csm::displayMatrix(), Csm::displayVector(), Log::instance(), Csm::minComponentsInt, numberOfRandomisationsInt, numberOfStdDevsFloat, and randomiseColumns().
|
virtual |
Initialise the model specifying a threshold / cutoff point. Any model definition building stuff is done here. This is optional (model dependent).
Reimplemented from Csm.
Definition at line 190 of file csmbs.cpp.
References Log::debug(), AlgorithmImpl::getParameter(), Csm::initialize(), Log::instance(), Csm::minComponentsInt, numberOfRandomisationsInt, numberOfStdDevsFloat, Csm::verboseDebuggingBool, and Log::warn().
|
protected |
e.g. before: e.g. after 33 | 56 | 88 | 12| 12 | 34 34 | 12 | 63 | 34 | 44 | 63
Exchanging elements (GSL Documentation)
The following function can be used to exchange, or permute, the elements of a vector. Function: int gsl_vector_swap_elements (gsl_vector * v, size_t i, size_t j) This function exchanges the i-th and j-th elements of the vector v in-place. Function: int gsl_vector_reverse (gsl_vector * v)
Definition at line 278 of file csmbs.cpp.
References createRandomMatrix().
Referenced by discardComponents().
|
protected |
A gsl random number generator for creating randomness randomly...
Definition at line 97 of file csmbs.hh.
Referenced by createRandomMatrix(), CsmBS(), and ~CsmBS().
|
protected |
Increase this number to increase randomness of component selection eigen vector
Definition at line 95 of file csmbs.hh.
Referenced by discardComponents(), and initialize().
|
protected |
How many standard deviations should be added to the random derived eigenvalues when doing discard components
Definition at line 92 of file csmbs.hh.
Referenced by discardComponents(), and initialize().