Used to serialize decision tree in a text mode into array of strings. Pass object of this type to the DecisionTree.Serialize method.
More...
#include <DecisionTreeStringListSerializer.hh>
|
| DecisionTreeStringListSerializer (std::unique_ptr< IDecisionStringSerializer< TDecisionType >> actionSerializer) |
| Constructs a new DecisionTreeBinarySerializer object. More...
|
|
const std::vector< std::string > & | GetSerializedStrings () const |
| This serializer stores serialized data internally. You can access it using this method. More...
|
|
void | SetSerializedStrings (std::vector< std::string > &data) |
| Use this method if you want to deserialize a decision tree. Pass the serialized representation of a decision tree and then call the DecisionTree.Deserialize() method. More...
|
|
void | Clear () |
| Initializes the serializer by setting the read/write position to 0 More...
|
|
void | Print () |
| Prints the dataset to the standard output. More...
|
|
virtual void | SerializeNodeType (DecisionNodeType nodeType) override |
|
virtual DecisionNodeType | DeserializeNodeType () override |
|
virtual void | SerializeColumnIndex (int columnIndex) override |
|
virtual int | DeserializeColumnIndex () override |
|
virtual void | SerializeValue (float value) override |
|
virtual float | DeserializeValue () override |
|
virtual void | SerializeChildrenCount (int count) override |
|
virtual int | DeserializeChildrenCount () override |
|
virtual void | SerializeDecision (const TDecisionType &decision) override |
|
virtual std::unique_ptr< TDecisionType > | DeserializeDecision () override |
|
virtual void | WriteToFile (const std::string &filename) |
|
virtual void | ReadFromFile (const std::string &filename) |
|
virtual void | Initialize () |
|
void | Serialize (DecisionNode< TDecisionType > &node) |
|
void | SerializeContinuousInnerDecisionNode (ContinuousInnerDecisionNode< TDecisionType > &node) |
|
void | SerializeNominalInnerDecisionNode (NominalInnerDecisionNode< TDecisionType > &node) |
|
void | SerializeLeafNode (LeafDecisionNode< TDecisionType > &node) |
|
void | DeserializeContinuousInnerDecisionNode (ContinuousInnerDecisionNode< TDecisionType > &node) |
|
void | DeserializeNominalInnerDecisionNode (NominalInnerDecisionNode< TDecisionType > &node) |
|
std::unique_ptr< DecisionNode< TDecisionType > > | DeserializeNode () |
|
template<class TDecisionType>
class grail::simulation::DecisionTreeStringListSerializer< TDecisionType >
Used to serialize decision tree in a text mode into array of strings. Pass object of this type to the DecisionTree.Serialize method.
◆ DecisionTreeStringListSerializer()
template<class TDecisionType >
Constructs a new DecisionTreeBinarySerializer object.
- Parameters
-
actionSerializer | The object that performs to-string serialization of actions. |
◆ Clear()
template<class TDecisionType >
Initializes the serializer by setting the read/write position to 0
◆ GetSerializedStrings()
template<class TDecisionType >
This serializer stores serialized data internally. You can access it using this method.
- Returns
- Serialized decision tree as array of strings.
◆ Print()
template<class TDecisionType >
Prints the dataset to the standard output.
◆ SetSerializedStrings()
template<class TDecisionType >
Use this method if you want to deserialize a decision tree. Pass the serialized representation of a decision tree and then call the DecisionTree.Deserialize() method.
- Parameters
-
The documentation for this class was generated from the following file: