Interface PredictiveModel

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface PredictiveModel
    ENTERPRISE EDITION API

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

    • Method Detail

      • predict

        @Nullable
        Dictionary predict​(@NonNull
                           Dictionary input)
        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.
        Parameters:
        input - The input dictionary.
        Returns:
        The output dictionary.