mixle.reason.task_projection module

Task-sufficient projection pi_T for receiver-specific beliefs.

A ModalityView can carry a full structured belief, while a receiver for task T may need only the smallest projection that preserves the distinctions relevant to that task. This module builds that operator on existing closed-form projection tools from mixle.inference.project: components that task cannot distinguish are moment-matched into one Gaussian, while components the task can distinguish are kept separate.

This is task-specific projection rather than generic compression. A projection built for one task should be validated before being reused for another.

class TaskReadout(name, label)[source]

Bases: object

Task readout used to decide which mixture components can be merged.

label(mean) maps a component mean to a discrete readout value. Components sharing a readout are indistinguishable for this task and may be merged; components with different readouts remain separate.

Parameters:
task_sufficient_projection(mixture, task)[source]

pi_T(mixture): collapse mixture’s components into groups sharing task.label.

Components are grouped by task.label(component_mean). Groups with more than one component are moment-matched by collapse_mixture(); singleton groups pass through unchanged. The result never has more components than the input.

Parameters:
  • mixture (Any)

  • task (TaskReadout)

Return type:

MixtureDistribution

read_out(mixture, task, x)[source]

Return the task label of the component most responsible for x.

The same readout applies to a full or projected belief, so a projection can be evaluated by the task labels it preserves.

Parameters:
  • mixture (Any)

  • task (TaskReadout)

  • x (Any)

Return type:

Hashable