@arizeai/phoenix-evals
Version:
A library for running evaluations for AI use cases
22 lines • 1.02 kB
TypeScript
import type { EvaluatorBase } from "../core/EvaluatorBase";
import type { ClassificationExample, PrecisionRecallFScoreOptions } from "./classificationMetrics";
/**
* 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