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_hat prior uses an independent Exponential(lam=2 / s_i) noise scale for each treated outcome, where s_i is its sample standard deviation. A user-provided y_hat prior, or a y_hat default declared by a subclass, takes precedence; so does SyntheticControl(auto_scale_sigma=False), which leaves the legacy HalfNormal(1) prior in place.

Parameters:
Returns:

Data-dependent beta and, when enabled, y_hat priors.

Return type:

dict[str, Prior]