TDataSeriesICA< Data > Class Template Reference

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

#include <mia/core/ica_template.hh>

Public Types

typedef CIndepCompAnalysis::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
 
std::vector< float > get_mixing_curve (unsigned 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 > >())
 
void set_approach (CIndepCompAnalysis::EApproach approach)
 
void set_max_iterations (int n)
 
void set_mixing_series (size_t index, const std::vector< float > &series)
 
 TDataSeriesICA (const CIndepCompAnalysisFactory &icatool, 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 61 of file ica_template.hh.

Member Typedef Documentation

◆ IndexSet

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

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

Definition at line 65 of file ica_template.hh.

◆ PData

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

a (shared) pointer to itself

Definition at line 68 of file ica_template.hh.

Constructor & Destructor Documentation

◆ TDataSeriesICA()

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

ICA initialization.

The contructor for an ICA

Parameters
icatooltool used for the ICA analysis
initializerdata set containing all the time steps of input data
strip_meanstrip the mean from the series before processing

◆ ~TDataSeriesICA()

template<class Data >
TDataSeriesICA< Data >::~TDataSeriesICA ( )

Member Function Documentation

◆ get_delta_feature()

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

◆ get_feature_image()

template<class Data >
PData TDataSeriesICA< Data >::get_feature_image ( size_t  idx) const
Returns
the feature data relating to component idx

◆ get_incomplete_mix()

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

◆ get_mean_image()

template<class Data >
const Data& TDataSeriesICA< Data >::get_mean_image ( ) const
Returns
the mean of the input data

◆ get_mix()

template<class Data >
Data TDataSeriesICA< Data >::get_mix ( size_t  idx) const
Returns
the mixed signal at index idx

◆ get_mixing_curve()

template<class Data >
std::vector<float> TDataSeriesICA< Data >::get_mixing_curve ( unsigned  idx) const

Obtain a specific mixing curve

Parameters
idxindex of requested curve, throws invalid_argument if index is out of bounds
Returns
a mixing curve

◆ get_mixing_curves()

template<class Data >
CSlopeColumns TDataSeriesICA< Data >::get_mixing_curves ( ) const
Returns
the mixing curves as vector of vectors

◆ get_partial_mix()

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

◆ normalize()

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.

◆ normalize_Mix()

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

Normalizes the Mixing Matrix columns to have zero mean.

◆ run()

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)

◆ set_approach()

template<class Data >
void TDataSeriesICA< Data >::set_approach ( CIndepCompAnalysis::EApproach  approach)

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

Parameters
approach

◆ set_max_iterations()

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

sets the number of iterations in the ICA

Parameters
n

◆ set_mixing_series()

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: