# `Dsxir.Example`

A labeled example used as input to optimizers and to the demo channel.

Carries an `inputs` map and a `labels` map. The `input_keys` set determines
which keys in the unified `data` view are inputs; the rest are labels.

# `t`

```elixir
@type t() :: %Dsxir.Example{data: map(), input_keys: MapSet.t()}
```

# `inputs`

```elixir
@spec inputs(t()) :: map()
```

Project `data` down to the input fields only.

# `labels`

```elixir
@spec labels(t()) :: map()
```

Project `data` down to the label fields (the complement of the inputs).

# `new`

```elixir
@spec new(
  map(),
  keyword()
) :: t()
```

Build an example from `data`. Pass `:input_keys` in `opts` to mark which keys
are inputs; everything else is treated as a label.

# `with_inputs`

```elixir
@spec with_inputs(t(), [atom()]) :: t()
```

Replace the example's input-key set with `keys`.

---

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