1.5.0
CCC
 
AnamEmpirical Class Reference

#include <AnamEmpirical.hpp>

Inheritance diagram for AnamEmpirical:
AnamContinuous AAnam AStringable ASerializable ICloneable

Detailed Description

Gaussian Anamorphosis using Empirical Method

This class is meant in order to construct the transfer function from Raw to Gaussian scale directly based on the data.

It essentially maps the cumulative function (CDF) of the raw values into the CDF of the theoretical Gaussian distribution.

This can be performed directly on the experimental CDF (normal score) or by diluting the data values beforehand. In the latter solution, each (valid) datum is replaced by a small local distribution. This is meant to smooth the stepwise CDF.

The dilution function (implemented at any data point) can be either a Gaussian or a Lognormal one. In the Gaussian case, the variance (width of the dilution function) is considered as constant (either provided by the user or defaulted by the program)* In the lognormal case, the logarithmic variance is constant (hence the width is proportional to the square of the value).

Public Member Functions

 AnamEmpirical (int ndisc=100, double sigma2e=TEST, bool flagDilution=false, bool flagGaussian=true)
 
 AnamEmpirical (const AnamEmpirical &m)
 
AnamEmpiricaloperator= (const AnamEmpirical &m)
 
virtual ~AnamEmpirical ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 ICloneable Interface. More...
 
void reset (int ndisc, double pymin, double pzmin, double pymax, double pzmax, double aymin, double azmin, double aymax, double azmax, double sigma2e, const VectorDouble &zdisc, const VectorDouble &ydisc)
 
const EAnam & getType () const override
 AAnam Interface. More...
 
int getNFactor () const override
 
int fitFromArray (const VectorDouble &tab, const VectorDouble &wt=VectorDouble()) override
 
void calculateMeanAndVariance () override
 AnamContinuous Interface. More...
 
double rawToTransformValue (double zz) const override
 
double transformToRawValue (double yy) const override
 
bool isChangeSupportDefined () const override
 
int getNDisc () const
 
double getSigma2e () const
 
const VectorDoublegetZDisc () const
 
const VectorDoublegetYDisc () const
 
bool isFlagDilution () const
 
bool isFlagGaussian () const
 
void setSigma2e (double sigma2e)
 
void setNDisc (int ndisc)
 
void setDisc (const VectorDouble &zdisc, const VectorDouble &ydisc)
 
void setFlagDilution (bool flagDilution)
 
void setFlagGaussian (bool flagGaussian)
 
- Public Member Functions inherited from AnamContinuous
 AnamContinuous ()
 
 AnamContinuous (const AnamContinuous &m)
 
AnamContinuousoperator= (const AnamContinuous &m)
 
virtual ~AnamContinuous ()
 
bool hasGaussian () const override
 AAnam interface. More...
 
virtual double getVariance () const override
 
void setABounds (double azmin=TEST, double azmax=TEST, double aymin=TEST, double aymax=TEST)
 
void setPBounds (double pzmin=TEST, double pzmax=TEST, double pymin=TEST, double pymax=TEST)
 
VectorDouble rawToGaussianVector (const VectorDouble &z) const
 
VectorDouble gaussianToRawVector (const VectorDouble &y) const
 
AnamContinuousFit sample (int ndisc=100, double aymin=-10, double aymax=+10)
 
double getMean () const
 
double getAymax () const
 
double getAymin () const
 
double getAzmax () const
 
double getAzmin () const
 
double getPymax () const
 
double getPymin () const
 
double getPzmax () const
 
double getPzmin () const
 
void setAzmin (double azmin)
 
void setAzmax (double azmax)
 
void setAymin (double aymin)
 
void setAymax (double aymax)
 
void setPzmin (double pzmin)
 
void setPzmax (double pzmax)
 
void setPymin (double pymin)
 
void setPymax (double pymax)
 
void setMean (double mean)
 
void setVariance (double variance)
 
- Public Member Functions inherited from AAnam
 AAnam ()
 
 AAnam (const AAnam &m)
 
AAnamoperator= (const AAnam &m)
 
virtual ~AAnam ()
 
virtual bool hasFactor () const
 
virtual int getNClass () const
 
virtual VectorDouble z2factor (double z, const VectorInt &ifacs) const
 
virtual double computeVariance (double sval) const
 
virtual int updatePointToBlock (double r_coef)
 
virtual bool allowChangeSupport () const
 
double invertVariance (double cvv) const
 
VectorDouble rawToTransformVec (const VectorDouble &z) const
 
