WeightedSumFitter.priors_from_data#
- WeightedSumFitter.priors_from_data(X, y)[source]#
Set data-dependent priors for weights and observation noise.
The Dirichlet weight prior is uniform across available control units. The default
y_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.- Parameters:
X (xarray.DataArray) – Control unit data with shape (n_obs, n_control_units).
y (xarray.DataArray) – Treated unit outcome data.
- Returns:
Data-dependent
betaand, when enabled,y_hatpriors.- Return type: