Note
Go to the end to download the full example code.
19. Calculation of individual level parametersΒΆ
Calculation of the individual level parameters for the model defined in 5. Mixture of logit models: normal distribution.
Michel Bierlaire, EPFL Mon Nov 17 2025, 18:59:56
from IPython.core.display_functions import display
from biogeme.bayesian_estimation import BayesianResults
Retrieve estimation results
result_file_name = 'saved_results/b05_normal_mixture.nc'
the_estimation_results = BayesianResults.from_netcdf(filename=result_file_name)
load finished in 9732 ms (9.73 s)
With Bayesian estimation, the individual-level parameters are automatically generated. We simply retrieve them from estimation results.
sim = the_estimation_results.posterior_mean_by_observation(var_name='b_time_rnd')
display(sim)
b_time_rnd
obs
0 -2.700321
1 -2.707648
2 -2.789338
3 -2.523579
4 -2.652483
... ...
6763 -1.349442
6764 -1.225173
6765 -1.192921
6766 -0.839448
6767 -1.303646
[6768 rows x 1 columns]
Total running time of the script: (0 minutes 9.942 seconds)