VectorDouble transformToRawVec (const VectorDouble &y) 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"))
 
- Public Member Functions inherited from AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (int level) const final
 
- Public Member Functions inherited from ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (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
 
- Public Member Functions inherited from ICloneable
 ICloneable ()
 
virtual ~ICloneable ()
 
virtual ICloneableclone () const =0
 

Static Public Member Functions

static AnamEmpiricalcreateFromNF (const String &neutralFilename, bool verbose=true)
 ASerializable Interface. More...
 
static AnamEmpiricalcreate (int ndisc=100, double sigma2e=TEST)
 
- Static Public Member Functions inherited from ASerializable
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 StringgetContainerName ()
 
static const StringgetPrefixName ()
 
static bool createDirectory (const String &dir)
 
static String getExecDirectory ()
 
static String getDirectory (const String &path)
 

Constructor & Destructor Documentation

◆ AnamEmpirical() [1/2]

AnamEmpirical::AnamEmpirical ( int  ndisc = 100,
double  sigma2e = TEST,
bool  flagDilution = false,
bool  flagGaussian = true 
)

◆ AnamEmpirical() [2/2]

AnamEmpirical::AnamEmpirical ( const AnamEmpirical m)

◆ ~AnamEmpirical()

AnamEmpirical::~AnamEmpirical ( )
virtual

Member Function Documentation

◆ calculateMeanAndVariance()

void AnamEmpirical::calculateMeanAndVariance ( )
overridevirtual

AnamContinuous Interface.

Reimplemented from AnamContinuous.

◆ create()

AnamEmpirical * AnamEmpirical::create ( int  ndisc = 100,
double  sigma2e = TEST 
)
static

◆ createFromNF()

AnamEmpirical * AnamEmpirical::createFromNF ( const String neutralFilename,
bool  verbose = true 
)
static

ASerializable Interface.

◆ fitFromArray()

int AnamEmpirical::fitFromArray ( const VectorDouble tab,
const VectorDouble wt = VectorDouble() 
)
overridevirtual

Reimplemented from AAnam.

◆ getNDisc()

int AnamEmpirical::getNDisc ( ) const
inline

◆ getNFactor()

int AnamEmpirical::getNFactor ( ) const
inlineoverridevirtual

Reimplemented from AAnam.

◆ getSigma2e()

double AnamEmpirical::getSigma2e ( ) const
inline

◆ getType()

const EAnam& AnamEmpirical::getType ( ) const
inlineoverridevirtual

AAnam Interface.

Implements AAnam.

◆ getYDisc()

const VectorDouble& AnamEmpirical::getYDisc ( ) const
inline

◆ getZDisc()

const VectorDouble& AnamEmpirical::getZDisc ( ) const
inline

◆ isChangeSupportDefined()

bool AnamEmpirical::isChangeSupportDefined ( ) const
inlineoverridevirtual

Implements AAnam.

◆ isFlagDilution()

bool AnamEmpirical::isFlagDilution ( ) const
inline

◆ isFlagGaussian()

bool AnamEmpirical::isFlagGaussian ( ) const
inline

◆ operator=()

AnamEmpirical & AnamEmpirical::operator= ( const AnamEmpirical m)

◆ rawToTransformValue()

double AnamEmpirical::rawToTransformValue ( double  zz) const
overridevirtual

Reimplemented from AAnam.

◆ reset()

void AnamEmpirical::reset ( int  ndisc,
double  pymin,
double  pzmin,
double  pymax,
double  pzmax,
double  aymin,
double  azmin,
double  aymax,
double  azmax,
double  sigma2e,
const VectorDouble zdisc,
const VectorDouble ydisc 
)

◆ setDisc()

void AnamEmpirical::setDisc ( const VectorDouble zdisc,
const VectorDouble ydisc 
)

◆ setFlagDilution()

void AnamEmpirical::setFlagDilution ( bool  flagDilution)
inline

◆ setFlagGaussian()

void AnamEmpirical::setFlagGaussian ( bool  flagGaussian)
inline

◆ setNDisc()

void AnamEmpirical::setNDisc ( int  ndisc)

◆ setSigma2e()

void AnamEmpirical::setSigma2e ( double  sigma2e)
inline

◆ toString()

String AnamEmpirical::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

ICloneable Interface.

AStringable Interface

Reimplemented from AnamContinuous.

◆ transformToRawValue()

double AnamEmpirical::transformToRawValue ( double  yy) const
overridevirtual

Reimplemented from AAnam.


The documentation for this class was generated from the following files: