setu.ValidationDataset#

class setu.ValidationDataset(theta, x, conditions=None)[source]#

Bases: object

Dataset for estimator validation with optional conditions.

Supports two modes: 1. Prior predictive: theta (n, theta_dim), x (n, x_dim) 2. Multi-trial: theta (n, theta_dim), x (n, n_trials, x_dim)

theta#

Parameter samples from prior.

x#

Observations from simulator (NOT from estimator).

conditions#

Optional experimental conditions matching theta. Shape (n, condition_dim). Required when the estimator was trained with conditions.

Parameters:
  • theta (Array)

  • x (Array)

  • conditions (Array | None)

property n: int#

Number of (theta, x) pairs.

property theta_dim: int#

Dimension of theta.

property x_dim: int#

Dimension of x (last axis).

property is_multitrial: bool#

Whether dataset has multiple trials per theta.

property n_trials: int | None#

Number of trials per theta (None if not multi-trial).

property condition_dim: int#

Dimension of conditions, or 0 if no conditions.

property has_conditions: bool#

Whether dataset includes conditions.

property appears_discrete: bool#

Check if x data appears to be discrete (integer-valued).

NLE only supports continuous data. For discrete or mixed data, use MixedNLE (Mixed Neural Likelihood Estimation) instead.