1.4.0
CCC
 
Creating a Db structure

Functions

static DbDb::create ()
 
static DbDb::createFromNF (const String &neutralFilename, bool verbose=true)
 
static DbDb::createFromSamples (int nech, const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const VectorDouble &tab=VectorDouble(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flagAddSampleRank=true)
 
static DbDb::createFromCSV (const String &filename, const CSVformat &csv=CSVformat(), bool verbose=false, int ncol_max=-1, int nrow_max=-1, bool flagAddSampleRank=true)
 
static DbDb::createFromBox (int nech, const VectorDouble &coormin, const VectorDouble &coormax, int seed=43241, bool flag_exact=true, bool flag_repulsion=false, double range=0., double beta=0., double extend=0., bool flagAddSampleRank=true)
 
static DbDb::createFromOnePoint (const VectorDouble &tab=VectorDouble(), bool flagAddSampleRank=true)
 
static DbDb::createSamplingDb (const Db *dbin, double proportion=0., int number=0, const VectorString &names=VectorString(), int seed=23241, bool verbose=false, bool flagAddSampleRank=true)
 
static DbDb::createFromDbGrid (int nech, DbGrid *dbgrid, int seed=432423, bool flag_exact=true, bool flag_repulsion=false, double range=0., double beta=0., bool flagAddSampleRank=true)
 
static DbDb::createReduce (const Db *dbin, const VectorString &names=VectorString(), const VectorInt &ranks=VectorInt(), bool verbose=false)
 
static DbDb::createFillRandom (int ndat, int ndim=2, int nvar=1, int nfex=0, int ncode=0, double varmax=0., double selRatio=0., const VectorDouble &heteroRatio=VectorDouble(), const VectorDouble &coormin=VectorDouble(), const VectorDouble &coormax=VectorDouble(), int seed=124234, bool flagAddSampleRank=true)
 

Detailed Description

All methods enabling to Create a new Db in various conditions.

They all return a pointer to the newly created Db structure.

Function Documentation

◆ create()

Db * Db::create ( )
static

◆ createFillRandom()

Db * Db::createFillRandom ( int  ndat,
int  ndim = 2,
int  nvar = 1,
int  nfex = 0,
int  ncode = 0,
double  varmax = 0.,
double  selRatio = 0.,
const VectorDouble heteroRatio = VectorDouble(),
const VectorDouble coormin = VectorDouble(),
const VectorDouble coormax = VectorDouble(),
int  seed = 124234,
bool  flagAddSampleRank = true 
)
static

Creating a new Db loaded with random values

Parameters
ndatNumber of samples
ndimDimension of the space
nvarNumber of variables
nfexNumber of external drift functions
ncodeNumber of codes (no code when 0)
varmaxMaximum value for the measurement error
selRatioPercentage of samples that must be masked off
heteroRatioVector of proportions of NA to be generated per variable
coorminVector of minima of the rectangle containing data (0s if not defined)
coormaxVector of maxima of the rectangle containing data (1s if not defined)
seedValue for the Random Generator seed
flagAddSampleRanktrue if the sample rank must be generated
Returns
A pointer to the newly created Db
Remarks
The coordinates are generated uniformly within [0,1] The variance of measurement error is created only if 'varmax' is positive. Then a field is created for each variable. this field is filled with random values uniformly generated in [0, varmax] The external drift values are generated according to Normal distribution.

◆ createFromBox()

Db * Db::createFromBox ( int  nech,
const VectorDouble coormin,
const VectorDouble coormax,
int  seed = 43241,
bool  flag_exact = true,
bool  flag_repulsion = false,
double  range = 0.,
double  beta = 0.,
double  extend = 0.,
bool  flagAddSampleRank = true 
)
static

◆ createFromCSV()

Db * Db::createFromCSV ( const String filename,
const CSVformat csv = CSVformat(),
bool  verbose = false,
int  ncol_max = -1,
int  nrow_max = -1,
bool  flagAddSampleRank = true 
)
static

◆ createFromDbGrid()

Db * Db::createFromDbGrid ( int  nech,
DbGrid dbgrid,
int  seed = 432423,
bool  flag_exact = true,
bool  flag_repulsion = false,
double  range = 0.,
double  beta = 0.,
bool  flagAddSampleRank = true 
)
static

Create a new Data Base with points generated at random

Returns
Pointer for the new Db structure
Parameters
[in]nechExpected number of samples
[in]dbgridDescriptor of the Db grid parameters
[in]seedSeed for the random number generator
[in]flag_exactTrue if the number of samples must not be drawn
[in]flag_repulsionTrue if repulsion is processed
[in]rangeRepulsion range
[in]betaBending coefficient
[in]flagAddSampleRanktrue if the Rank must be generated in the output Db

◆ createFromNF()

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

◆ createFromOnePoint()

Db * Db::createFromOnePoint ( const VectorDouble tab = VectorDouble(),
bool  flagAddSampleRank = true 
)
static

◆ createFromSamples()

Db * Db::createFromSamples ( int  nech,
const ELoadBy &  order = ELoadBy::fromKey("SAMPLE"),
const VectorDouble tab = VectorDouble(),
const VectorString names = VectorString(),
const VectorString locatorNames = VectorString(),
bool  flagAddSampleRank = true 
)
static

◆ createReduce()

Db * Db::createReduce ( const Db dbin,
const VectorString names = VectorString(),
const VectorInt ranks = VectorInt(),
bool  verbose = false 
)
static

◆ createSamplingDb()

Db * Db::createSamplingDb ( const Db dbin,
double  proportion = 0.,
int  number = 0,
const VectorString names = VectorString(),
int  seed = 23241,
bool  verbose = false,
bool  flagAddSampleRank = true 
)
static