SG++-Doxygen-Documentation
|
Provides functionality for the runtime serialization of the LearnedKnowledge object. More...
Public Member Functions | |
def | deserialize (self, serializationStream) |
Deserializes the LearnedKnowledgeMemento object from the stream. More... | |
def | deserializeFromFile (self, filename) |
Deserializes the LearnedKnowledge memento object from the file. More... | |
def | serialize (self, memento, serializationStream) |
Serializes the LearnedKnowledge memento object to the stream. More... | |
def | serializeToFile (self, memento, filename) |
Serializes the LearnedKnowledge memento object to the file. More... | |
def | toString (self, memento) |
Returns a string that represents the LearnedKnowledge memento object. More... | |
Provides functionality for the runtime serialization of the LearnedKnowledge object.
This design intends to separate the binary object representation and its business logic from the text representation that can be saved into file. The class is a part of Memento design pattern described in details in CheckpointController .
Currently, the LearnerKnowledge memento object is DataVector object with alpha values.
def python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserialize | ( | self, | |
serializationStream | |||
) |
Deserializes the LearnedKnowledgeMemento object from the stream.
serializationStream | The stream to deserialize. |
References python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.__readAlphaARFF().
Referenced by python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserializeFromFile(), python.utils.GzipSerializer.GzipSerializer.deserializeFromFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.deserializeFromFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.deserializeFromFile(), and python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.deserializeFromFile().
def python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserializeFromFile | ( | self, | |
filename | |||
) |
Deserializes the LearnedKnowledge memento object from the file.
The file may or may be not gzip compressed.
filename | The name of file with serialized Grid. |
References sgpp::combigrid::AbstractSerializationStrategy< T >.deserialize(), python.learner.formatter.GridImageFormatter.GridImageFormatter.deserialize(), python.learner.formatter.GridFormatter.GridFormatter.deserialize(), sgpp::combigrid::DefaultSerializationStrategy< T >.deserialize(), json::JSON.deserialize(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserialize(), sgpp::combigrid::AbstractCombigridStorage.deserialize(), sgpp::combigrid::FloatSerializationStrategy< T >.deserialize(), sgpp::combigrid::CombigridTreeStorage.deserialize(), sgpp::combigrid::FunctionLookupTable.deserialize(), sgpp::combigrid::TreeStorageSerializationStrategy< T >.deserialize(), python.utils.GzipSerializer.GzipSerializer.gzOpen(), and create_dataset.type.
def python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serialize | ( | self, | |
memento, | |||
serializationStream | |||
) |
Serializes the LearnedKnowledge memento object to the stream.
memento | The LearnedKnowledgeMemento object. |
serializationStream | Output stream where the LearnedKnowledgeMemento object should be serialized to. |
References python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.__writeAlphaARFF().
Referenced by python.utils.GzipSerializer.GzipSerializer.serializeToFile(), python.learner.formatter.LearnerFormatter.LearnerFormatter.serializeToFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serializeToFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.serializeToFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.serializeToFile(), and python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.serializeToFile().
def python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serializeToFile | ( | self, | |
memento, | |||
filename | |||
) |
Serializes the LearnedKnowledge memento object to the file.
memento | LearnedKnowledgeMemento |
filename | The name of file where the Grid object should be serialized to. |
References python.utils.GzipSerializer.GzipSerializer.gzOpen(), python.learner.formatter.GridImageFormatter.GridImageFormatter.serialize(), sgpp::combigrid::AbstractSerializationStrategy< T >.serialize(), sgpp::combigrid::DefaultSerializationStrategy< T >.serialize(), json::ListNode.serialize(), json::Node.serialize(), sgpp::combigrid::FloatSerializationStrategy< T >.serialize(), json::JSON.serialize(), json::DictNode.serialize(), sgpp::base::ModPolyGrid.serialize(), sgpp::base::PolyGrid.serialize(), json::TextNode.serialize(), json::IDNode.serialize(), sgpp::base::PolyBoundaryGrid.serialize(), sgpp::base::LinearClenshawCurtisBoundaryGrid.serialize(), sgpp::base::PolyClenshawCurtisBoundaryGrid.serialize(), sgpp::combigrid::TreeStorageSerializationStrategy< T >.serialize(), sgpp::combigrid::AbstractCombigridStorage.serialize(), python.learner.formatter.GridFormatter.GridFormatter.serialize(), sgpp::base::LinearBoundaryGrid.serialize(), sgpp::combigrid::CombigridTreeStorage.serialize(), sgpp::combigrid::FunctionLookupTable.serialize(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serialize(), sgpp::base::LinearClenshawCurtisGrid.serialize(), sgpp::base::ModLinearClenshawCurtisGrid.serialize(), sgpp::base::ModPolyClenshawCurtisGrid.serialize(), sgpp::base::PolyClenshawCurtisGrid.serialize(), sgpp::base::ModBsplineGrid.serialize(), sgpp::base::FundamentalSplineGrid.serialize(), sgpp::base::BsplineGrid.serialize(), sgpp::base::ModFundamentalSplineGrid.serialize(), sgpp::base::ModBsplineClenshawCurtisGrid.serialize(), sgpp::base::NakBsplineBoundaryCombigridGrid.serialize(), sgpp::base::BsplineClenshawCurtisGrid.serialize(), sgpp::base::HashGridPoint.serialize(), sgpp::base::BsplineBoundaryGrid.serialize(), sgpp::base::HashGridStorage.serialize(), sgpp::base::BoundingBox.serialize(), sgpp::base::Stretching.serialize(), and sgpp::base::Grid.serialize().
def python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.toString | ( | self, | |
memento | |||
) |
Returns a string that represents the LearnedKnowledge memento object.
memento | The LearnedKnowledgeMemento object. |
References python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.__readDataARFF().
Referenced by python.uq.learner.Learner.Learner.createMemento(), and python.learner.Learner.Learner.createMemento().