bartz.testing.gen_data_from_params

bartz.testing.gen_data_from_params(key, params, *, n)[source]

Sample predictors and outcomes given fixed params.

The outputs z and y have shape (k, n), or (n,) if params is univariate (params.partition is None).

Parameters:
  • key (Key[Array, '']) – JAX random key.

  • params (Params) – DGP parameters from gen_params.

  • n (int) – Number of observations.

Returns:

DGP – A DGP object with params and the sampled data.