SoftmaxWeightedSumFitter.priors_from_data#
- SoftmaxWeightedSumFitter.priors_from_data(X, y)[source]#
Set data-dependent priors for logits and observation noise.
The Normal prior on the
N - 1unconstrained logits usessigma=1.0by default. The defaulty_hatprior uses an independentExponential(lam=2 / s_i)noise scale for each treated outcome, wheres_iis its sample standard deviation. A user-providedy_hatprior, or ay_hatdefault declared by a subclass, takes precedence; so doesSyntheticControl(auto_scale_sigma=False), which leaves the legacyHalfNormal(1)prior in place.Unlike
WeightedSumFitter.priors_from_data(), the Normal logit prior broadcasts automatically via itsdims, so the predictor shape is not needed.- Parameters:
X (xarray.DataArray) – Control unit data with shape (n_obs, n_control_units).
y (xarray.DataArray) – Treated unit outcome data.
- Returns:
Data-dependent
beta_rawand, when enabled,y_hatpriors.- Return type: