aGrUM  0.16.0
BNDatabaseGenerator.h File Reference

Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr. More...

+ Include dependency graph for BNDatabaseGenerator.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gum::learning::BNDatabaseGenerator< GUM_SCALAR >
 

Namespaces

 gum
 Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
 
 gum::learning
 

Detailed Description

Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.

Author
Santiago CORTIJO and Pierre-Henri WUILLEMIN

Constructor

(being "bn" a BayesNet<GUM_SCALAR>)

CSV Generation:

std::string csvFileName="foo.csv"
gum::Size nbSamples = 100;
bool useLabels = false;
bool append = false;
std::string csvSeparator(",");
dbgen.drawSamples(nbSamples);
dbgen.setRandomVarOrder();
dbgen.toCSV(csvFileName, useLabels, append, csvSeparator);

CSV append:

std::string csvFileName="foo.csv"
gum::Size nbSamples = 100;
bool useLabels = false;
bool append = true;
std::string csvSeparator(":::");
bool checkOnAppend = true;
dbgen.drawSamples(nbSamples);
dbgen.setVarOrderFromCSV(csv_file, csvSeparator);
dbgen.toCSV(csv_file, useLabels, append, csvSeparator, checkOnAppend);

DatabaseVectInRam mdoe:

gum::learning::DatabaseVectInRAM database =
dbgen.toDatabaseVectInRAM(useLabels);

Definition in file BNDatabaseGenerator.h.