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 () | |
Templated representation of a ICA series analyis.
This class provides a generic implementation for the ICA analysis of data series.
Data | some kind of data set ofwhich series are analyzed The class Data must somehow provide:
|
Definition at line 61 of file ica_template.hh.
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.
typedef Data::Pointer TDataSeriesICA< Data >::PData |
a (shared) pointer to itself
Definition at line 68 of file ica_template.hh.
TDataSeriesICA< Data >::TDataSeriesICA | ( | const CIndepCompAnalysisFactory & | icatool, |
const std::vector< Data > & | initializer, | ||
bool | strip_mean | ||
) |
ICA initialization.
The contructor for an ICA
icatool | tool used for the ICA analysis |
initializer | data set containing all the time steps of input data |
strip_mean | strip the mean from the series before processing |
TDataSeriesICA< Data >::~TDataSeriesICA | ( | ) |
PData TDataSeriesICA< Data >::get_delta_feature | ( | const IndexSet & | plus, |
const IndexSet & | minus | ||
) | const |
Evaluate a mix as sum and difference of ICs
plus | add these ICs |
minus | subtract these ICs |
PData TDataSeriesICA< Data >::get_feature_image | ( | size_t | idx | ) | const |
Data TDataSeriesICA< Data >::get_incomplete_mix | ( | size_t | idx, |
const IndexSet & | skip | ||
) | const |
Evaluate a partial mix of the ICs
idx | time indes |
skip | set of components to skip when mixing |
const Data& TDataSeriesICA< Data >::get_mean_image | ( | ) | const |
Data TDataSeriesICA< Data >::get_mix | ( | size_t | idx | ) | const |
std::vector<float> TDataSeriesICA< Data >::get_mixing_curve | ( | unsigned | idx | ) | const |
Obtain a specific mixing curve
idx | index of requested curve, throws invalid_argument if index is out of bounds |
CSlopeColumns TDataSeriesICA< Data >::get_mixing_curves | ( | ) | const |
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
idx | time indes |
comps | set of components to use when mixing |
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.
void TDataSeriesICA< Data >::normalize_Mix | ( | ) |
Normalizes the Mixing Matrix columns to have zero mean.
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
ncomponents | retained components |
strip_mean | strip the mean from the input |
ica_normalize | normalize the ICA after processing |
guess | provide an initial guess (leave empty, if not wanted) |
void TDataSeriesICA< Data >::set_approach | ( | CIndepCompAnalysis::EApproach | approach | ) |
Set the ICA approach to either FICA_APPROACH_DEFL(default) or FICA_APPROACH_SYMM.
approach |
void TDataSeriesICA< Data >::set_max_iterations | ( | int | n | ) |
sets the number of iterations in the ICA
n |
void TDataSeriesICA< Data >::set_mixing_series | ( | size_t | index, |
const std::vector< float > & | series | ||
) |
replace a mixing series by a new set
index | component number of the mixing curve to be replaced |
series | new mixing data |