Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test stability #4

Open
wants to merge 4 commits into
base: estimation_enhancements
Choose a base branch
from

Conversation

jpn--
Copy link
Collaborator

@jpn-- jpn-- commented Dec 27, 2024

This pull request includes several changes to the activitysim/estimation module, primarily focusing on updating the larch version handling, modifying test cases, and adjusting model parameters.

The key change is applying a constraint on the trip model choice model, to solve an over specification problem and ensure the estimation results are stable.

The most important changes are grouped by their themes below.

Test Case Adjustments:

  • Added a condition in the test_location_model function to lock a parameter and set a cap for the "trip_destination" model to ensure model identifiability.
  • Modified the test_simple_simulate function in activitysim/estimation/test/test_larch_estimation.py to also use the "SLSQP" method for the "trip_destination" model. The SLSQP algorithm obeys constraints on parameter values, while the BHHH algorithm does not, yielding very different answers. Which is "better" depends on the modeler's opinion on the validity of the constraints.

Version Handling:

  • Updated the larch version check in activitysim/estimation/larch/__init__.py to handle development versions correctly.

Model Parameter Updates:

  • Updated the log-likelihood values in test_loc_trip_destination_BHHH_loglike.csv and test_loc_trip_destination_SLSQP_loglike.csv to reflect new model results. [1] [2]
  • Added new size specifications for the "trip_destination" model in test_loc_trip_destination_SLSQP_size_spec.csv.

CSV File Updates:

  • Updated parameter values in test_location_model_trip_destination_BHHH_None_.csv to reflect new model results.
  • Added a new CSV file test_location_model_trip_destination_SLSQP_None_.csv with updated parameter values for the "trip_destination" model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant