Documentation
¶
Overview ¶
Package evaluate is the ontology's evaluate as a contract: compare a candidate's result with criteria chosen independently of the candidate. The criteria are a held-out set the evaluator owns; a candidate never supplies them. A csf build replayed on the rotated ticket suite and a decision model asked the committed tree questions are two evaluators of one shape, and csf eval score runs either through Each.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IEvaluator ¶
type IEvaluator[Candidate any, Result any] interface { Evaluate(ctx context.Context, candidate Candidate) (Result, error) }
IEvaluator measures one candidate against the held-out set it owns.
type Measured ¶
Measured is one candidate's row: its result, or the error that left it unmeasured.
func Each ¶
func Each[Candidate any, Result any](ctx context.Context, evaluator IEvaluator[Candidate, Result], candidates []Candidate) []Measured[Candidate, Result]
Each evaluates every candidate in order. A candidate the evaluator cannot measure fails its own row and never hides the others; a cancelled context fails every row not yet measured without asking the evaluator.