public interface Database
The database must provide an instance of NetworkDescriptor
.
This descriptor allows the APILearning
to create a brand new network corresponding to the database or to check the compatibility between the database and an existing network.
It must exactly fit the database i.e. the order of the variables must be the same as the one returned when the learning process retrieves the states in each example.
Modifier and Type | Method and Description |
---|---|
short[] |
getExampleAt(int row)
Return an array of
short corresponding to the index of each variable's state found in the database at this row. |
double |
getExampleValueAt(int row,
int variableIndex)
Return the numerical value at the given row for the given variable's index.
|
NetworkDescriptor |
getNetworkDescriptor()
Return a
NetworkDescriptor corresponding to this database. |
double |
getTotalWeight()
Return the sum of all the weights in the database.
|
double |
getWeightAt(int row)
Return the weight of the example at the given row.
|
boolean |
hasMissingValues()
Tests if the database contains at least one missing value
|
int |
size()
Return the size of the database, i.e. the number of examples in the database.
|
NetworkDescriptor getNetworkDescriptor()
NetworkDescriptor
corresponding to this database.int size()
short[] getExampleAt(int row)
short
corresponding to the index of each variable's state found in the database at this row.
If there is a missing value in a column, the returned value must be -1 at the corresponding index.row
- the index of the row we want the exampledouble getExampleValueAt(int row, int variableIndex)
Double.NaN
must be returned.row
- the index of the row in databasevariableIndex
- the index of a continuous variabledouble getWeightAt(int row)
row
- the index of the rowdouble getTotalWeight()
boolean hasMissingValues()