Skip to content

Commit

Permalink
test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Dec 7, 2024
1 parent 024a9e2 commit d84452c
Show file tree
Hide file tree
Showing 43 changed files with 596 additions and 598 deletions.
4 changes: 2 additions & 2 deletions activitysim/estimation/test/test_larch_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_location_model(
r = m.maximize_loglike(method=method, options={"maxiter": 1000, "ftol": 1.0e-8})
num_regression.check(
{"loglike_prior": loglike_prior, "loglike_converge": r.loglike},
basename=f"test_loc_{name}_loglike",
basename=f"test_loc_{name}_{method}_loglike",
)
_regression_check(dataframe_regression, m.pf, rtol=rtol)
size_spec = update_size_spec(
Expand All @@ -121,7 +121,7 @@ def test_location_model(
)
dataframe_regression.check(
size_spec,
basename=f"test_loc_{name}_size_spec",
basename=f"test_loc_{name}_{method}_size_spec",
default_tolerance=dict(atol=1e-6, rtol=5e-2)
# set a little loose, as there is sometimes a little variance in these
# results when switching backend implementations.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
,loglike_prior,loglike_converge
0,-1295.3015770898169,-175.64109886722656
0,-185.1805538740314,-163.38981780168791
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
,loglike_prior,loglike_converge
0,-2334.2258751965092,-2329.8700459477177
0,-1604.7051182769926,-inf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
10,othmaint,non_mandatory,0,0.48199999999999998,0,0.51800000000000002,0,0,0,0,0,0,0
11,social,non_mandatory,0,0.52200000000000002,0,0.47799999999999998,0,0,0,0,0,0,0
12,othdiscr,non_mandatory,0.25225225225225223,0.2122122122122122,0,0.2722722722722723,0.16516516516516516,0,0,0,0.098098098098098108,0,0
13,atwork,atwork,0,0.80359528369795752,0,0.19640471630204245,0,0,0,0,0,0,0
13,atwork,atwork,0,0.74200000026751467,0,0.25799999973248539,0,0,0,0,0,0,0
14,work,trip,0,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0,0,0,0
15,escort,trip,0.001,0.22500000000000001,0,0.14399999999999999,0,0,0,0.46400000000000002,0.16600000000000001,0,0
16,shopping,trip,0.001,0.999,0,0,0,0,0,0,0,0,0
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
,loglike_prior,loglike_converge
0,-12819.670044726949,-12802.203974292237
0,-8511.5032542114423,-7720.5833427253137
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
4,university,school,0,0,0,0,0,0,0,0,0,0.59199999999999997,0.40799999999999997
5,gradeschool,school,0,0,0,0,0,0,0,1,0,0,0
6,highschool,school,0,0,0,0,0,0,0,0,1,0,0
7,escort,non_mandatory,0,0.34128553976569614,0,0.12918985804046851,0,0,0,0.46780581583922293,0.061718786354612518,0,0
7,escort,non_mandatory,0,0.46217099216294472,0,0.076417211673566368,0,0,0,0.45632020794852418,0.0050915882149647294,0,0
8,shopping,non_mandatory,0,1,0,0,0,0,0,0,0,0,0
9,eatout,non_mandatory,0,0.65062776177234549,0,0.34937223822765445,0,0,0,0,0,0,0
10,othmaint,non_mandatory,0,0.42627119895444732,0,0.57372880104555268,0,0,0,0,0,0,0
11,social,non_mandatory,0,0.4146539625779378,0,0.58534603742206226,0,0,0,0,0,0,0
12,othdiscr,non_mandatory,0.29566720762852267,0.27478075569788274,0,0.23802014421802289,0.11869544174746863,0,0,0,0.072836450708103184,0,0
9,eatout,non_mandatory,0,0.90706301951236668,0,0.092936980487633311,0,0,0,0,0,0,0
10,othmaint,non_mandatory,0,0.93116571483751687,0,0.068834285162483244,0,0,0,0,0,0,0
11,social,non_mandatory,0,0.92391195421170202,0,0.076088045788297989,0,0,0,0,0,0,0
12,othdiscr,non_mandatory,0.52511273726308272,0.27498108262234988,0,0.023448766399240456,0.15609458779050345,0,0,0,0.020362825924823438,0,0
13,atwork,atwork,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
14,work,trip,0,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0,0,0,0
15,escort,trip,0.001,0.22500000000000001,0,0.14399999999999999,0,0,0,0.46400000000000002,0.16600000000000001,0,0
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
,loglike_prior,loglike_converge
0,-3150.9027927232128,-2472.1256126886806
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
,segment,model_selector,TOTHH,RETEMPN,FPSEMPN,HEREMPN,OTHEMPN,AGREMPN,MWTEMPN,AGE0519,HSENROLL,COLLFTE,COLLPTE
0,work_low,workplace,0,0.12912912912912911,0.19319319319319317,0.38338338338338335,0.12012012012012011,0.01001001001001001,0.16416416416416416,0,0,0,0
1,work_med,workplace,0,0.12012012012012012,0.19719719719719719,0.32532532532532532,0.13913913913913914,0.0080080080080080079,0.21021021021021019,0,0,0,0
2,work_high,workplace,0,0.11,0.20699999999999999,0.28399999999999997,0.154,0.0060000000000000001,0.23899999999999999,0,0,0,0
3,work_veryhigh,workplace,0,0.092999999999999999,0.27000000000000002,0.24099999999999999,0.14599999999999999,0.0040000000000000001,0.246,0,0,0,0
4,university,school,0,0,0,0,0,0,0,0,0,1,0
5,gradeschool,school,0,0,0,0,0,0,0,1,0,0,0
6,highschool,school,0,0,0,0,0,0,0,0,1,0,0
7,escort,non_mandatory,0,0.22500000000000001,0,0.14399999999999999,0,0,0,0.46500000000000002,0.16600000000000001,0,0
8,shopping,non_mandatory,0,1,0,0,0,0,0,0,0,0,0
9,eatout,non_mandatory,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
10,othmaint,non_mandatory,0,0.48199999999999998,0,0.51800000000000002,0,0,0,0,0,0,0
11,social,non_mandatory,0,0.52200000000000002,0,0.47799999999999998,0,0,0,0,0,0,0
12,othdiscr,non_mandatory,0.25225225225225223,0.2122122122122122,0,0.2722722722722723,0.16516516516516516,0,0,0,0.098098098098098108,0,0
13,atwork,atwork,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
14,work,trip,0,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0,0,0,0
15,escort,trip,0.001,0.22500000000000001,0,0.14399999999999999,0,0,0,0.46400000000000002,0.16600000000000001,0,0
16,shopping,trip,0.001,0.999,0,0,0,0,0,0,0,0,0
17,eatout,trip,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
18,othmaint,trip,0.001,0.48099999999999998,0,0.51800000000000002,0,0,0,0,0,0,0
19,social,trip,0.001,0.52100000000000002,0,0.47799999999999998,0,0,0,0,0,0,0
20,othdiscr,trip,0.25225225225225223,0.2122122122122122,0,0.2722722722722723,0.16516516516516516,0,0,0,0.098098098098098108,0,0
21,univ,trip,0.00099900099900099922,0,0,0,0,0,0,0,0,0.59140859140859148,0.40759240759240761
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
,loglike_prior,loglike_converge
0,-3150.9027927232128,-2472.5944704127669
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
,segment,model_selector,TOTHH,RETEMPN,FPSEMPN,HEREMPN,OTHEMPN,AGREMPN,MWTEMPN,AGE0519,HSENROLL,COLLFTE,COLLPTE
0,work_low,workplace,0,0.12912912912912911,0.19319319319319317,0.38338338338338335,0.12012012012012011,0.01001001001001001,0.16416416416416416,0,0,0,0
1,work_med,workplace,0,0.12012012012012012,0.19719719719719719,0.32532532532532532,0.13913913913913914,0.0080080080080080079,0.21021021021021019,0,0,0,0
2,work_high,workplace,0,0.11,0.20699999999999999,0.28399999999999997,0.154,0.0060000000000000001,0.23899999999999999,0,0,0,0
3,work_veryhigh,workplace,0,0.092999999999999999,0.27000000000000002,0.24099999999999999,0.14599999999999999,0.0040000000000000001,0.246,0,0,0,0
4,university,school,0,0,0,0,0,0,0,0,0,0.99583037710619249,0.004169622893807531
5,gradeschool,school,0,0,0,0,0,0,0,1,0,0,0
6,highschool,school,0,0,0,0,0,0,0,0,1,0,0
7,escort,non_mandatory,0,0.22500000000000001,0,0.14399999999999999,0,0,0,0.46500000000000002,0.16600000000000001,0,0
8,shopping,non_mandatory,0,1,0,0,0,0,0,0,0,0,0
9,eatout,non_mandatory,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
10,othmaint,non_mandatory,0,0.48199999999999998,0,0.51800000000000002,0,0,0,0,0,0,0
11,social,non_mandatory,0,0.52200000000000002,0,0.47799999999999998,0,0,0,0,0,0,0
12,othdiscr,non_mandatory,0.25225225225225223,0.2122122122122122,0,0.2722722722722723,0.16516516516516516,0,0,0,0.098098098098098108,0,0
13,atwork,atwork,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
14,work,trip,0,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0,0,0,0
15,escort,trip,0.001,0.22500000000000001,0,0.14399999999999999,0,0,0,0.46400000000000002,0.16600000000000001,0,0
16,shopping,trip,0.001,0.999,0,0,0,0,0,0,0,0,0
17,eatout,trip,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
18,othmaint,trip,0.001,0.48099999999999998,0,0.51800000000000002,0,0,0,0,0,0,0
19,social,trip,0.001,0.52100000000000002,0,0.47799999999999998,0,0,0,0,0,0,0
20,othdiscr,trip,0.25225225225225223,0.2122122122122122,0,0.2722722722722723,0.16516516516516516,0,0,0,0.098098098098098108,0,0
21,univ,trip,0.00099900099900099922,0,0,0,0,0,0,0,0,0.59140859140859148,0.40759240759240761
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
,loglike_prior,loglike_converge
0,-4070.349038545839,-4058.2217927321499
0,-3150.9027927232128,-2472.12561268868057596
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
,segment,model_selector,TOTHH,RETEMPN,FPSEMPN,HEREMPN,OTHEMPN,AGREMPN,MWTEMPN,AGE0519,HSENROLL,COLLFTE,COLLPTE
0,work_low,workplace,0,0.12912912912912916,0.19319319319319325,0.38338338338338335,0.12012012012012015,0.010010010010010012,0.1641641641641641,0,0,0,0
1,work_med,workplace,0,0.12012012012012013,0.19719719719719711,0.32532532532532538,0.13913913913913917,0.0080080080080080097,0.21021021021021022,0,0,0,0
0,work_low,workplace,0,0.12912912912912911,0.19319319319319317,0.38338338338338335,0.12012012012012011,0.01001001001001001,0.16416416416416416,0,0,0,0
1,work_med,workplace,0,0.12012012012012012,0.19719719719719719,0.32532532532532532,0.13913913913913914,0.0080080080080080079,0.21021021021021019,0,0,0,0
2,work_high,workplace,0,0.11,0.20699999999999999,0.28399999999999997,0.154,0.0060000000000000001,0.23899999999999999,0,0,0,0
3,work_veryhigh,workplace,0,0.092999999999999999,0.27000000000000002,0.24099999999999999,0.14599999999999999,0.0040000000000000001,0.246,0,0,0,0
4,university,school,0,0,0,0,0,0,0,0,0,0.66488586546020301,0.33511413453979705
4,university,school,0,0,0,0,0,0,0,0,0,0.99583037710619249,0.004169622893807531
5,gradeschool,school,0,0,0,0,0,0,0,1,0,0,0
6,highschool,school,0,0,0,0,0,0,0,0,1,0,0
7,escort,non_mandatory,0,0.22500000000000001,0,0.14399999999999999,0,0,0,0.46500000000000002,0.16600000000000001,0,0
Expand All @@ -14,10 +14,10 @@
12,othdiscr,non_mandatory,0.25225225225225223,0.2122122122122122,0,0.2722722722722723,0.16516516516516516,0,0,0,0.098098098098098108,0,0
13,atwork,atwork,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
14,work,trip,0,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0.16666666666666666,0,0,0,0
15,escort,trip,0.0010000000000000002,0.22500000000000003,0,0.14400000000000002,0,0,0,0.46399999999999997,0.16600000000000004,0,0
15,escort,trip,0.001,0.22500000000000001,0,0.14399999999999999,0,0,0,0.46400000000000002,0.16600000000000001,0,0
16,shopping,trip,0.001,0.999,0,0,0,0,0,0,0,0,0
17,eatout,trip,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
18,othmaint,trip,0.001,0.48099999999999998,0,0.51800000000000002,0,0,0,0,0,0,0
19,social,trip,0.001,0.52100000000000002,0,0.47799999999999998,0,0,0,0,0,0,0
20,othdiscr,trip,0.25225225225225223,0.2122122122122122,0,0.2722722722722723,0.16516516516516516,0,0,0,0.098098098098098108,0,0
21,univ,trip,0.000999000999000999,0,0,0,0,0,0,0,0,0.59140859140859148,0.4075924075924075
21,univ,trip,0.00099900099900099922,0,0,0,0,0,0,0,0,0.59140859140859148,0.40759240759240761
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
,loglike_prior,loglike_converge
0,-27955.701054850175,-12535.49004319853
0,-21837.014551855944,-8695.4742987000536
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
11,social,non_mandatory,0,0.52200000000000002,0,0.47799999999999998,0,0,0,0,0,0,0
12,othdiscr,non_mandatory,0.25225225225225223,0.2122122122122122,0,0.2722722722722723,0.16516516516516516,0,0,0,0.098098098098098108,0,0
13,atwork,atwork,0,0.74199999999999999,0,0.25800000000000001,0,0,0,0,0,0,0
14,work,trip,0,0.21453452233149134,7.8312759955131374e-224,5.1881592679154066e-17,0.0033112045520065185,0.78083535157619177,0.0013189215403103763,0,0,0,0
15,escort,trip,0.073538135661017204,0.25577978643167126,0,5.8110165204707204e-22,0,0,0,0.54162794149603255,0.12905413641127891,0,0
16,shopping,trip,0.9999999999857464,1.4253578326227787e-11,0,0,0,0,0,0,0,0,0
14,work,trip,0,0.50988404412746136,2.8830314727604896e-146,0,1.2350245131417982e-12,0.48708399966352267,0.0030319562077810091,0,0,0,0
15,escort,trip,0.99999999999752021,4.6306836616861319e-13,0,1.8807680387063182e-13,0,0,0,1.4480163162588933e-12,3.8063890886682389e-13,0,0
16,shopping,trip,0.99999999865706501,1.3429349752304603e-09,0,0,0,0,0,0,0,0,0
17,eatout,trip,0,1,0,0,0,0,0,0,0,0,0
18,othmaint,trip,0.35622813028957523,0.64377186971042477,0,0,0,0,0,0,0,0,0
19,social,trip,6.4178466648126008e-199,1,0,0,0,0,0,0,0,0,0
20,othdiscr,trip,0.27807259581589083,0.7102089131709487,0,0,0.011718491013160368,0,0,0,0,0,0
21,univ,trip,0.82174659668559036,0,0,0,0,0,0,0,0,0.17825340331440975,1.7355236433582486e-57
18,othmaint,trip,0.99999999998646205,9.0646768310272159e-12,0,4.4735228850332918e-12,0,0,0,0,0,0,0
19,social,trip,0.99999999999998024,1.5851156966866637e-14,0,3.8443449490946144e-15,0,0,0,0,0,0,0
20,othdiscr,trip,0.96881871015685461,0.031181191433995798,0,0,0,0,0,0,9.8409149668972833e-08,0,0
21,univ,trip,1,0,0,0,0,0,0,0,0,4.8326974397473536e-21,0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
,loglike_prior,loglike_converge
0,-13535.154993647677,-13521.083881201219
0,-8694.1663931267794,-7268.5499545875718
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
,segment,model_selector,TOTHH,RETEMPN,FPSEMPN,HEREMPN,OTHEMPN,AGREMPN,MWTEMPN,AGE0519,HSENROLL,COLLFTE,COLLPTE
0,work_low,workplace,0,0.056898822400224258,0.16676179953310313,0.36544384846451899,0.16450888091216953,0.0043859168180086323,0.24200073187197552,0,0,0,0
1,work_med,workplace,0,0.11942746513016811,0.14173152177898185,0.25079987664849879,0.077792239309910707,0.0078467323630963884,0.40240216476934404,0,0,0,0
2,work_high,workplace,0,0.16111282637795249,0.19555410050008792,0.30097064566079329,0.17334600029470862,0.008788593670917208,0.1602278334955404,0,0,0,0
3,work_veryhigh,workplace,0,0.13417639495734263,0.24057504780347075,0.27125408487402614,0.11519033401960825,0.005794210275657523,0.23300992806989479,0,0,0,0
0,work_low,workplace,0,0.81009695995589714,0.015566120986122242,0.038205865646079792,0.059310593251792124,0.061254339173986733,0.015566120986122242,0,0,0,0
1,work_med,workplace,0,0.8281013406144393,0.017105484027381986,0.031082288899413148,0.052366292140338909,0.054239110291044855,0.017105484027382,0,0,0,0
2,work_high,workplace,0,0.83264652845133025,0.018762949054789986,0.021130105260407248,0.064579726133974238,0.044117742044708114,0.018762949054789986,0,0,0,0
3,work_veryhigh,workplace,0,0.85877445882802128,0.022889127413081023,0.032513950668635973,0.027093642194477335,0.035839693482703265,0.022889127413081023,0,0,0,0
4,university,school,0,0,0,0,0,0,0,0,0,0.59199999999999997,0.40799999999999997
5,gradeschool,school,0,0,0,0,0,0,0,1,0,0,0
6,highschool,school,0,0,0,0,0,0,0,0,1,0,0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param_name,value,initvalue,nullvalue,minimum,maximum,best
atwork_HEREMPN,-1.7073243906685389,-1.3547956940605197,0,-6,6,-1.7073243906685389
atwork_RETEMPN,-0.29840603581475661,-0.29840603581475661,0,-0.29840603581475661,-0.29840603581475661,-0.29840603581475661
coef_distance_piecewise_linear_for_15_plus_miles,-0.20450000000000218,-0.20449999999999999,0,-25,25,-0.20450000000000218
coef_distance_piecewise_linear_from_0_to_1_miles,-1.3641542578406347,-0.79259999999999997,0,-25,25,-1.3641542578406347
coef_distance_piecewise_linear_from_1_to_2_miles,-0.73953227083074224,-0.79259999999999997,0,-25,25,-0.73953227083074224
coef_distance_piecewise_linear_from_2_to_5_miles,-0.50452550250971084,-0.51970000000000005,0,-25,25,-0.50452550250971084
coef_distance_piecewise_linear_from_5_to_15_miles,-0.073402957716087874,-0.20449999999999999,0,-25,25,-0.073402957716087874
coef_mode_choice_logsum,0.50327067752307442,0.51359999999999995,0,-25,25,0.50327067752307442
coef_no_attractions_atwork_size_variable_is_0,-999,-999,0,-999,-999,-999
coef_sample_of_alternatives_correction_factor,1,1,0,1,1,1
param_name,value,best,initvalue,nullvalue
atwork_HEREMPN,-1.3547956943511963,-1.3547956943511963,-1.3547956943511963,0
atwork_RETEMPN,-0.29840603470802307,-0.29840603470802307,-0.29840603470802307,0
coef_distance_piecewise_linear_for_15_plus_miles,-0.20450000464916229,-0.20450000464916229,-0.20450000464916229,0
coef_distance_piecewise_linear_from_0_to_1_miles,-0.79259997606277466,-0.79259997606277466,-0.79259997606277466,0
coef_distance_piecewise_linear_from_1_to_2_miles,-0.79259997606277466,-0.79259997606277466,-0.79259997606277466,0
coef_distance_piecewise_linear_from_2_to_5_miles,-0.51969999074935913,-0.51969999074935913,-0.51969999074935913,0
coef_distance_piecewise_linear_from_5_to_15_miles,-0.20450000464916229,-0.20450000464916229,-0.20450000464916229,0
coef_mode_choice_logsum,0.51359999179840088,0.51359999179840088,0.51359999179840088,0
coef_no_attractions_atwork_size_variable_is_0,-999,-999,-999,0
coef_sample_of_alternatives_correction_factor,1,1,1,0
Loading

0 comments on commit d84452c

Please sign in to comment.