|
Id | gstlrn::Db::resetFromSamples (Id nech, const ELoadBy &order=ELoadBy::fromKey("SAMPLE"), const 1 &tab=1(), const VectorString &names=VectorString(), const VectorString &locatorNames=VectorString(), bool flagAddSampleRank=true) |
|
Id | gstlrn::Db::resetFromCSV (const String &filename, bool verbose, const CSVformat &csvfmt, Id ncol_max=-1, Id nrow_max=-1, bool flagAddSampleRank=true) |
|
Id | gstlrn::Db::resetFromBox (Id nech, const 1 &coormin, const 1 &coormax, Id ndim=2, double extend=0., Id seed=321415, bool flagAddSampleRank=true) |
|
Id | gstlrn::Db::resetFromOnePoint (const 1 &tab=1(), bool flagAddSampleRank=true) |
|
Id | gstlrn::Db::resetSamplingDb (const Db *dbin, double proportion=0, Id number=0, const VectorString &names=VectorString(), Id seed=23241, bool verbose=false, bool flagAddSampleRank=true) |
|
Id | gstlrn::Db::resetReduce (const Db *dbin, const VectorString &names=VectorString(), const 1 &ranks=1(), bool verbose=false) |
|
Id | gstlrn::Db::resetFromGridRandomized (const DbGrid *dbin, double randperc=0., bool flagAddSampleRank=true) |
|
All methods enabling to Reset the contents of an already existing Db.
They clean the initial contents and replace it by the new one.
◆ resetFromBox()
Id gstlrn::Db::resetFromBox |
( |
Id |
nech, |
|
|
const 1 & |
coormin, |
|
|
const 1 & |
coormax, |
|
|
Id |
ndim = 2 , |
|
|
double |
extend = 0. , |
|
|
Id |
seed = 321415 , |
|
|
bool |
flagAddSampleRank = true |
|
) |
| |
Create a Db generating samples randomly
- Parameters
-
nech | Number of samples to be generated |
coormin | Vector giving the smallest values of the coordinates |
coormax | Vector giving the largest values for the coordinates |
ndim | Space dimension (used if 'coormin' and 'coormax' are empty) |
extend | Extension of the bounding box (if positive) |
seed | Seed for the random number generator |
flagAddSampleRank | true if the Sample ranks must be generated |
◆ resetFromCSV()
Id gstlrn::Db::resetFromCSV |
( |
const String & |
filename, |
|
|
bool |
verbose, |
|
|
const CSVformat & |
csvfmt, |
|
|
Id |
ncol_max = -1 , |
|
|
Id |
nrow_max = -1 , |
|
|
bool |
flagAddSampleRank = true |
|
) |
| |
Creating a Db by reading a CSV file
- Parameters
-
filename | Name of the CSV file |
verbose | Verbose flag |
csvfmt | Description of the CSV format |
ncol_max | Maximum number of columns |
nrow_max | Maximum number of rows |
flagAddSampleRank | true if the sample rank must be generated |
◆ resetFromGridRandomized()
Id gstlrn::Db::resetFromGridRandomized |
( |
const DbGrid * |
dbin, |
|
|
double |
randperc = 0. , |
|
|
bool |
flagAddSampleRank = true |
|
) |
| |
◆ resetFromOnePoint()
Id gstlrn::Db::resetFromOnePoint |
( |
const 1 & |
tab = 1() , |
|
|
bool |
flagAddSampleRank = true |
|
) |
| |
Create a Db from a single sample whose coordinates are provided in 'tab'
- Parameters
-
tab | Array containing the coordinates of the single sample |
flagAddSampleRank | true if the Sample ranks must be generated |
◆ resetFromSamples()
◆ resetReduce()
◆ resetSamplingDb()
Id gstlrn::Db::resetSamplingDb |
( |
const Db * |
dbin, |
|
|
double |
proportion = 0 , |
|
|
Id |
number = 0 , |
|
|
const VectorString & |
names = VectorString() , |
|
|
Id |
seed = 23241 , |
|
|
bool |
verbose = false , |
|
|
bool |
flagAddSampleRank = true |
|
) |
| |
Sampling an input Db to create the output Db by selecting a subset of samples
- Parameters
-
dbin | Pointer to the input Db |
proportion | Proportion of samples to be retained |
number | Number of samples to be retained |
names | Vector of Names to be copied (empty: all names) |
seed | Seed used for the random number generator |
verbose | Verbose flag |
flagAddSampleRank | true if the sample rank must be generated |