%feature("docstring") gum::learning::BNDatabaseGenerator
"
BNDatabaseGenerator is used to easily generate databases from a pyAgrum.BayesNet.

Parameters
----------
bn: pyAgrum.BayesNet
  the Bayesian network used to generate data.
"

%feature("docstring") gum::learning::BNDatabaseGenerator::drawSamples
"
Generate and stock a database generated by sampling the Bayesian network.

If `evs` is specified, the samples are stored only if there are compatible with these observations.

Returns the log2likelihood of this database.

Parameters
----------
nbSamples : int
	the number of samples that will be generated
evs : gum::Instantiation or Dict[int|str,int|str]
  (optional) The evidence that will be observed by the resulting samples.

Warning
-------
`nbSamples` is not the size of the database but the number of generated samples. It may happen that the evidence is very
rare (or even impossible). In that cas the generated database may have only a few samples (even it may be empty).

Examples
--------
>>> import pyAgrum as gum
>>> bn=gum.fastBN('A->B{yes|maybe|no}<-C->D->E<-F<-B')
>>> g=gum.BNDatabaseGenerator(bn)
>>> g.setRandomVarOrder()
>>> g.drawSamples(100,{'B':'yes','E':'1'})
-233.16554130404904
>>> g.to_pandas()
    D  E  C    B  F  A
0   1  1  0  yes  1  1
1   1  1  0  yes  1  0
2   1  1  1  yes  0  1
3   1  1  0  yes  0  0
4   1  1  0  yes  0  1
5   1  1  0  yes  1  0
6   1  1  0  yes  0  0
7   0  1  1  yes  1  1
8   1  1  0  yes  0  1
9   0  1  0  yes  1  1
10  1  1  0  yes  1  1
"

%feature("docstring") gum::learning::BNDatabaseGenerator::toCSV
"
generates csv representing the generated database.

Parameters
----------
csvFilename: str
  the name of the csv file
useLabels: bool
  whether label or id in the csv file (default true)
append: bool
  append in the file or rewrite the file (default false)
csvSeparator: str
  separator in the csv file (default ',')
"

%feature("docstring") gum::learning::BNDatabaseGenerator::samplesNbRows
"
return the number of rows in the samples
"

%feature("docstring") gum::learning::BNDatabaseGenerator::samplesNbCols
"
return the number of columns in the samples
"

%feature("docstring") gum::learning::BNDatabaseGenerator::bn
"
Get the Bayesian network used to generate the samples

Returns
-------
pyAgrum.BayesNet
  The Bayesian network

"

%feature("docstring") gum::learning::BNDatabaseGenerator::log2likelihood
"
Get the  log2likelihood of the generated database

Raises
------
pyAgrum.OperationNotAllowed
  if nothing has been sampled yet (using `gum.BNDatabaseGenerator.drawSamples()` for instance)

Returns
-------
float
  the log2likelihood
"

%feature("docstring") gum::learning::BNDatabaseGenerator::samplesAt
"
Get the value of the database in (row,col)

Parameters
----------
row : int
  the row
col : int
  the column (using the ordered list of variables)

Returns
-------
int
  the index of the modality of the variable in this position
"

%feature("docstring") gum::learning::BNDatabaseGenerator::samplesLabelAt
"
Get the label of the database in (row,col)

Parameters
----------
row : int
  the row
col : int
  the column (using the ordered list of variables)

Returns
-------
str
  the label of the modality of the variable in this position
"

%feature("docstring") gum::learning::BNDatabaseGenerator::setAntiTopologicalVarOrder
"
Select an anti-topological order for the variables in the database.
"

%feature("docstring") gum::learning::BNDatabaseGenerator::setRandomVarOrder
"
Select an random order for the variables in the database.
"

%feature("docstring") gum::learning::BNDatabaseGenerator::setTopologicalVarOrder
"
Select a topological order for the variables in the database.
"

%feature("docstring") gum::learning::BNDatabaseGenerator::setVarOrder
"
Set a specific order with a list of names

Parameters
----------
vars : List[str]
  order specified by the list of variable names.
"

%feature("docstring") gum::learning::BNDatabaseGenerator::setVarOrderFromCSV
"
Set the same order than in a csv file

Parameters
----------
filename:str
  the name of the CSV file
"

%feature("docstring") gum::learning::BNDatabaseGenerator::varOrder
"
The actual order for the variable (as a tuple of NodeId)

Returns
-------
Tuple[int]
  the tuple of NodeId
"

%feature("docstring") gum::learning::BNDatabaseGenerator::varOrderNames
"
The actual order for the variable (as a tuple of NodeId)

Returns
-------
Tuple[str]
  the tuple of names
"
