NestedLogit.make_nest_probs#
- NestedLogit.make_nest_probs(U, lambdas, nest_indices, alphas_nest=None)[source]#
Calculate nest selection probabilities and conditional probabilities.
This computes: 1. P(nest) = exp(I_nest) / Σ exp(I_nest’) [nest selection probability] 2. P(y|nest) = exp(U_y/λ) / Σ_{j∈nest} exp(U_j/λ) [within-nest choice]
- Parameters:
- U
TensorVariable Systematic utility, shape (n_obs, n_alts)
- lambdas
TensorVariable Nest-specific lambda parameters
- nest_indices
dict Mapping of nest names to alternative indices
- U
- Returns: