Public Types | Public Member Functions
TDataSeriesICA< Data > Class Template Reference

Templated representation of a ICA series analyis. More...

#include <mia/core/ica_template.hh>

Public Types

typedef CICAAnalysis::IndexSet IndexSet
 
typedef Data::Pointer PData
 

Public Member Functions

PData get_delta_feature (const IndexSet &plus, const IndexSet &minus) const
 
PData get_feature_image (size_t idx) const
 
Data get_incomplete_mix (size_t idx, const IndexSet &skip) const
 
const Data & get_mean_image () const
 
Data get_mix (size_t idx) const
 
CSlopeColumns get_mixing_curves () const
 
Data get_partial_mix (size_t idx, const IndexSet &comps) const
 
void normalize ()
 
void normalize_Mix ()
 Normalizes the Mixing Matrix columns to have zero mean. More...
 
bool run (size_t ncomponents, bool strip_mean, bool ica_normalize, std::vector< std::vector< float > > guess=std::vector< std::vector< float > >())
 
size_t run_auto (int max_ica, int min_ica, float corr_thresh)
 
void set_approach (int approach)
 
void set_max_iterations (int n)
 
void set_mixing_series (size_t index, const std::vector< float > &series)
 
 TDataSeriesICA (const std::vector< Data > &initializer, bool strip_mean)
 ICA initialization. More...
 
 ~TDataSeriesICA ()
 

Detailed Description

template<class Data>
class TDataSeriesICA< Data >

Templated representation of a ICA series analyis.

This class provides a generic implementation for the ICA analysis of data series.

Template Parameters
Datasome kind of data set ofwhich series are analyzed The class Data must somehow provide:
  • a typedef Pointer for a pointer like representation of itself or on of its base classes (preferable based on boost::shared_ptr)
  • a typedef dimsize_type for its the size seperated into dimensions
  • a method get_size() that returns dimsize_type
  • a method size() that returns the number of elements hold by itself
  • STL comaptible const and non-const iterators returned by functions named begin() and end()

Definition at line 60 of file ica_template.hh.

Member Typedef Documentation

template<class Data >
typedef CICAAnalysis::IndexSet TDataSeriesICA< Data >::IndexSet

a set of indices used for addressing a subset of the independend componsts

Definition at line 64 of file ica_template.hh.

template<class Data >
typedef Data::Pointer TDataSeriesICA< Data >::PData

a (shared) pointer to itself

Definition at line 67 of file ica_template.hh.

Constructor & Destructor Documentation

template<class Data >
TDataSeriesICA< Data >::TDataSeriesICA ( const std::vector< Data > &  initializer,
bool  strip_mean 
)

ICA initialization.

The contructor for an ICA

Parameters
initializerdata set containing all the time steps of input data
strip_meanstrip the mean from the series before processing
template<class Data >
TDataSeriesICA< Data >::~TDataSeriesICA ( )

Member Function Documentation

template<class Data >
PData TDataSeriesICA< Data >::get_delta_feature ( const IndexSet plus,
const IndexSet minus 
) const

Evaluate a mix as sum and difference of ICs

Parameters
plusadd these ICs
minussubtract these ICs
Returns
the combined signal
template<class Data >
PData TDataSeriesICA< Data >::get_feature_image ( size_t  idx) const
Returns
the feature data relating to component idx
template<class Data >
Data TDataSeriesICA< Data >::get_incomplete_mix ( size_t  idx,
const IndexSet skip 
) const

Evaluate a partial mix of the ICs

Parameters
idxtime indes
skipset of components to skip when mixing
Returns
the mixed data
template<class Data >
const Data& TDataSeriesICA< Data >::get_mean_image ( ) const
Returns
the mean of the input data
template<class Data >
Data TDataSeriesICA< Data >::get_mix ( size_t  idx) const
Returns
the mixed signal at index idx
template<class Data >
CSlopeColumns TDataSeriesICA< Data >::get_mixing_curves ( ) const
Returns
the mixing curves as vector of vectors
template<class Data >
Data TDataSeriesICA< Data >::get_partial_mix ( size_t  idx,
const IndexSet comps 
) const

Evaluate a partial mix of the ICs by using the given indes set

Parameters
idxtime indes
compsset of components to use when mixing
Returns
the mixed data
template<class Data >
void TDataSeriesICA< Data >::normalize ( )

Normalizes the ICs to the range of [-1,1] and correct the mixing matrix accordingly. This operation does not change the output of a mix.

template<class Data >
void TDataSeriesICA< Data >::normalize_Mix ( )

Normalizes the Mixing Matrix columns to have zero mean.

template<class Data >
bool TDataSeriesICA< Data >::run ( size_t  ncomponents,
bool  strip_mean,
bool  ica_normalize,
std::vector< std::vector< float > >  guess = std::vector< std::vector< float > >() 
)

Runs the ICA

Parameters
ncomponentsretained components
strip_meanstrip the mean from the input
ica_normalizenormalize the ICA after processing
guessprovide an initial guess (leave empty, if not wanted)
template<class Data >
size_t TDataSeriesICA< Data >::run_auto ( int  max_ica,
int  min_ica,
float  corr_thresh 
)

Run the independed component analysis with an estimation of the optimal number of components based on mixing curve correlation (experimental)

Parameters
max_icamaximum number of independend components
min_icaminimum number of independend components
corr_threshminimum absolute correation of the mixing signals to joins two components
Returns
number of obtained independend components
template<class Data >
void TDataSeriesICA< Data >::set_approach ( int  approach)

Set the ICA approach to either FICA_APPROACH_DEFL(default) or FICA_APPROACH_SYMM.

Parameters
approach
template<class Data >
void TDataSeriesICA< Data >::set_max_iterations ( int  n)

sets the number of iterations in the ICA

Parameters
n
template<class Data >
void TDataSeriesICA< Data >::set_mixing_series ( size_t  index,
const std::vector< float > &  series 
)

replace a mixing series by a new set

Parameters
indexcomponent number of the mixing curve to be replaced
seriesnew mixing data

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