gstlearn
1.0.0
CCC
|
#include <PCA.hpp>
Public Member Functions | |
PCA (int nvar=0) | |
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 & | getEigVals () const |
double | getEigVal (int ivar) const |
const VectorDouble & | getEigVecs () const |
double | getEigVec (int ivar, int jvar) const |
VectorDouble | getVarianceRatio () const |
const VectorDouble & | getMeans () const |
double | getMean (int ivar) const |
int | getNVar () const |
const VectorDouble & | getF2Zs () const |
double | getF2Z (int ivar, int jvar) const |
const VectorDouble & | getZ2Fs () const |
double | getZ2F (int ivar, int jvar) const |
const VectorDouble & | getSigmas () const |
double | getSigma (int ivar) const |
void | setMeans (const VectorDouble &mean) |
void | setSigmas (const VectorDouble &sigma) |
void | setZ2Fs (const VectorDouble &z2f) |
void | setZ2F (int ivar, int jvar, double z2f) |
void | setF2Zs (VectorDouble &f2z) |
void | setF2Z (int ivar, int jvar, double f2z) |
void | setEigVals (VectorDouble &eigval) |
void | setEigVal (int ivar, double eigval) |
void | setEigVecs (const VectorDouble &eigvec) |
void | setEigVec (int ivar, int jvar, double eigvec) |
int | pca_compute (const Db *db, bool verbose=false) |
int | maf_compute (Db *db, const VarioParam &varioparam, int ilag0=1, int idir0=0, bool verbose=false) |
int | maf_compute_interval (Db *db, double hmin, double hmax, bool verbose=false) |
int | dbZ2F (Db *db, bool verbose=false, const NamingConvention &namconv=NamingConvention("F", false)) |
int | dbF2Z (Db *db, bool verbose=false, const NamingConvention &namconv=NamingConvention("Z", false)) |
VectorDouble | mafOfIndex () const |
Public Member Functions inherited from AStringable | |
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 |
Private Member Functions | |
int | _getAddress (int ivar, int jvar) const |
VectorBool | _getVectorIsotopic (const Db *db) |
void | _loadData (const Db *db, int iech, VectorDouble &data) |
int | _calculateEigen (bool verbose=false) |
int | _calculateGEigen (bool verbose) |
void | _calculateNormalization (const Db *db, const VectorBool &isoFlag, bool verbose=false, bool flag_nm1=false) |
void | _covariance0 (const Db *db, const VectorBool &isoFlag, bool verbose=false, bool flag_nm1=false) |
void | _variogramh (Db *db, const VarioParam &varioparam, int ilag0, int idir0, double hmin, double hmax, const VectorBool &isoFlag, bool verbose) |
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) |
void | _pcaFunctions (bool verbose) |
void | _mafFunctions (bool verbose) |
int | _mafCompute (Db *db, const VarioParam &varioparam, int ilag0, int idir0, double hmin, double hmax, bool verbose) |
Private Attributes | |
int | _nVar |
VectorDouble | _mean |
VectorDouble | _sigma |
VectorDouble | _eigval |
VectorDouble | _eigvec |
VectorDouble | _c0 |
VectorDouble | _gh |
VectorDouble | _Z2F |
VectorDouble | _F2Z |
PCA::PCA | ( | int | nvar = 0 | ) |
PCA::PCA | ( | const PCA & | m | ) |
|
virtual |
|
private |
|
private |
|
private |
Fill the mean and variance arrays
[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 |
|
private |
|
private |
Calculate the covariance matrix
[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 |
|
inlineprivate |
|
private |
|
private |
|
private |
Evaluate the MAF on irregular data
[in] | db | Db descriptor |
[in] | varioparam | VarioParam structure |
[in] | ilag0 | Reference Lag |
[in] | idir0 | Reference direction |
[in] | hmin | Minimum distance |
[in] | hmax | Maximum distance |
[in] | verbose | Verbose flag |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
int PCA::dbF2Z | ( | Db * | db, |
bool | verbose = false , |
||
const NamingConvention & | namconv = NamingConvention("Z", false) |
||
) |
int PCA::dbZ2F | ( | Db * | db, |
bool | verbose = false , |
||
const NamingConvention & | namconv = NamingConvention("F", false) |
||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
VectorDouble PCA::getVarianceRatio | ( | ) | const |
|
inline |
|
inline |
void PCA::init | ( | int | nvar | ) |
int PCA::maf_compute | ( | Db * | db, |
const VarioParam & | varioparam, | ||
int | ilag0 = 1 , |
||
int | idir0 = 0 , |
||
bool | verbose = false |
||
) |
Evaluate the MAF
[in] | db | Db descriptor |
[in] | varioparam | VarioParam structure |
[in] | ilag0 | Reference Lag |
[in] | idir0 | Reference direction |
[in] | verbose | Verbose flag |
int PCA::maf_compute_interval | ( | Db * | db, |
double | hmin, | ||
double | hmax, | ||
bool | verbose = false |
||
) |
Evaluate the MAF
[in] | db | Db descriptor |
[in] | hmin | Lower bound on distance |
[in] | hmax | Upper bound on distance |
[in] | verbose | Verbose flag |
VectorDouble PCA::mafOfIndex | ( | ) | const |
int PCA::pca_compute | ( | const Db * | db, |
bool | verbose = false |
||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Interface for AStringable.
Reimplemented from AStringable.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |