Skip to content

Commit

Permalink
additional baseline variant
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Sep 3, 2024
1 parent cf7a3db commit 06b592a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
41 changes: 41 additions & 0 deletions input/v6.3/params/baseline_v3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#Modes: ['walk', 'pt', 'car', 'bike', 'ride']
#Number of plans: 8259
#Number of choices for plan: 70
#Number of choices: 8259
# Using fixed utility for car 0.0
# Estimating car asc, instead of daily utility
# Using MXL modes ['car']
# Results for model plan-choices-subtour_70_exp_income_price_perception_car_price_perception_pt
#Nbr of parameters: 6
#Sample size: 8259
#Excluded data: 0
#Null log likelihood: -24858.3
#Final log likelihood: -19682.68
#Likelihood ratio test (null): 10351.23
#Rho square (null): 0.208
#Rho bar square (null): 0.208
#Akaike Information Criterion: 39377.37
#Bayesian Information Criterion: 39419.48
# Value Rob. Std err Rob. t-test Rob. p-value
# ASC_bike -0.871526 0.019601 -44.464412 0.00000
# ASC_car -1.009763 0.038571 -26.179679 0.00000
# ASC_pt -0.492061 0.027867 -17.657342 0.00000
# ASC_ride -1.405401 0.033764 -41.624197 0.00000
# BETA_CAR_PRICE_PERCEPTION 0.161433 0.012282 13.143985 0.00000
# EXP_INCOME 0.138746 0.032526 4.265680 0.00002

scoring:
scoringParameters:
- performing: 5.462690
marginalUtilityOfMoney: 0.619586
modeParams:
- mode: walk
constant: 0
- mode: car
constant: 0
dailyMonetaryConstant: -2.3084919
- mode: pt
constant: 0
dailyMonetaryConstant: -0.484299
advancedScoring:
incomeExponent: 0.138746
10 changes: 8 additions & 2 deletions src/main/python/choicemodels/estimate_biogeme_plan_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
parser.add_argument("--performing", help="Beta for performing", type=float, default=6.88)
parser.add_argument("--est-exp-income", help="Estimate exponent for income", action="store_true")
parser.add_argument("--exp-income", help="Exponent for income", type=float, default=1)
parser.add_argument("--util-money", help="Utility of money", type=float, default=1)
parser.add_argument("--est-util-money", help="Estimate utility of money", action="store_true")
parser.add_argument("--est-price-perception-car", help="Estimate price perception", action="store_true")
parser.add_argument("--est-price-perception-pt", help="Estimate price perception", action="store_true")
parser.add_argument("--same-price-perception", help="Only estimate one fixed price perception factor", action="store_true")
parser.add_argument("--ascs", help="Predefined ASCs", nargs="+", action='append', default=[])
parser.add_argument("--car-util", help="Fixed utility for car", type=float, default=None)
parser.add_argument("--no-mxl", help="Disable mixed logit", action="store_true")
Expand Down Expand Up @@ -62,11 +64,15 @@
# Factor on marginal utility of money
EXP_INCOME = Beta('EXP_INCOME', args.exp_income, 0, 1.5, ESTIMATE if args.est_exp_income else FIXED)

UTIL_MONEY = Beta('UTIL_MONEY', 1, 0, 2, ESTIMATE if args.est_util_money else FIXED)
UTIL_MONEY = Beta('UTIL_MONEY', args.util_money, 0, 2, ESTIMATE if args.est_util_money else FIXED)

BETA_PERFORMING = Beta('BETA_PERFORMING', args.performing, 1, 15, ESTIMATE if args.est_performing else FIXED)
BETA_CAR_PRICE_PERCEPTION = Beta('BETA_CAR_PRICE_PERCEPTION', 1, 0, 1, ESTIMATE if args.est_price_perception_car else FIXED)
BETA_PT_PRICE_PERCEPTION = Beta('BETA_PT_PRICE_PERCEPTION', 1, 0, 1, ESTIMATE if args.est_price_perception_pt else FIXED)

if args.same_price_perception:
BETA_PT_PRICE_PERCEPTION = BETA_CAR_PRICE_PERCEPTION
else:
BETA_PT_PRICE_PERCEPTION = Beta('BETA_PT_PRICE_PERCEPTION', 1, 0, 1, ESTIMATE if args.est_price_perception_pt else FIXED)

is_est_car = "car" in args.mxl_modes

Expand Down

0 comments on commit 06b592a

Please sign in to comment.