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>
|
typedef std::set< size_t > | IndexSet |
| defines a set of indices used for mixing More...
|
|
typedef itpp::Vec
< itpp::mat::value_type > | itppvector |
| The type of a vector as used by IT++. More...
|
|
|
| CICAAnalysis (const itpp::mat &ic, const itpp::mat &mix, const std::vector< float > &mean) |
|
| CICAAnalysis (size_t series_length, size_t slice_size) |
|
std::vector< float > | get_delta_feature (const IndexSet &plus, const IndexSet &minus) const |
|
std::vector< float > | get_feature_row (size_t row) const |
|
std::vector< float > | get_incomplete_mix (size_t idx, const IndexSet &skip) const |
|
std::vector< float > | get_mix (size_t idx) const |
|
std::vector< float > | get_mix_series (size_t row) const |
|
CSlopeColumns | get_mixing_curves () const |
|
size_t | get_ncomponents () const |
|
std::vector< float > | get_partial_mix (size_t idx, const IndexSet &use) const |
|
void | normalize_ICs () |
|
std::vector< float > | normalize_Mix () |
|
bool | run (size_t nica, std::vector< std::vector< float > > guess) |
|
void | run_auto (int max_ica, int min_ica, float corr_thresh=0.9) |
|
void | set_approach (int approach) |
|
void | set_max_iterations (int n) |
|
void | set_mixing_series (size_t index, const std::vector< float > &series) |
|
template<class Iterator > |
void | set_row (size_t row, Iterator begin, Iterator end) |
|
| ~CICAAnalysis () |
|
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 41 of file core/ica.hh.
defines a set of indices used for mixing
Definition at line 63 of file core/ica.hh.
The type of a vector as used by IT++.
Definition at line 45 of file core/ica.hh.
CICAAnalysis::CICAAnalysis |
( |
const itpp::mat & |
ic, |
|
|
const itpp::mat & |
mix, |
|
|
const std::vector< float > & |
mean |
|
) |
| |
Initialize an ICA based of predefined data - this is unly used for test cases.
CICAAnalysis::CICAAnalysis |
( |
size_t |
series_length, |
|
|
size_t |
slice_size |
|
) |
| |
Main constructor of the ICA, i.e. you want to use this.
- Parameters
-
series_length | number of data sets that will be provided |
slice_size | number of elements each set containes |
CICAAnalysis::~CICAAnalysis |
( |
) | |
|
std::vector<float> CICAAnalysis::get_delta_feature |
( |
const IndexSet & |
plus, |
|
|
const IndexSet & |
minus |
|
) |
| const |
Evaluate a mix of the feature signals by adding and subtractig individual features.
- Parameters
-
plus | features o be added |
minus | features to be subtracted |
- Returns
- the feature mix
std::vector<float> CICAAnalysis::get_feature_row |
( |
size_t |
row) | |
const |
- Returns
- the feature vector of row
std::vector<float> CICAAnalysis::get_incomplete_mix |
( |
size_t |
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
-
idx | series index |
skip | a set of feature indices that will be skipped when evaluating the mix |
- Returns
- the mixed signal
std::vector<float> CICAAnalysis::get_mix |
( |
size_t |
idx) | |
const |
- Returns
- the complete mixed signal at series index idx
std::vector<float> CICAAnalysis::get_mix_series |
( |
size_t |
row) | |
const |
- Returns
- the mixing signal curve of the feature row
- Returns
- a vector containing all mixing curves
size_t CICAAnalysis::get_ncomponents |
( |
) | |
const |
- Returns
- the number of actual ICs
std::vector<float> CICAAnalysis::get_partial_mix |
( |
size_t |
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
-
idx | series index |
use | the set of feature indices that will be used to evaluate the mix |
- Returns
- an incolmplete mixed signal.
void CICAAnalysis::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.
std::vector<float> CICAAnalysis::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.
bool CICAAnalysis::run |
( |
size_t |
nica, |
|
|
std::vector< std::vector< float > > |
guess |
|
) |
| |
Run the independed component analysis using the given numbers of components
- Parameters
-
nica | number of indentepended components |
guess | initial guess for the ICA, pass an empty vector of you don't want to use this feature |
void CICAAnalysis::run_auto |
( |
int |
max_ica, |
|
|
int |
min_ica, |
|
|
float |
corr_thresh = 0.9 |
|
) |
| |
Run the independed component analysis with an estimation of the optimal number of components. (experimental)
- Parameters
-
max_ica | maximum number of independend components |
min_ica | minimum number of independend components |
corr_thresh | minimum absolute correation of the mixing signals to joins two components |
void CICAAnalysis::set_approach |
( |
int |
approach) | |
|
Set the ICA approach to either FICA_APPROACH_DEFL(default) or FICA_APPROACH_SYMM.
- Parameters
-
void CICAAnalysis::set_max_iterations |
( |
int |
n) | |
|
sets the number of iterations in the ICA
- Parameters
-
void CICAAnalysis::set_mixing_series |
( |
size_t |
index, |
|
|
const std::vector< float > & |
series |
|
) |
| |
Replace a mixing signal curve
- Parameters
-
index | of the curve to be replaced |
series | new data for mixing curve |
template<class Iterator >
void CICAAnalysis::set_row |
( |
size_t |
row, |
|
|
Iterator |
begin, |
|
|
Iterator |
end |
|
) |
| |
Set on row of input data
- Template Parameters
-
Iterator | input data iterator, must follow the model of a forward iterator |
- Parameters
-
row | index of the input slice |
begin | start iterator of input data |
end | end iterator of input data |
The documentation for this class was generated from the following file: