Functions to learn modes from subsets of data. More...
Go to the source code of this file.
Functions | |
| void | mcal_extract_mode (vcl_vector< vnl_vector< double > > &dv, const vcl_vector< unsigned > &elements_used, vnl_vector< double > &mode, double &var) |
Computes one mode from used elements of each dv. | |
| void | mcal_extract_mode (vcl_vector< vnl_vector< double > > &dv, vnl_vector< double > &mode, double &var) |
Computes one mode by applying PCA to dv. | |
| void | mcal_extract_modes (vcl_vector< vnl_vector< double > > &dv, const vcl_vector< vcl_vector< unsigned > > &elements_used, unsigned max_modes, double var_prop, vnl_matrix< double > &modes, vnl_vector< double > &mode_var) |
| Compute modes and associated variance of supplied data. | |
Functions to learn modes from subsets of data.
Definition in file mcal_extract_mode.h.
| void mcal_extract_mode | ( | vcl_vector< vnl_vector< double > > & | dv, |
| const vcl_vector< unsigned > & | used, | ||
| vnl_vector< double > & | mode, | ||
| double & | var | ||
| ) |
Computes one mode from used elements of each dv.
Compute a mode which only uses a subset of the elements, all other elements are set to zero. Effectives computes the first eigenvector of the covariance matrix formed from selecting the used elements of each dv[i], ie dv[i][used[j]]. Resulting vector is returned as a full length vector (the same size as dv[i]).
| dv | is assumed to be zero mean. |
The contribution of this vector is removed from each dv, dv[i]-=mode*b, where b=dv[i].mode
Effectives computes the first eigenvector of the covariance matrix formed from selecting the used elements of each dv[i], ie dv[i][used[j]]. Resulting vector is returned as a full length vector (the same size as dv[i]).
The contribution of this vector is removed from each dv, dv[i]-=mode*b, where b=dv[i].mode
Definition at line 22 of file mcal_extract_mode.cxx.
| void mcal_extract_mode | ( | vcl_vector< vnl_vector< double > > & | dv, |
| vnl_vector< double > & | mode, | ||
| double & | var | ||
| ) |
Computes one mode by applying PCA to dv.
Effectives computes the first eigenvector of the covariance matrix. The contribution of this vector is removed from each dv, dv[i]-=mode*b, where b=dv[i].mode
Definition at line 76 of file mcal_extract_mode.cxx.
| void mcal_extract_modes | ( | vcl_vector< vnl_vector< double > > & | dv, |
| const vcl_vector< vcl_vector< unsigned > > & | used, | ||
| unsigned | max_modes, | ||
| double | var_prop, | ||
| vnl_matrix< double > & | modes, | ||
| vnl_vector< double > & | mode_var | ||
| ) |
Compute modes and associated variance of supplied data.
| elements_used[i] | indicates the set of elements to be used for mode i. Modes beyond used.size() will use all elements. |
| used[i] | indicates the set of elements to be used for mode i. Modes beyond used.size() will use all elements. |
Definition at line 107 of file mcal_extract_mode.cxx.
1.7.5.1