@arizeai/phoenix-evals
Version:
A library for running evaluations for AI use cases
23 lines • 1.19 kB
TypeScript
import type { EvaluatorBase } from "../core/EvaluatorBase";
import type { ClassificationExample, PrecisionRecallFScoreOptions } from "./classificationMetrics";
export interface PrecisionRecallFScoreEvaluators<RecordType extends ClassificationExample> {
precision: EvaluatorBase<RecordType>;
recall: EvaluatorBase<RecordType>;
fScore: EvaluatorBase<RecordType>;
}
/**
* Creates matching precision, recall, and F-beta evaluators from a single set
* of options, so all three are computed with the same `average`, `beta`,
* `positiveLabel`, and `zeroDivision` settings. When the same `expected`/
* `output` example object is passed to all three evaluators, the underlying
* confusion matrix is only computed once and shared across them.
*
* @example
* ```typescript
* const { precision, recall, fScore } = createPrecisionRecallFScoreEvaluators({
* average: "weighted",
* });
* ```
*/
export declare function createPrecisionRecallFScoreEvaluators<RecordType extends ClassificationExample = ClassificationExample>(options?: PrecisionRecallFScoreOptions): PrecisionRecallFScoreEvaluators<RecordType>;
//# sourceMappingURL=createPrecisionRecallFScoreEvaluators.d.ts.map