You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to refactor the MNL estimation code, which was originally brought over from urbansim.urbanchoice.mnl. It's been updated in places to provide additional estimation metrics and resolve deprecation warnings, but is mostly unchanged.
The code seems fast and reliable, but it's hard to use, hard to update, and appears to include some partial or extraneous functionality that would be nice to either remove or document and test (e.g. GPU acceleration, estimation weights, latent classes).
Roughly, the pieces are:
1. Probability calculation (mnl_probs)
Already refactored in MultinomialLogitResults.probabilities(), but that version may need to be adapted to accept numpy arrays instead of dataframes for faster iteration in the estimation stage.
2. Likelihood calculation (mnl_loglik)
Hardest part -- can be cleaned up similarly, with dependencies on the PMAT utility removed.
3. Orchestration of maximum likelihood estimation (mnl_estimate)
Pretty straightforward.
4. Calculation of estimation metrics (mnl_estimate)
Pretty straightforward.
5. Simulation (mnl_simulate)
Already refactored; now fully replaced by choicemodels.tools.simulation.
The text was updated successfully, but these errors were encountered:
It would be nice to refactor the MNL estimation code, which was originally brought over from
urbansim.urbanchoice.mnl
. It's been updated in places to provide additional estimation metrics and resolve deprecation warnings, but is mostly unchanged.The code seems fast and reliable, but it's hard to use, hard to update, and appears to include some partial or extraneous functionality that would be nice to either remove or document and test (e.g. GPU acceleration, estimation weights, latent classes).
Roughly, the pieces are:
1. Probability calculation (
mnl_probs
)Already refactored in
MultinomialLogitResults.probabilities()
, but that version may need to be adapted to accept numpy arrays instead of dataframes for faster iteration in the estimation stage.2. Likelihood calculation (
mnl_loglik
)Hardest part -- can be cleaned up similarly, with dependencies on the PMAT utility removed.
3. Orchestration of maximum likelihood estimation (
mnl_estimate
)Pretty straightforward.
4. Calculation of estimation metrics (
mnl_estimate
)Pretty straightforward.
5. Simulation (
mnl_simulate
)Already refactored; now fully replaced by
choicemodels.tools.simulation
.The text was updated successfully, but these errors were encountered: