#include <PCA.hpp>
|
| | PCA (int nvar=0) |
| |
| | PCA (const Db *db, bool verbose=false) |
| |
| | PCA (Db *db, double h0, double dh, const DirParam &dirparam=DirParam(), bool verbose=false) |
| |
| | PCA (const PCA &m) |
| |
| PCA & | operator= (const PCA &m) |
| |
| virtual | ~PCA () |
| |
| virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
| | Interface for AStringable. More...
|
| |
| void | init (int nvar) |
| |
| const VectorDouble & | getEigens () const |
| |
| double | getEigen (int ivar) const |
| |
| VectorDouble | getVarianceRatio () const |
| |
| const VectorDouble & | getMeans () const |
| |
| double | getMean (int ivar) const |
| |
| int | getNVar () const |
| |
| const VectorDouble & | getF2Z () const |
| |
| double | getF2Z (int ivar, int jvar) const |
| |
| const VectorDouble & | getZ2F () const |
| |
| double | getZ2F (int ivar, int jvar) const |
| |
| const VectorDouble & | getSigmas () const |
| |
| double | getSigma (int ivar) const |
| |
| void | setPcaZ2F (const VectorDouble &pcaz2f) |
| |
| void | setPcaZ2F (int ivar, int jvar, double pcaz2f) |
| |
| void | setPcaF2Z (VectorDouble &pcaf2z) |
| |
| void | setEigen (VectorDouble &eigen) |
| |
| void | setEigen (int ivar, double eigen) |
| |
| void | setMean (const VectorDouble &mean) |
| |
| void | setSigma (const VectorDouble &sigma) |
| |
| int | pca_compute (const Db *db, bool verbose=false) |
| |
| int | maf_compute (Db *db, double h0, double dh, const DirParam &dirparam, bool verbose=false) |
| |
| int | dbZ2F (Db *db, bool verbose=false, const NamingConvention &namconv=NamingConvention("Z2F")) |
| |
| int | dbF2Z (Db *db, bool verbose=false, const NamingConvention &namconv=NamingConvention("F2Z")) |
| |
| VectorDouble | mafOfIndex () const |
| |
| | AStringable () |
| |
| | AStringable (const AStringable &r) |
| |
| AStringable & | operator= (const AStringable &r) |
| |
| virtual | ~AStringable () |
| |
| virtual void | display (const AStringFormat *strfmt=nullptr) const final |
| |
| virtual void | display (int level) const final |
| |
|
| int | _getAddress (int ivar, int jvar) const |
| |
| VectorBool | _getVectorIsotopic (const Db *db) |
| |
| void | _loadData (const Db *db, int iech, VectorDouble &data) |
| |
| int | _calculateEigen (VectorDouble &c0) |
| |
| int | _pcaCalculate (const Db *db, const VectorBool &isoFlag, bool verbose) |
| |
| int | _normalization (const Db *db, const VectorBool &isoFlag, VectorDouble &mean, VectorDouble &sigma, bool verbose=false, bool flag_nm1=false) |
| |
| void | _covariance0 (const Db *db, const VectorBool &isoFlag, const VectorDouble &mean, const VectorDouble &sigma, VectorDouble &c0, bool verbose=false, bool flag_nm1=false) |
| |
| int | _covarianceh (Db *db, double h0, double dh, const DirParam &dirparam, const VectorBool &isoFlag, VectorDouble &ch, bool verbose=false) |
| |
| void | _center (VectorDouble &data, const VectorDouble &mean, const VectorDouble &sigma, bool flag_center=true, bool flag_scale=false) |
| |
| void | _uncenter (VectorDouble &data, const VectorDouble &mean, const VectorDouble &sigma, bool flag_center=true, bool flag_scale=false) |
| |
| void | _pcaZ2F (int iptr, Db *db, const VectorBool isoFlag, const VectorDouble &mean, const VectorDouble &sigma) |
| |
| void | _pcaF2Z (int iptr, Db *db, const VectorBool &isoFlag, const VectorDouble &mean, const VectorDouble &sigma) |
| |
◆ PCA() [1/4]
◆ PCA() [2/4]
| PCA::PCA |
( |
const Db * |
db, |
|
|
bool |
verbose = false |
|
) |
| |
◆ PCA() [3/4]
| PCA::PCA |
( |
Db * |
db, |
|
|
double |
h0, |
|
|
double |
dh, |
|
|
const DirParam & |
dirparam = DirParam(), |
|
|
bool |
verbose = false |
|
) |
| |
◆ PCA() [4/4]
| PCA::PCA |
( |
const PCA & |
m | ) |
|
◆ ~PCA()
◆ _calculateEigen()
◆ _center()
Normalize the isotropic array of values
- Parameters
-
| [in,out] | data | Array of information |
| [in] | mean | Array containing the mean |
| [in] | sigma | Array containing the standard deviation |
| [in] | flag_center | True if result must be centered by 'mean' |
| [in] | flag_scale | True if result must be scaled by 'sigma' |
◆ _covariance0()
Internal PCA covariance calculation
- Parameters
-
| [in] | db | Db descriptor |
| [in] | isoFlag | Vector of active samples |
| [in] | mean | Array containing the mean |
| [in] | sigma | Array containing the standard deviation |
| [in] | verbose | Verbose flag |
| [in] | flag_nm1 | When TRUE, variance is scaled by N-1; otherwise by N |
| [out] | c0 | Vector of covariances at distance 0 |
◆ _covarianceh()
Internal PCA translated covariance calculation
Error returned case
- Parameters
-
| [in] | db | Db descriptor |
| [in] | h0 | Reference distance |
| [in] | dh | Tolerance on distance |
| [in] | dirparam | DirParam structure |
| [in] | isoFlag | Vector of active samples |
| [in] | verbose | Verbose flag |
| [out] | ch | Vector of covariances at distance h |
◆ _getAddress()
| int PCA::_getAddress |
( |
int |
ivar, |
|
|
int |
jvar |
|
) |
| const |
|
inlineprivate |
◆ _getVectorIsotopic()
◆ _loadData()
◆ _normalization()
Fill the mean and variance arrays
- Parameters
-
| [in] | db | Db descriptor |
| [in] | isoFlag | Vector of active samples |
| [in] | verbose | Verbose flag |
| [in] | flag_nm1 | When TRUE, variance is scaled by N-1; otherwise by N |
| [out] | mean | Array of means |
| [out] | sigma | Array of standard deviations |
◆ _pcaCalculate()
| int PCA::_pcaCalculate |
( |
const Db * |
db, |
|
|
const VectorBool & |
isoFlag, |
|
|
bool |
verbose |
|
) |
| |
|
private |
Internal function to calculate MAF
- Returns
- Error return code
- Parameters
-
| [in] | db | Db descriptor |
| [in] | isoFlag | Vector of active samples |
| [in] | verbose | Verbose flag |
◆ _pcaF2Z()
Procedure for transforming the factors into variables using PCA
- Parameters
-
| [in] | iptr | Pointer to the storage |
| [in] | db | Db descriptor |
| [in] | isoFlag | Vector of active samples |
| [in] | mean | Array containing the mean |
| [in] | sigma | Array containing the standard deviation |
◆ _pcaZ2F()
Procedure for transforming the variables into factors using PCA
- Parameters
-
| [in] | iptr | Pointer for storing the result in db |
| [in] | db | Db descriptor |
| [in] | isoFlag | Vector of active samples |
| [in] | mean | Array containing the mean |
| [in] | sigma | Array containing the standard deviation |
◆ _uncenter()
Un-normalize the isotropic array of values
- Parameters
-
| [in,out] | data | Array of information |
| [in] | mean | Array containing the mean |
| [in] | sigma | Array containing the standard deviation |
| [in] | flag_center | True if result must be uncentered by 'mean' |
| [in] | flag_scale | True if result must be suncaled by 'sigma' |
◆ dbF2Z()
◆ dbZ2F()
◆ getEigen()
| double PCA::getEigen |
( |
int |
ivar | ) |
const |
|
inline |
◆ getEigens()
◆ getF2Z() [1/2]
◆ getF2Z() [2/2]
| double PCA::getF2Z |
( |
int |
ivar, |
|
|
int |
jvar |
|
) |
| const |
|
inline |
◆ getMean()
| double PCA::getMean |
( |
int |
ivar | ) |
const |
|
inline |
◆ getMeans()
◆ getNVar()
| int PCA::getNVar |
( |
| ) |
const |
|
inline |
◆ getSigma()
| double PCA::getSigma |
( |
int |
ivar | ) |
const |
|
inline |
◆ getSigmas()
◆ getVarianceRatio()
◆ getZ2F() [1/2]
◆ getZ2F() [2/2]
| double PCA::getZ2F |
( |
int |
ivar, |
|
|
int |
jvar |
|
) |
| const |
|
inline |
◆ init()
| void PCA::init |
( |
int |
nvar | ) |
|
◆ maf_compute()
| int PCA::maf_compute |
( |
Db * |
db, |
|
|
double |
h0, |
|
|
double |
dh, |
|
|
const DirParam & |
dirparam, |
|
|
bool |
verbose = false |
|
) |
| |
Evaluate the MAF on irregular data
- Returns
- PCA structure (or nullptr)
- Parameters
-
| [in] | db | Db descriptor |
| [in] | dirparam | DirParam structure |
| [in] | h0 | Reference distance |
| [in] | dh | Tolerance on distance |
| [in] | verbose | Verbose flag |
◆ mafOfIndex()
◆ operator=()
| PCA & PCA::operator= |
( |
const PCA & |
m | ) |
|
◆ pca_compute()
| int PCA::pca_compute |
( |
const Db * |
db, |
|
|
bool |
verbose = false |
|
) |
| |
◆ setEigen() [1/2]
◆ setEigen() [2/2]
| void PCA::setEigen |
( |
int |
ivar, |
|
|
double |
eigen |
|
) |
| |
|
inline |
◆ setMean()
◆ setPcaF2Z()
◆ setPcaZ2F() [1/2]
◆ setPcaZ2F() [2/2]
| void PCA::setPcaZ2F |
( |
int |
ivar, |
|
|
int |
jvar, |
|
|
double |
pcaz2f |
|
) |
| |
|
inline |
◆ setSigma()
◆ toString()
◆ _eigen
◆ _F2Z
◆ _mean
◆ _nVar
◆ _sigma
◆ _Z2F
The documentation for this class was generated from the following files: