NestedLogitPreprocessedData#
- class pymc_marketing.customer_choice.nested_logit.NestedLogitPreprocessedData(X, F, y, alternatives, fixed_covar, coords, prod_indices, nest_indices, all_nests, lambda_lkup)[source]#
Arrays and metadata built from choice data before a model is created.
- Attributes:
- X
np.ndarray Alternative-specific covariates of shape
(n_obs, n_alts, n_covariates).- F
np.ndarrayorNone Fixed covariates of shape
(n_obs, n_fixed_covariates), orNonewhen the utility equations have no fixed covariates.- y
np.ndarray Encoded choices of shape
(n_obs,).- alternatives
listofstr Alternative names in utility-equation order.
- fixed_covar
np.ndarray Unique fixed-covariate names taken from the utility equations.
- coords
dict Coordinates for the PyMC model.
- prod_indices
dictofstrtoint Mapping from alternative name to its encoded index.
- nest_indices
dictofstrtonp.ndarray Flat mapping from nest name to sorted alternative indices.
- all_nests
listofstr Nest names in the order they appear in the nesting structure.
- lambda_lkup
dictofstrtoint Mapping from nest name to its lambda index.
- X
Methods
NestedLogitPreprocessedData.__init__(X, F, ...)Attributes