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 - 1 unconstrained logits uses sigma=1.0 by default. 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.

Unlike WeightedSumFitter.priors_from_data(), the Normal logit prior broadcasts automatically via its dims, so the predictor shape is not needed.

Parameters:
Returns:

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

Return type:

dict[str, Prior]