evaluate

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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

type Measured[Candidate any, Result any] struct {
	Candidate Candidate
	Result    Result
	Err       error
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL