GPLIB++
Classes | Functions
Statistical methods

Classes

class  gplib::ArraySampleGenerator
 Sequentially returns the elements of an array. More...
 
class  gplib::Bootstrap< SampleGenerator >
 Implementation of the Bootstrap error estimation method. More...
 
class  gplib::Jacknife< SampleGenerator >
 Implements the Jacknifing method of error estimation. More...
 
class  gplib::MTSampleGenerator
 Generate random elements of a calculated quantity for MT impedance data. More...
 
class  gplib::StatErrEst< SampleGenerator >
 This class is used as a base for stochastic error estimation. More...
 

Functions

template<typename UblasMatrix >
UblasMatrix gplib::Cov (const UblasMatrix &observations)
 Calculate the NxN covariance matrix for a NxM matrix of observations with 0 mean. More...
 
template<typename UblasMatrix >
void gplib::PCA (const UblasMatrix &observations, gplib::cmat &evectors, gplib::cvec &evalues)
 This template function calculates the principal component rotation matrix from a matrix of observations. More...
 
gplib::cmat gplib::WhiteMat (gplib::cmat &evectors, gplib::cvec &evalues)
 Calculate the Whitening Matrix. More...
 
gplib::cmat gplib::DeWhiteMat (gplib::cmat &evectors, gplib::cvec &evalues)
 Calculate the Dewhitening Matrix. More...
 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
gplib::Mean (InputIterator begin, InputIterator end)
 Calculate the mean for a given range. More...
 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
gplib::Variance (InputIterator begin, InputIterator end, typename std::iterator_traits< InputIterator >::value_type mv)
 Calculate the Variance and give the mean as a third input parameter. More...
 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
gplib::Variance (InputIterator begin, InputIterator end)
 Calculate the Variance for a given range when the mean is not known and has to be calculated as well. More...
 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
gplib::MeanErr (InputIterator begin, InputIterator end)
 Calculate the Mean Error for a given input range. More...
 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
gplib::MeanErr (InputIterator begin, InputIterator end, typename std::iterator_traits< InputIterator >::value_type mv)
 Calculate the Mean Error for a given input range when the mean is known and passed as a third parameter. More...
 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
gplib::StdDev (InputIterator begin, InputIterator end, typename std::iterator_traits< InputIterator >::value_type mv)
 Calculate the Standard deviation with a given mean. More...
 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
gplib::StdDev (InputIterator begin, InputIterator end)
 Calculate the Standard Deviation. More...
 
template<typename InputIterator >
void gplib::SubMean (InputIterator begin, InputIterator end, typename std::iterator_traits< InputIterator >::value_type mean)
 Substract the mean from each element in the container, mean is passed as a parameter. More...
 
template<typename InputIterator >
void gplib::SubMean (InputIterator begin, InputIterator end)
 Substract the mean from each element in the container, mean is calculated. More...
 
template<typename InputIterator >
std::iterator_traits
< InputIterator >::value_type 
gplib::Median (InputIterator begin, InputIterator end)
 Calculate the median for a vector style container. More...
 

Detailed Description

Function Documentation

template<typename UblasMatrix >
UblasMatrix gplib::Cov ( const UblasMatrix &  observations)

Calculate the NxN covariance matrix for a NxM matrix of observations with 0 mean.

Definition at line 14 of file Cov.h.

Referenced by gplib::PCA().

gplib::cmat gplib::DeWhiteMat ( gplib::cmat &  evectors,
gplib::cvec &  evalues 
)

Calculate the Dewhitening Matrix.

Given the complex matrix of eigenvectors evectors and the complex vector of eigenvalues as calculated by PCA, calculate the DeWhitening Matrix that reverses the effect of the Whitening Matrix and return it.

Definition at line 59 of file PCA.h.

Referenced by main().

template<typename InputIterator >
std::iterator_traits< InputIterator>::value_type gplib::Mean ( InputIterator  begin,
InputIterator  end 
)
inline

Calculate the mean for a given range.

/file This header contains some simple statistical routines. All all templates for widest possible use

Definition at line 21 of file statutils.h.

Referenced by gplib::GeneralGA::DoIteration(), main(), gplib::MeanErr(), gplib::StdDev(), gplib::SubMean(), and gplib::Variance().

