PredictiveModel

public protocol PredictiveModel

ENTERPRISE EDITION ONLY

PredictiveModel protocol that allows to integrate machine learning model into CBL Query via invoking the Function.prediction() function.

  • The prediction callback called when invoking the Function.prediction() function inside a query or an index. The input dictionary object’s keys and values will be corresponding to the ‘input’ dictionary parameter of theFunction.prediction() function.

    If the prediction callback cannot return a result, the prediction callback should return null value, which will be evaluated as MISSING.

    Declaration

    Swift

    func predict(input: DictionaryObject) -> DictionaryObject?

    Parameters

    input

    The input dictionary.

    Return Value

    The output dictionary.