openModeller  Version 1.4.0
CsmBS Class Reference

#include <csmbs.hh>

Inheritance diagram for CsmBS:
Collaboration diagram for CsmBS:

List of all members.

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

Detailed Description

CsmBS = Csm broken-stick cutoff for discarded components

Author:
Tim Sutton

Definition at line 42 of file csmbs.hh.


Constructor & Destructor Documentation

Constructor for Csm

Constructor for CsmBS

Parameters:
Sampleris class that will fetch environment variable values at each occurrence / locality

Definition at line 170 of file csmbs.cpp.

References Csm::_initialized, and _randomNumberGenerator.

This is the descructor for the Csm class

Definition at line 184 of file csmbs.cpp.

References _randomNumberGenerator.


Member Function Documentation

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.

Note:
This method must be called after center
Returns:
0 on error

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().

Here is the call graph for this function:

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).

Note:
This method is inherited from the Algorithm class
Returns:
0 on error

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


Member Data Documentation

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().

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().


The documentation for this class was generated from the following files: