traveler.steps.SampleHouseholds#

class traveler.steps.SampleHouseholds(n, seed=42, use_jax=False)[source]#

Bases: Step

Sample households from the store.

Parameters:
  • n (int) – Number of households to sample.

  • seed (int, optional) – Random seed for reproducibility, by default 42.

  • use_jax (bool)

Methods#

run_on(store)

Sample households using the configured execution backend.

run_via_jax(store)

Sample households and related records using JAX indexing.

run_via_pandas(store)

Sample households and related records using pandas and NumPy.

run_via_polars(store)

Sample households and related records using Polars.