gstlearn  0.3.3
CCC
Calculating several statistics in Db

Functions

VectorDouble Db::statistics (const VectorString &names, const std::vector< EStatOption > &opers=EStatOption::fromKeys({"MEAN"}), bool flagIso=true, bool flagStoreInDb=false, bool verbose=true, double vmin=TEST, double vmax=TEST, double proba=TEST, const String &title="", const NamingConvention &namconv=NamingConvention("Stats"))
 
VectorDouble Db::statisticsByLocator (const ELoc &locatorType, const std::vector< EStatOption > &opers=EStatOption::fromKeys({"MEAN"}), bool flagIso=true, bool flagStoreInDb=false, bool verbose=true, double vmin=TEST, double vmax=TEST, double proba=TEST, const String &title="", const NamingConvention &namconv=NamingConvention("Stats"))
 
VectorDouble Db::statisticsByUID (const VectorInt &iuids, const std::vector< EStatOption > &opers=EStatOption::fromKeys({"MEAN"}), bool flagIso=true, bool flagStoreInDb=false, bool verbose=true, double proba=TEST, double vmin=TEST, double vmax=TEST, const String &title="", const NamingConvention &namconv=NamingConvention("Stats"))
 

Detailed Description

These functions are meant to calculate several statistics on a set of target variables per sample. The resulting values are stored in variables newly created in the same Db.

Parameters
namesVector of target variable names
iuidsVector of user-designation ranks
locatorTypeTarget Locator
opersVector of operations to be performed
flagIsoThe statistics are calculated only for samples where all target variables have defined values
flagStoreInDbWhen TRUE, the results are stored in the Db; otherwise the statistics are returned
verboseVerbose flag
probaFor 'quant': the quantile for this probability is calculated
vminFor 'prop', 'T', 'Q', 'M', 'B': defines the lower bound of the interval to work in
vmaxFor 'prop', 'T', 'Q', 'M', 'B': defines the upper bound of the interval to work in
titleIf verbose, the title of the printed statistics.
namconvNaming Convention used as a radix for the variables newly created in the Db (only used when 'flagStoreInDb' is TRUE)
Returns
If 'flagStoreInDb' is FALSE, the function returns a vector containing the statistics.
If there is more than one operator and more than one variable, the statistics are ordered first by variables (all the statistics of the first variable, then all the statistics of the second variable...).

Function Documentation

◆ statistics()

VectorDouble Db::statistics ( const VectorString names,
const std::vector< EStatOption > &  opers = EStatOption::fromKeys({"MEAN"}),
bool  flagIso = true,
bool  flagStoreInDb = false,
bool  verbose = true,
double  proba = TEST,
double  vmin = TEST,
double  vmax = TEST,
const String title = "",
const NamingConvention namconv = NamingConvention("Stats") 
)

The target variables are referred to by their names

◆ statisticsByLocator()

VectorDouble Db::statisticsByLocator ( const ELoc &  locatorType,
const std::vector< EStatOption > &  opers = EStatOption::fromKeys({"MEAN"}),
bool  flagIso = true,
bool  flagStoreInDb = false,
bool  verbose = true,
double  proba = TEST,
double  vmin = TEST,
double  vmax = TEST,
const String title = "",
const NamingConvention namconv = NamingConvention("Stats") 
)

The target variables are referred to by their locator

◆ statisticsByUID()

VectorDouble Db::statisticsByUID ( const VectorInt iuids,
const std::vector< EStatOption > &  opers = EStatOption::fromKeys({"MEAN"}),
bool  flagIso = true,
bool  flagStoreInDb = false,
bool  verbose = true,
double  proba = TEST,
double  vmin = TEST,
double  vmax = TEST,
const String title = "",
const NamingConvention namconv = NamingConvention("Stats") 
)

The target variables are referred to by their user-designation ranks