openModeller
Version 1.4.0
|
#include <csmbs.hh>
Public Member Functions | |
CsmBS () | |
~CsmBS () | |
int | initialize () |
Protected Member Functions | |
gsl_matrix * | createRandomMatrix (int size1, int size2) |
gsl_matrix * | randomiseColumns (gsl_matrix *original_matrix) |
int | discardComponents () |
Protected Attributes | |
float | numberOfStdDevsFloat |
int | numberOfRandomisationsInt |
gsl_rng * | _randomNumberGenerator |
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.
gsl_matrix * CsmBS::createRandomMatrix | ( | int | size1, |
int | size2 | ||
) | [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().
int CsmBS::discardComponents | ( | ) | [protected, virtual] |
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().
int CsmBS::initialize | ( | ) | [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(), Log::instance(), Csm::minComponentsInt, numberOfRandomisationsInt, numberOfStdDevsFloat, Csm::verboseDebuggingBool, and Log::warn().
gsl_matrix * CsmBS::randomiseColumns | ( | gsl_matrix * | original_matrix | ) | [protected] |
shuffle / randomise the row ordering in each column ------------------------------------------------------------------------------------- e.g. before: e.g. after 33 | 56 | 88 | 12| 12 | 34 34 | 12 | 63 | 34 | 44 | 63 12 | 44 | 34 | 33 | 56 | 88 ------------------------------------------------------------------------------------- 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) This function reverses the order of the elements of the vector v. -------------------------------------------------------------------------------------
Definition at line 278 of file csmbs.cpp.
References createRandomMatrix().
Referenced by discardComponents().
gsl_rng* CsmBS::_randomNumberGenerator [protected] |
A gsl random number generator for creating randomness randomly...
Definition at line 97 of file csmbs.hh.
Referenced by createRandomMatrix(), CsmBS(), and ~CsmBS().
int CsmBS::numberOfRandomisationsInt [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().
float CsmBS::numberOfStdDevsFloat [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().