UNPKG

@arizeai/phoenix-evals

Version:
22 lines 1.02 kB
import type { EvaluatorBase } from "../core/EvaluatorBase.js"; import type { ClassificationExample, PrecisionRecallFScoreOptions } from "./classificationMetrics.js"; /** * Creates a code evaluator that computes recall: of the labels that actually * belong to a given class, the fraction the model correctly predicted. * * Supports binary classification (via `positiveLabel`, or auto-detected when * `average` is at its default `"macro"` and labels are the numeric set * `{0, 1}`) and multi-class classification (via the `average` strategy). * * @example * ```typescript * const recall = createRecallEvaluator(); * const result = await recall.evaluate({ * expected: ["cat", "dog", "cat", "bird"], * output: ["cat", "cat", "cat", "bird"], * }); * // { score: 2/3 } * ``` */ export declare function createRecallEvaluator<RecordType extends ClassificationExample = ClassificationExample>(options?: PrecisionRecallFScoreOptions): EvaluatorBase<RecordType>; //# sourceMappingURL=createRecallEvaluator.d.ts.map