CICAAnalysisITPP Class Reference

class for ICA analysis and use of such data. This class implements basic operations for of ICA. It makes use of the ITPP implementation of FastICA. More...

#include <mia/core/ica.hh>

Inherits CICAAnalysis.

Public Types

typedef CICAAnalysis::IndexSet IndexSet
 
typedef itpp::Vec< itpp::mat::value_type > itppvector
 The type of a vector as used by IT++. More...
 

Public Member Functions

 CICAAnalysisITPP (const itpp::mat &ic, const itpp::mat &mix, const std::vector< double > &mean)
 
 CICAAnalysisITPP ()
 
std::vector< float > get_delta_feature (const IndexSet &plus, const IndexSet &minus) const
 
std::vector< float > get_feature_row (unsigned int row) const
 
std::vector< float > get_incomplete_mix (unsigned int idx, const IndexSet &skip) const
 
std::vector< float > get_mix (unsigned int idx) const
 
std::vector< float > get_mix_series (unsigned int row) const
 
CSlopeColumns get_mixing_curves () const
 
unsigned int get_ncomponents () const
 
std::vector< float > get_partial_mix (unsigned int idx, const IndexSet &use) const
 
void initialize (unsigned int series_length, unsigned int slice_size)
 
void normalize_ICs ()
 
std::vector< float > normalize_Mix ()
 
bool run (unsigned int nica, std::vector< std::vector< float > > guess)
 
void set_approach (EApproach approach)
 
void set_max_iterations (int n)
 
void set_mixing_series (unsigned int index, const std::vector< float > &series)
 
 ~CICAAnalysisITPP ()
 

Detailed Description

class for ICA analysis and use of such data. This class implements basic operations for of ICA. It makes use of the ITPP implementation of FastICA.

Definition at line 44 of file core/ica.hh.

Member Typedef Documentation

§ IndexSet

typedef CICAAnalysis::IndexSet CICAAnalysisITPP::IndexSet

Definition at line 46 of file core/ica.hh.

§ itppvector

typedef itpp::Vec<itpp::mat::value_type> CICAAnalysisITPP::itppvector

The type of a vector as used by IT++.

Definition at line 50 of file core/ica.hh.

Constructor & Destructor Documentation

§ CICAAnalysisITPP() [1/2]

CICAAnalysisITPP::CICAAnalysisITPP ( const itpp::mat &  ic,
const itpp::mat &  mix,
const std::vector< double > &  mean 
)

Initialize an ICA based of predefined data - this is only used for test cases.

§ CICAAnalysisITPP() [2/2]

CICAAnalysisITPP::CICAAnalysisITPP ( )

§ ~CICAAnalysisITPP()

CICAAnalysisITPP::~CICAAnalysisITPP ( )

Member Function Documentation

§ get_delta_feature()

std::vector<float> CICAAnalysisITPP::get_delta_feature ( const IndexSet plus,
const IndexSet minus 
) const

Evaluate a mix of the feature signals by adding and subtractig individual features.

Parameters
plusfeatures o be added
minusfeatures to be subtracted
Returns
the feature mix

§ get_feature_row()

std::vector<float> CICAAnalysisITPP::get_feature_row ( unsigned int  row) const
Returns
the feature vector of row

§ get_incomplete_mix()

std::vector<float> CICAAnalysisITPP::get_incomplete_mix ( unsigned int  idx,
const IndexSet skip 
) const

Evaluate an incomplete mixed signal. Here the features are given that are not to be used.

See also
get_partial_mix
Parameters
idxseries index
skipa set of feature indices that will be skipped when evaluating the mix
Returns
the mixed signal

§ get_mix()

std::vector<float> CICAAnalysisITPP::get_mix ( unsigned int  idx) const
Returns
the complete mixed signal at series index idx

§ get_mix_series()

std::vector<float> CICAAnalysisITPP::get_mix_series ( unsigned int  row) const
Returns
the mixing signal curve of the feature row

§ get_mixing_curves()

CSlopeColumns CICAAnalysisITPP::get_mixing_curves ( ) const
Returns
a vector containing all mixing curves

§ get_ncomponents()

unsigned int CICAAnalysisITPP::get_ncomponents ( ) const
Returns
the number of actual ICs

§ get_partial_mix()

std::vector<float> CICAAnalysisITPP::get_partial_mix ( unsigned int  idx,
const IndexSet use 
) const

Evaluate an incomplete mixed signal. Here the features are given that are used to create the mix.

See also
get_incomplete_mix
Parameters
idxseries index
usethe set of feature indices that will be used to evaluate the mix
Returns
an incolmplete mixed signal.

§ initialize()

void CICAAnalysisITPP::initialize ( unsigned int  series_length,
unsigned int  slice_size 
)

Initialize the ICA

Parameters
series_lengthnumber of data sets that will be provided
slice_sizenumber of elements each set containes

§ normalize_ICs()

void CICAAnalysisITPP::normalize_ICs ( )

Normalize the ICs in the following manner: Scale and shift the range of the ICs to [-1, 1] Scale the mixing curved to compensate for the required scaling move the means of the time points to compensate for the shifting.

§ normalize_Mix()

std::vector<float> CICAAnalysisITPP::normalize_Mix ( )

Normalize the mixing curves to have a zero mean. As a result a mean image is created that containes the sum of the ICs weighted by the required mean shift.

§ run()

bool CICAAnalysisITPP::run ( unsigned int  nica,
std::vector< std::vector< float > >  guess 
)

Run the independed component analysis using the given numbers of components

Parameters
nicanumber of indentepended components
guessinitial guess for the ICA, pass an empty vector of you don't want to use this feature

§ set_approach()

void CICAAnalysisITPP::set_approach ( EApproach  approach)

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

Parameters
approach

§ set_max_iterations()

void CICAAnalysisITPP::set_max_iterations ( int  n)

sets the number of iterations in the ICA

Parameters
n

§ set_mixing_series()

void CICAAnalysisITPP::set_mixing_series ( unsigned int  index,
const std::vector< float > &  series 
)

Replace a mixing signal curve

Parameters
indexof the curve to be replaced
seriesnew data for mixing curve

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