gstlearn
1.0.0
Geostatistics & Machine Learning toolbox | https://gstlearn.org
|
#include <AnamDiscreteDD.hpp>
Public Member Functions | |
AnamDiscreteDD (double mu=1., double scoef=0.) | |
AnamDiscreteDD (const AnamDiscreteDD &m) | |
AnamDiscreteDD & | operator= (const AnamDiscreteDD &m) |
virtual | ~AnamDiscreteDD () |
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
ICloneable Interface. More... | |
const EAnam & | getType () const override |
AAnam Interface. More... | |
bool | hasFactor () const override |
int | getNFactor () const override |
VectorDouble | z2factor (double z, const VectorInt &ifacs) const override |
double | computeVariance (double sval) const override |
int | updatePointToBlock (double r_coef) override |
bool | allowChangeSupport () const override |
bool | isChangeSupportDefined () const override |
int | fitFromArray (const VectorDouble &tab, const VectorDouble &wt=VectorDouble()) override |
void | calculateMeanAndVariance () override |
AnamDiscrete Interface. More... | |
VectorDouble | factors_exp (bool verbose=false) |
VectorDouble | factors_maf (bool verbose=false) |
VectorDouble | factors_mod () |
VectorDouble | chi2I (const VectorDouble &chi, int mode) |
AnamDiscreteDD * | create (double mu=1., double scoef=0.) |
void | reset (int ncut, double scoef, double mu, const VectorDouble &zcut, const VectorDouble &pcaz2f, const VectorDouble &pcaf2z, const VectorDouble &stats) |
PCA & | getMAF () |
double | getMu () const |
double | getSCoef () const |
const VectorDouble & | getI2Chi () const |
VectorDouble | getPcaZ2Fs () const |
VectorDouble | getPcaF2Zs () const |
void | setMu (double mu) |
void | setRCoef (double rcoef) |
void | setPcaZ2F (VectorDouble pcaz2f) |
void | setPcaF2Z (VectorDouble pcaf2z) |
void | setI2Chi (const VectorDouble &i2Chi) |
int | factor2Selectivity (Db *db, Selectivity *selectivity, const VectorInt &cols_est, const VectorInt &cols_std, int iptr0) |
![]() | |
AnamDiscrete () | |
AnamDiscrete (const AnamDiscrete &m) | |
AnamDiscrete & | operator= (const AnamDiscrete &m) |
virtual | ~AnamDiscrete () |
bool | hasGaussian () const override |
AAnam interface. More... | |
int | getNClass () const |
virtual double | getVariance () const override |
int | getNCut () const |
int | getNElem () const |
const VectorDouble & | getZCut () const |
double | getZCut (int i) const |
double | getMean () const |
void | setMean (double mean) |
void | setVariance (double variance) |
void | setNCut (int ncut) |
void | setZCut (const VectorDouble &zcut) |
void | setNElem (int nelem) |
void | setStats (const VectorDouble &stats) |
double | getDDStatProp (int iclass) const |
double | getDDStatZmoy (int iclass) const |
double | getDDStatCnorm (int iclass) const |
double | getDDStatLambda (int iclass) const |
double | getDDStatU (int iclass) const |
double | getDDStatMul (int iclass) const |
void | setDDStatProp (int iclass, double value) |
void | setDDStatZmoy (int iclass, double value) |
void | setDDStatCnorm (int iclass, double value) |
void | setDDStatLambda (int iclass, double value) |
void | setDDStatU (int iclass, double value) |
void | setDDStatMul (int iclass, double value) |
double | getIRStatT (int iclass) const |
double | getIRStatQ (int iclass) const |
double | getIRStatZ (int iclass) const |
double | getIRStatB (int iclass) const |
double | getIRStatR (int iclass) const |
double | getIRStatRV (int iclass) const |
void | setIRStatT (int iclass, double value) |
void | setIRStatQ (int iclass, double value) |
void | setIRStatZ (int iclass, double value) |
void | setIRStatB (int iclass, double value) |
void | setIRStatR (int iclass, double value) |
void | setIRStatRV (int iclass, double value) |
const MatrixRectangular & | getStats () const |
![]() | |
AAnam () | |
AAnam (const AAnam &m) | |
AAnam & | operator= (const AAnam &m) |
virtual | ~AAnam () |
virtual double | rawToTransformValue (double z) const |
virtual double | transformToRawValue (double y) const |
double | invertVariance (double cvv) const |
VectorDouble | rawToTransformVec (const VectorDouble &z) const |
VectorDouble | transformToRawVec (const VectorDouble &z) const |
int | fitFromLocator (Db *db, const ELoc &locatorType=ELoc::fromKey("Z")) |
int | fit (Db *db, const String &name) |
int | rawToGaussianByLocator (Db *db, const NamingConvention &namconv=NamingConvention("Y")) |
int | rawToGaussian (Db *db, const String &name, const NamingConvention &namconv=NamingConvention("Y")) |
int | normalScore (Db *db, const String &name, const NamingConvention &namconv=NamingConvention("Gaussian")) |
int | gaussianToRawByLocator (Db *db, const NamingConvention &namconv=NamingConvention("Z")) |
int | gaussianToRaw (Db *db, const String &name, const NamingConvention &namconv=NamingConvention("Z")) |
int | rawToFactorByRanks (Db *db, const VectorInt &ifacs, const NamingConvention &namconv=NamingConvention("Factor")) |
int | rawToFactor (Db *db, int nfactor, const NamingConvention &namconv=NamingConvention("Factor")) |
![]() | |
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 |
![]() | |
ASerializable () | |
ASerializable (const ASerializable &r) | |
ASerializable & | operator= (const ASerializable &r) |
virtual | ~ASerializable () |
bool | deserialize (std::istream &is, bool verbose=true) |
bool | serialize (std::ostream &os, bool verbose=true) const |
bool | dumpToNF (const String &neutralFilename, bool verbose=false) const |
![]() | |
ICloneable () | |
virtual | ~ICloneable () |
virtual ICloneable * | clone () const =0 |
Static Public Member Functions | |
static AnamDiscreteDD * | createFromNF (const String &neutralFilename, bool verbose=true) |
ASerializable Interface. More... | |
![]() | |
static String | buildFileName (int status, const String &filename, bool ensureDirExist=false) |
static String | getHomeDirectory (const String &sub="") |
static String | getWorkingDirectory () |
static String | getTestData (const String &subdir, const String &filename) |
static String | getFileIdentity (const String &filename, bool verbose=false) |
static void | setContainerName (bool useDefault, const String &containerName="", bool verbose=false) |
static void | unsetContainerName () |
static void | setPrefixName (const String &prefixName) |
static void | unsetPrefixName () |
static const String & | getContainerName () |
static const String & | getPrefixName () |
static bool | createDirectory (const String &dir) |
static String | getExecDirectory () |
static String | getDirectory (const String &path) |
Protected Member Functions | |
virtual bool | _deserialize (std::istream &is, bool verbose=false) override |
Interface for ASerializable. More... | |
virtual bool | _serialize (std::ostream &os, bool verbose=false) const override |
String | _getNFName () const override |
![]() | |
bool | _isClassValid (int iclass) const |
void | _resize () |
![]() | |
bool | _isSampleSkipped (Db *db, int iech, const VectorInt &cols_est, const VectorInt &cols_std) |
bool | _isFitted () const |
![]() | |
bool | _fileOpenWrite (const String &filename, std::ofstream &os, bool verbose=false) const |
bool | _fileOpenRead (const String &filename, std::ifstream &is, bool verbose=false) const |
Private Member Functions | |
int | _stats (int nech, const VectorDouble &tab) |
VectorDouble | _generator (const VectorDouble &vecc, const VectorDouble &veca, const VectorDouble &vecb, VectorDouble &eigvec, VectorDouble &eigval) |
void | _lambdaToMul () |
void | _blockAnamorphosis (const VectorDouble &chi) |
void | _globalSelectivity (Selectivity *selectivity) |
Private Attributes | |
double | _mu |
double | _sCoef |
PCA | _maf |
VectorDouble | _i2Chi |
Friends | |
class | Selectivity |
Additional Inherited Members | |
![]() | |
static bool | _commentWrite (std::ostream &os, const String &comment) |
template<typename T > | |
static bool | _recordWrite (std::ostream &os, const String &title, const T &val) |
template<typename T > | |
static bool | _recordWriteVec (std::ostream &os, const String &title, const VectorT< T > &vec) |
template<typename T > | |
static bool | _recordRead (std::istream &is, const String &title, T &val) |
template<typename T > | |
static bool | _recordReadVec (std::istream &is, const String &title, VectorT< T > &vec, int nvalues) |
static bool | _onlyBlanks (char *string) |
static bool | _tableRead (std::istream &is, const String &string, int ntab, double *tab) |
static bool | _tableWrite (std::ostream &os, const String &string, int ntab, const VectorDouble &tab) |
AnamDiscreteDD::AnamDiscreteDD | ( | double | mu = 1. , |
double | scoef = 0. |
||
) |
AnamDiscreteDD::AnamDiscreteDD | ( | const AnamDiscreteDD & | m | ) |
|
virtual |
|
private |
Calculate the block anamorphosis (from point anamorphosis)
[in] | chi | Array containing the Chi factors |
|
overrideprotectedvirtual |
Interface for ASerializable.
Reimplemented from AnamDiscrete.
|
private |
vecc | Vector of the Tridiagonal matrix |
veca | Vector of the Tridiagonal matrix |
vecb | Vector of the Tridiagonal matrix |
eigvec | Returned Eigen vectors |
eigval | Returned Eigen values |
|
inlineoverrideprotectedvirtual |
Reimplemented from AnamDiscrete.
|
private |
Calculate the theoretical grade tonnage value (Discrete Diffusion case)
[in] | selectivity | Selectivity structure to be filled |
|
private |
|
overrideprotectedvirtual |
Reimplemented from AnamDiscrete.
|
private |
|
inlineoverridevirtual |
Reimplemented from AAnam.
|
overridevirtual |
AnamDiscrete Interface.
Reimplemented from AnamDiscrete.
VectorDouble AnamDiscreteDD::chi2I | ( | const VectorDouble & | chi, |
int | mode | ||
) |
chi | Chi Matrix |
mode | Type of recovery function
|
|
overridevirtual |
Calculates the block variance
Reimplemented from AAnam.
AnamDiscreteDD * AnamDiscreteDD::create | ( | double | mu = 1. , |
double | scoef = 0. |
||
) |
|
static |
ASerializable Interface.
int AnamDiscreteDD::factor2Selectivity | ( | Db * | db, |
Selectivity * | selectivity, | ||
const VectorInt & | cols_est, | ||
const VectorInt & | cols_std, | ||
int | iptr0 | ||
) |
Calculate Experimental Grade-Tonnage curves from factors Case of Discrete Diffusion
[in] | db | Db structure containing the factors (Z-locators) |
[in] | selectivity | Selectivity structure |
[in] | cols_est | Array of UIDs for factor estimation |
[in] | cols_std | Array of UIDs for factor st. dev. |
[in] | iptr0 | Rank for storing the results |
VectorDouble AnamDiscreteDD::factors_exp | ( | bool | verbose = false | ) |
VectorDouble AnamDiscreteDD::factors_maf | ( | bool | verbose = false | ) |
VectorDouble AnamDiscreteDD::factors_mod | ( | ) |
|
overridevirtual |
Reimplemented from AAnam.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Reimplemented from AAnam.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Reimplemented from AAnam.
|
inlineoverridevirtual |
Implements AAnam.
AnamDiscreteDD & AnamDiscreteDD::operator= | ( | const AnamDiscreteDD & | m | ) |
void AnamDiscreteDD::reset | ( | int | ncut, |
double | scoef, | ||
double | mu, | ||
const VectorDouble & | zcut, | ||
const VectorDouble & | pcaz2f, | ||
const VectorDouble & | pcaf2z, | ||
const VectorDouble & | stats | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
|
overridevirtual |
Reimplemented from AAnam.
|
overridevirtual |
Reimplemented from AAnam.
|
friend |
|
private |
|
private |
|
private |
|
private |