template<typename InputIterator >
std::iterator_traits< InputIterator>::value_type gplib::MeanErr ( InputIterator  begin,
InputIterator  end 
)
inline

Calculate the Mean Error for a given input range.

Definition at line 50 of file statutils.h.

References gplib::Mean().

template<typename InputIterator >
std::iterator_traits< InputIterator>::value_type gplib::MeanErr ( InputIterator  begin,
InputIterator  end,
typename std::iterator_traits< InputIterator >::value_type  mv 
)
inline

Calculate the Mean Error for a given input range when the mean is known and passed as a third parameter.

Definition at line 58 of file statutils.h.

References gplib::Variance().

template<typename InputIterator >
std::iterator_traits< InputIterator>::value_type gplib::Median ( InputIterator  begin,
InputIterator  end 
)
inline

Calculate the median for a vector style container.

Definition at line 102 of file statutils.h.

Referenced by main().

template<typename UblasMatrix >
void gplib::PCA ( const UblasMatrix &  observations,
gplib::cmat &  evectors,
gplib::cvec &  evalues 
)

This template function calculates the principal component rotation matrix from a matrix of observations.

/file This file contains function connected to Principal Component Analysis

The input matrix observations has the different channels (or datasets) as rows and corresponding samples as columns the parameter pcatrans will contain the matrix of principal component vectors, at the moment in no particular order

Definition at line 25 of file PCA.h.

References gplib::Cov(), and gplib::SubMean().

Referenced by gplib::ComplexICA(), gplib::FastICA(), and main().

template<typename InputIterator >
std::iterator_traits< InputIterator>::value_type gplib::StdDev ( InputIterator  begin,
InputIterator  end,
typename std::iterator_traits< InputIterator >::value_type  mv 
)
inline

Calculate the Standard deviation with a given mean.

Definition at line 68 of file statutils.h.

References gplib::Variance().

Referenced by main(), and gplib::StdDev().

template<typename InputIterator >
std::iterator_traits< InputIterator>::value_type gplib::StdDev ( InputIterator  begin,
InputIterator  end 
)
inline

Calculate the Standard Deviation.

Definition at line 77 of file statutils.h.

References gplib::Mean(), and gplib::StdDev().

template<typename InputIterator >
void gplib::SubMean ( InputIterator  begin,
InputIterator  end,
typename std::iterator_traits< InputIterator >::value_type  mean 
)
inline

Substract the mean from each element in the container, mean is passed as a parameter.

Definition at line 85 of file statutils.h.

Referenced by gplib::PCA(), RemoveSpike(), gplib::ShortCorr(), gplib::StackedSpectrum(), gplib::SubMean(), and gplib::TimeFrequency().

template<typename InputIterator >
void gplib::SubMean ( InputIterator  begin,
InputIterator  end 
)
inline

Substract the mean from each element in the container, mean is calculated.

Definition at line 95 of file statutils.h.

References gplib::Mean(), and gplib::SubMean().

template<typename InputIterator >
std::iterator_traits< InputIterator>::value_type gplib::Variance ( InputIterator  begin,
InputIterator  end,
typename std::iterator_traits< InputIterator >::value_type  mv 
)
inline

Calculate the Variance and give the mean as a third input parameter.

Definition at line 30 of file statutils.h.

Referenced by gplib::MeanErr(), gplib::StdDev(), and gplib::Variance().

template<typename InputIterator >
std::iterator_traits< InputIterator>::value_type gplib::Variance ( InputIterator  begin,
InputIterator  end 
)
inline

Calculate the Variance for a given range when the mean is not known and has to be calculated as well.

Definition at line 42 of file statutils.h.

References gplib::Mean(), and gplib::Variance().

gplib::cmat gplib::WhiteMat ( gplib::cmat &  evectors,
gplib::cvec &  evalues 
)

Calculate the Whitening Matrix.

Given the complex matrix of eigenvectors evectors and the complex vector of eigenvalues as calculated by PCA, calculate the Whitening Matrix and return it

Definition at line 46 of file PCA.h.

Referenced by gplib::ComplexICA(), gplib::FastICA(), and main().