Class ModelResultBinaryFactory
java.lang.Object
rawDeepLearningClassifier.logging.ModelResultBinaryFactory
Handles the saving and loading of Model results from binary files.
ModelResults are generated by a classifier and may have classifier-specific fields that need saved. The model results factory allows unique subclasses of ModelResult to save and load data different data fields to binary fields.
- Author:
- Jamie Macaulay
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Flag for model resstatic final int
Flag for model resstatic final int
Flag for model resstatic final int
Flag for model res -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
getPackedData
(PredictionResult modelResult, DataOutputStream dos, int type) Write data to a binary output streamstatic int
getType
(PredictionResult modelResult) Get the type flag for a model result.static PredictionResult
sinkData
(DataInputStream dis) Read binary data and make a model result
-
Field Details
-
GENERIC
public static final int GENERICFlag for model res- See Also:
-
SOUND_SPOT
public static final int SOUND_SPOTFlag for model res- See Also:
-
DUMMY_RESULT
public static final int DUMMY_RESULTFlag for model res- See Also:
-
KETOS
public static final int KETOSFlag for model res- See Also:
-
-
Constructor Details
-
ModelResultBinaryFactory
public ModelResultBinaryFactory()
-
-
Method Details
-
getPackedData
Write data to a binary output stream- Parameters:
modelResult
- - the model result to write.dos
-
-
sinkData
Read binary data and make a model result- Parameters:
binaryObjectData
-bh
-moduleVersion
-- Returns:
-
getType
Get the type flag for a model result. this is based on the class type.- Parameters:
modelResult
- - the model result- Returns:
- the type flag for the subclass of the result.
-