(C++)
1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Public Member Functions | |
size_t | DecisionVariablesCount () const |
Gets the number of measures (also know as considerations / decisions / columns in dataset). More... | |
const std::vector< DTConsiderationType > & | GetConsiderationTypes () const |
Gets types of the respective consideration, in order of appearance. The types are either NUMERIC or NOMINAL. More... | |
const DTConsiderationType | GetConsiderationType (int columnIndex) const |
Returns the type of the i-th consideration; i = columnIndex. More... | |
Dataset (std::initializer_list< DTConsiderationType > considerationTypes) | |
Creates a new dataset. More... | |
Dataset (std::vector< DTConsiderationType > considerationTypes) | |
Creates a new dataset. More... | |
void | AddSample (std::unique_ptr< ISimulatedGameAction > decision, std::initializer_list< float > data) |
Constructs and insert new sample to the dataset. The sample is constructed using the @decision and values for considerations (@data). | |
void | AddSample (std::unique_ptr< ISimulatedGameAction > decision, std::vector< float > data) |
Constructs and insert new sample to the dataset. The sample is constructed using the @decision and values for considerations (@data). | |
void | AddSample (std::unique_ptr< DatasetSample > sample) |
Insert new sample to the dataset. | |
double | ValidateBinary (DecisionNode< ISimulatedGameAction > &decisionTreeNodeRoot) |
Tests a decision tree (represented by the root node) against a dataset. Returns the accuracy of decision predictions vs. decisions that are in the dataset. More... | |
bool | MoveFromOther (Dataset &sourceDataset) |
Moves samples from another dataset to the dataset this function was called on. It performs a basic check whether ConsiderationTypes are compatible between the two dataset. Warning: If succeeded, this will erase the sourceDataset. More... | |
bool | CopyFromOther (Dataset &sourceDataset) |
Adds samples from another dataset to the dataset this function was called on. It performs a basic check whether ConsiderationTypes are compatible between the two dataset. More... | |
Public Attributes | |
std::vector< std::unique_ptr< DatasetSample > > | Samples |
Data stored in Dataset. More... | |
Friends | |
class | C45Algorithm |
grail::simulation::Dataset::Dataset | ( | std::initializer_list< DTConsiderationType > | considerationTypes | ) |
Creates a new dataset.
considerationTypes | Data type {NUMERIC, NOMINAL} for the respective columns in the dataset. |
grail::simulation::Dataset::Dataset | ( | std::vector< DTConsiderationType > | considerationTypes | ) |
Creates a new dataset.
considerationTypes | Data type {NUMERIC, NOMINAL} for the respective columns in the dataset. |
bool grail::simulation::Dataset::CopyFromOther | ( | Dataset & | sourceDataset | ) |
Adds samples from another dataset to the dataset this function was called on. It performs a basic check whether ConsiderationTypes are compatible between the two dataset.
sourceDataset | The dataset to copy samples from. |
size_t grail::simulation::Dataset::DecisionVariablesCount | ( | ) | const |
Gets the number of measures (also know as considerations / decisions / columns in dataset).
const DTConsiderationType grail::simulation::Dataset::GetConsiderationType | ( | int | columnIndex | ) | const |
Returns the type of the i-th consideration; i = columnIndex.
const std::vector< DTConsiderationType > & grail::simulation::Dataset::GetConsiderationTypes | ( | ) | const |
Gets types of the respective consideration, in order of appearance. The types are either NUMERIC or NOMINAL.
bool grail::simulation::Dataset::MoveFromOther | ( | Dataset & | sourceDataset | ) |
Moves samples from another dataset to the dataset this function was called on. It performs a basic check whether ConsiderationTypes are compatible between the two dataset. Warning: If succeeded, this will erase the sourceDataset.
sourceDataset | The dataset to move samples from. |
double grail::simulation::Dataset::ValidateBinary | ( | DecisionNode< ISimulatedGameAction > & | decisionTreeNodeRoot | ) |
Tests a decision tree (represented by the root node) against a dataset. Returns the accuracy of decision predictions vs. decisions that are in the dataset.
std::vector<std::unique_ptr<DatasetSample> > grail::simulation::Dataset::Samples |
Data stored in Dataset.