MAIDR JavaScript API
    Preparing search index...
    • Binds a D3.js precision-recall curve to MAIDR.

      One <path> per classifier, recall along x and precision up y, read exactly as bindD3Line reads a line; the layer is announced as a precision-recall curve, so a reader hears each point's threshold, the average precision and the best F1, and how far each curve stands above the chance baseline its prevalence gives.

      Parameters

      • svg: Element

        The SVG element containing the D3 curve.

      • config: D3PrCurveConfig

        Configuration specifying selectors and data accessors.

      Returns D3BinderResult

      A D3BinderResult with the MAIDR data and generated layer.

      bindD3PrCurve(svgElement, {
      selector: 'path.pr',
      x: 'recall',
      y: 'precision',
      fill: 'model',
      threshold: 'threshold',
      prevalence: { Logistic: 0.3, Forest: 0.3 },
      });