# `Nous.Eval.Optimizer.Evaluation`
[🔗](https://github.com/nyo16/nous/blob/v0.21.1/lib/nous/eval/optimizer/evaluation.ex#L1)

One candidate profile evaluated on a batch of cases: what
`c:Nous.Eval.Optimizer.Adapter.evaluate/3` returns.

  * `:profile_id` - the evaluated `Nous.Profile`'s id
  * `:split` - the split the batch was drawn from (`"train"`, `"val"`,
    `"test"`) or `"guard"` for the guard-tagged cases the feasibility
    filter runs
  * `:case_ids` - the batch, in order
  * `:scores` - case id => the case's objective: the mean of its samples'
    gated `case_score` (`Nous.Eval.Sample`), where a sample that errored
    or was not scored counts `0.0`. Errors never count as passes, and a
    case is never left out, so every candidate is scored on the same cases
  * `:status` - the run status (`:completed`, `:budget_exhausted`,
    `:aborted`); only a `:completed` evaluation is used for decisions
  * `:feedback` - the feedback policy its reflective records are rendered
    under (`:diagnostic` or `:with_expected`)
  * `:cases` - case id => `Nous.Eval.Case`, for the reflective records
  * `:run` - the `Nous.Eval.Run` behind it (samples, traces, summary)
  * `:metric_calls` / `:tokens` / `:cost` - what it spent: samples
    started, tokens, USD (`nil` when a request had no price)
  * `:private` - adapter-private data for `reflective_records/2`

# `split`

```elixir
@type split() :: String.t()
```

# `t`

```elixir
@type t() :: %Nous.Eval.Optimizer.Evaluation{
  case_ids: [String.t()],
  cases: %{required(String.t()) =&gt; Nous.Eval.Case.t()},
  cost: float() | nil,
  feedback: :diagnostic | :with_expected,
  metric_calls: non_neg_integer(),
  private: map(),
  profile_id: String.t() | nil,
  run: Nous.Eval.Run.t() | nil,
  scores: %{required(String.t()) =&gt; float()},
  split: split(),
  status: Nous.Eval.Run.status(),
  tokens: non_neg_integer()
}
```

# `mean`

```elixir
@spec mean(t()) :: float()
```

The mean per-case score; `0.0` for an empty batch.

# `take`

```elixir
@spec take(t(), [String.t()], split()) :: t()
```

The evaluation restricted to `case_ids` (scores, cases and the run's
samples). Used to read the guard-tagged cases out of a test evaluation.

# `total`

```elixir
@spec total(t()) :: float()
```

The sum of the per-case scores (GEPA's minibatch objective).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
