PredictionRecordable

@available(iOS 11.0, *)
public protocol PredictionRecordable : FritzPredictable where Self.PredictionInput : Base64StringEncodable

Adds functionality to record annotated model predictions.

You can record prediction results as a way to collect data on model performance.

  • Annotation Representation can be different than the PredictionResult type. More processing may happen for the PredictionResult to represent an annotation. For example, the FritzVisionPosePredictor returns a PoseResult type; however, the pose can look different depending on different thresholds passed to the pose result.

    Declaration

    Swift

    associatedtype AnnotationRepresentation : AnnotationRepresentable where Self.PredictionInput == Self.AnnotationRepresentation.Source
  • Declaration

    Swift

    var model: FritzMLModel { get }
  • Reports the results of a prediction to Fritz API used for collecting diagnostic data on model predictions.

    Declaration

    Swift

    func record(_ input: PredictionInput, predicted predictedRepresentation: AnnotationRepresentation, modified modifiedRepresentation: AnnotationRepresentation?) -> SessionEvent?

    Parameters

    input

    Prediction input.

    predictedRepresentation

    Results from model prediction (after postprocessing from result class has been applied).

    modifiedRepresentation

    Optional user-modified results from predictions.