Interface MLCustomModel


  • public interface MLCustomModel
    Protocol for specifying a custom model implementation.
    • Method Detail

      • initWithModelDescriptionParameterDictionaryError

        java.lang.Object initWithModelDescriptionParameterDictionaryError​(MLModelDescription modelDescription,
                                                                          NSDictionary<java.lang.String,​?> parameters,
                                                                          org.moe.natj.general.ptr.Ptr<NSError> error)
        Initialize the custom model implementation. The model description describes the input and output feature types and metadata in the Model specificaiton. The parameter dictionary contains the contents of the 'parameters' map from the CustomModel specification. This function is called once on model load. We expect the implementation to return 'nil' and set an error in the event of failure initializing the object.
      • predictionsFromBatchOptionsError

        default MLBatchProvider predictionsFromBatchOptionsError​(MLBatchProvider inputBatch,
                                                                 MLPredictionOptions options,
                                                                 org.moe.natj.general.ptr.Ptr<NSError> error)
        Batch prediction with explicit options, if not implemented the single input predictionFromFeatures:options:error will be used