Package com.logicaldoc.ai.serializer
Class FileSerializer
java.lang.Object
com.logicaldoc.ai.serializer.Serializer
com.logicaldoc.ai.serializer.FileSerializer
An
Serializer
that uses plain files- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a reference (path, id or other) to a file used by the modelloadTrainedModel
(AIModel<?, ?> model) loadTrainingData
(AIModel<?, ?> model) void
saveTrainedModel
(AIModel<?, ?> model, InputStream data) Saves the trained model, the input stream gets closedvoid
saveTrainingData
(AIModel<?, ?> model, InputStream data) Saves the training data set, the input stream gets closedMethods inherited from class com.logicaldoc.ai.serializer.Serializer
exportModel, importModel
-
Constructor Details
-
FileSerializer
public FileSerializer()
-
-
Method Details
-
loadTrainingData
- Specified by:
loadTrainingData
in classSerializer
- Throws:
IOException
-
loadTrainedModel
- Specified by:
loadTrainedModel
in classSerializer
- Throws:
IOException
-
saveTrainingData
Description copied from class:Serializer
Saves the training data set, the input stream gets closed- Specified by:
saveTrainingData
in classSerializer
- Parameters:
model
- The modeldata
- The data to save- Throws:
IOException
- Error storing the training data
-
saveTrainedModel
Description copied from class:Serializer
Saves the trained model, the input stream gets closed- Specified by:
saveTrainedModel
in classSerializer
- Parameters:
model
- The modeldata
- The data to save- Throws:
IOException
- Error storing the model
-
getFile
Description copied from class:Serializer
Retrieves a reference (path, id or other) to a file used by the model- Specified by:
getFile
in classSerializer
- Parameters:
model
- The modelsuffix
- The file suffix- Returns:
- the file's reference
- Throws:
IOException
- Error retrieving the file
-