Grail (C++)  1.2.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::simgames::learn::C45Algorithm Class Reference

This class encapsulates the C4.5 Algorithm used to generate a decision tree (see Grail.Simulation.DecisionTree) based on the dataset provided. More...

#include <C45Algorithm.h>

Public Member Functions

std::unique_ptr< dt::DecisionNode< ISimulatedGameAction > > ConstructTree (Dataset &dataset, int maxDepth=dt::decisionTreeMaxDepth)
 Constructs a new decision tree based on the provided dataset. The decision type is given by generic argument TDecisionType. More...
 
const std::unordered_set< int > & GetUsedColumns () const
 Gets indices of columns in the dataset used for learning with the C4.5 Algorithm that were actually used when creating the decision tree. More...
 

Detailed Description

This class encapsulates the C4.5 Algorithm used to generate a decision tree (see Grail.Simulation.DecisionTree) based on the dataset provided.

Template Parameters
TDecisionType

Member Function Documentation

◆ ConstructTree()

std::unique_ptr< dt::DecisionNode< ISimulatedGameAction > > grail::simgames::learn::C45Algorithm::ConstructTree ( Dataset dataset,
int  maxDepth = dt::decisionTreeMaxDepth 
)

Constructs a new decision tree based on the provided dataset. The decision type is given by generic argument TDecisionType.

Parameters
datasetA dataset that contains training data for the decision tree
maxDepthOptionally, you may limit the depth of the decision tree to @maxDepth most important levels
Returns

◆ GetUsedColumns()

const std::unordered_set< int > & grail::simgames::learn::C45Algorithm::GetUsedColumns ( ) const

Gets indices of columns in the dataset used for learning with the C4.5 Algorithm that were actually used when creating the decision tree.


The documentation for this class was generated from the following files: