Class ModelResultBinaryFactory

java.lang.Object
rawDeepLearningClassifier.logging.ModelResultBinaryFactory

public class ModelResultBinaryFactory extends Object
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 Details

  • Constructor Details

    • ModelResultBinaryFactory

      public ModelResultBinaryFactory()
  • Method Details

    • getPackedData

      public static void getPackedData(PredictionResult modelResult, DataOutputStream dos, int type)
      Write data to a binary output stream
      Parameters:
      modelResult - - the model result to write.
      dos -
    • sinkData

      public static PredictionResult sinkData(DataInputStream dis)
      Read binary data and make a model result
      Parameters:
      binaryObjectData -
      bh -
      moduleVersion -
      Returns:
    • getType

      public static int getType(PredictionResult modelResult)
      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.