.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/programmers/plot_biogeme.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_programmers_plot_biogeme.py: biogeme.biogeme =============== Examples of use of several functions. This is designed for programmers who need examples of use of the functions of the module. The examples are designed to illustrate the syntax. They do not correspond to any meaningful model. :author: Michel Bierlaire :date: Thu Nov 16 18:36:35 2023 .. GENERATED FROM PYTHON SOURCE LINES 15-24 .. code-block:: Python import biogeme.version as ver import biogeme.biogeme as bio import biogeme.database as db import pandas as pd from biogeme.expressions import Beta, Variable, exp import biogeme.biogeme_logging as blog from biogeme.function_output import BiogemeFunctionOutput .. GENERATED FROM PYTHON SOURCE LINES 25-26 Version of Biogeme. .. GENERATED FROM PYTHON SOURCE LINES 26-29 .. code-block:: Python print(ver.get_text()) .. rst-class:: sphx-glr-script-out .. code-block:: none biogeme 3.2.14 [2024-08-05] Home page: http://biogeme.epfl.ch Submit questions to https://groups.google.com/d/forum/biogeme Michel Bierlaire, Transport and Mobility Laboratory, Ecole Polytechnique Fédérale de Lausanne (EPFL) .. GENERATED FROM PYTHON SOURCE LINES 30-31 Logger. .. GENERATED FROM PYTHON SOURCE LINES 31-35 .. code-block:: Python logger = blog.get_screen_logger(level=blog.INFO) logger.info('Logger initialized') .. rst-class:: sphx-glr-script-out .. code-block:: none Logger initialized .. GENERATED FROM PYTHON SOURCE LINES 36-37 Definition of a database .. GENERATED FROM PYTHON SOURCE LINES 37-51 .. code-block:: Python df = pd.DataFrame( { 'Person': [1, 1, 1, 2, 2], 'Exclude': [0, 0, 1, 0, 1], 'Variable1': [1, 2, 3, 4, 5], 'Variable2': [10, 20, 30, 40, 50], 'Choice': [1, 2, 3, 1, 2], 'Av1': [0, 1, 1, 1, 1], 'Av2': [1, 1, 1, 1, 1], 'Av3': [0, 1, 1, 1, 1], } ) my_data = db.Database('test', df) .. GENERATED FROM PYTHON SOURCE LINES 52-53 Data .. GENERATED FROM PYTHON SOURCE LINES 53-56 .. code-block:: Python my_data.data .. raw:: html
Person Exclude Variable1 Variable2 Choice Av1 Av2 Av3
0 1 0 1 10 1 0 1 0
1 1 0 2 20 2 1 1 1
2 1 1 3 30 3 1 1 1
3 2 0 4 40 1 1 1 1
4 2 1 5 50 2 1 1 1


.. GENERATED FROM PYTHON SOURCE LINES 57-58 Definition of various expressions. .. GENERATED FROM PYTHON SOURCE LINES 58-66 .. code-block:: Python Variable1 = Variable('Variable1') Variable2 = Variable('Variable2') beta1 = Beta('beta1', -1.0, -3, 3, 0) beta2 = Beta('beta2', 2.0, -3, 10, 0) likelihood = -(beta1**2) * Variable1 - exp(beta2 * beta1) * Variable2 - beta2**4 simul = beta1 / Variable1 + beta2 / Variable2 dict_of_expressions = {'log_like': likelihood, 'beta1': beta1, 'simul': simul} .. GENERATED FROM PYTHON SOURCE LINES 67-68 Creation of the BIOGEME object. .. GENERATED FROM PYTHON SOURCE LINES 68-72 .. code-block:: Python my_biogeme = bio.BIOGEME(my_data, dict_of_expressions) my_biogeme.modelName = 'simple_example' print(my_biogeme) .. rst-class:: sphx-glr-script-out .. code-block:: none Default values of the Biogeme parameters are used. File biogeme.toml has been created simple_example: database [test]{'log_like': ((((-Beta('beta1', -1.0, -3, 3, 0)**2.0) * Variable1) - (exp((Beta('beta2', 2.0, -3, 10, 0) * Beta('beta1', -1.0, -3, 3, 0))) * Variable2)) - Beta('beta2', 2.0, -3, 10, 0)**4.0), 'beta1': Beta('beta1', -1.0, -3, 3, 0), 'simul': ((Beta('beta1', -1.0, -3, 3, 0) / Variable1) + (Beta('beta2', 2.0, -3, 10, 0) / Variable2))} .. GENERATED FROM PYTHON SOURCE LINES 73-74 The data is stored in the Biogeme object. .. GENERATED FROM PYTHON SOURCE LINES 74-76 .. code-block:: Python my_biogeme.database.data .. raw:: html
Person Exclude Variable1 Variable2 Choice Av1 Av2 Av3
0 1 0 1 10 1 0 1 0
1 1 0 2 20 2 1 1 1
2 1 1 3 30 3 1 1 1
3 2 0 4 40 1 1 1 1
4 2 1 5 50 2 1 1 1


.. GENERATED FROM PYTHON SOURCE LINES 77-78 Log likelihood with the initial values of the parameters. .. GENERATED FROM PYTHON SOURCE LINES 78-80 .. code-block:: Python my_biogeme.calculate_init_likelihood() .. rst-class:: sphx-glr-script-out .. code-block:: none -115.30029248549191 .. GENERATED FROM PYTHON SOURCE LINES 81-83 Calculate the log-likelihood with a different value of the parameters. We retieve the current value and add 1 to each of them. .. GENERATED FROM PYTHON SOURCE LINES 83-87 .. code-block:: Python x = my_biogeme.id_manager.free_betas_values xplus = [v + 1 for v in x] print(xplus) .. rst-class:: sphx-glr-script-out .. code-block:: none [0.0, 3.0] .. GENERATED FROM PYTHON SOURCE LINES 88-90 .. code-block:: Python my_biogeme.calculate_likelihood(xplus, scaled=True) .. rst-class:: sphx-glr-script-out .. code-block:: none -111.0 .. GENERATED FROM PYTHON SOURCE LINES 91-92 Calculate the log-likelihood function and its derivatives. .. GENERATED FROM PYTHON SOURCE LINES 92-97 .. code-block:: Python the_function_output: BiogemeFunctionOutput = ( my_biogeme.calculate_likelihood_and_derivatives( xplus, scaled=True, hessian=True, bhhh=True ) ) .. GENERATED FROM PYTHON SOURCE LINES 98-100 .. code-block:: Python print(f'f = {the_function_output.function}') .. rst-class:: sphx-glr-script-out .. code-block:: none f = -111.0 .. GENERATED FROM PYTHON SOURCE LINES 101-103 .. code-block:: Python print(f'g = {the_function_output.gradient}') .. rst-class:: sphx-glr-script-out .. code-block:: none g = [ -90. -108.] .. GENERATED FROM PYTHON SOURCE LINES 104-106 .. code-block:: Python pd.DataFrame(the_function_output.hessian) .. raw:: html
0 1
0 -276.0 -30.0
1 -30.0 -108.0


.. GENERATED FROM PYTHON SOURCE LINES 107-109 .. code-block:: Python pd.DataFrame(the_function_output.bhhh) .. raw:: html
0 1
0 9900.0 9720.0
1 9720.0 11664.0


.. GENERATED FROM PYTHON SOURCE LINES 110-111 Now the unscaled version. .. GENERATED FROM PYTHON SOURCE LINES 111-114 .. code-block:: Python the_output: BiogemeFunctionOutput = my_biogeme.calculate_likelihood_and_derivatives( xplus, scaled=False, hessian=True, bhhh=True ) .. GENERATED FROM PYTHON SOURCE LINES 115-117 .. code-block:: Python print(f'f = {the_output.function}') .. rst-class:: sphx-glr-script-out .. code-block:: none f = -555.0 .. GENERATED FROM PYTHON SOURCE LINES 118-120 .. code-block:: Python print(f'g = {the_output.gradient}') .. rst-class:: sphx-glr-script-out .. code-block:: none g = [-450. -540.] .. GENERATED FROM PYTHON SOURCE LINES 121-123 .. code-block:: Python pd.DataFrame(the_output.hessian) .. raw:: html
0 1
0 -1380.0 -150.0
1 -150.0 -540.0


.. GENERATED FROM PYTHON SOURCE LINES 124-127 .. code-block:: Python pd.DataFrame(the_output.bhhh) .. raw:: html
0 1
0 49500.0 48600.0
1 48600.0 58320.0


.. GENERATED FROM PYTHON SOURCE LINES 128-129 Calculate the hessian of the log likelihood function using finite difference. .. GENERATED FROM PYTHON SOURCE LINES 129-132 .. code-block:: Python fin_diff_hessian = my_biogeme.likelihood_finite_difference_hessian(xplus) pd.DataFrame(fin_diff_hessian) .. raw:: html
0 1
0 -1380.000202 -150.000000
1 -150.000045 -540.000054


.. GENERATED FROM PYTHON SOURCE LINES 133-136 Check numerically the derivatives' implementation. The analytical derivatives are compared to the numerical derivatives obtains by finite differences. .. GENERATED FROM PYTHON SOURCE LINES 136-138 .. code-block:: Python f, g, h, gdiff, hdiff = my_biogeme.check_derivatives(xplus, verbose=True) .. rst-class:: sphx-glr-script-out .. code-block:: none x Gradient FinDiff Difference beta1 -4.500000E+02 -4.500001E+02 +6.934970E-05 beta2 -5.400000E+02 -5.400001E+02 +8.087011E-05 Row Col Hessian FinDiff Difference beta1 beta1 -1.380000E+03 -1.380000E+03 +2.022890E-04 beta1 beta2 -1.500000E+02 -1.500000E+02 +2.425509E-10 beta2 beta1 -1.500000E+02 -1.500000E+02 +4.509602E-05 beta2 beta2 -5.400000E+02 -5.400001E+02 +5.396423E-05 .. GENERATED FROM PYTHON SOURCE LINES 139-140 .. code-block:: Python print(f'f = {f}') .. rst-class:: sphx-glr-script-out .. code-block:: none f = -555.0 .. GENERATED FROM PYTHON SOURCE LINES 141-142 .. code-block:: Python print(f'g = {g}') .. rst-class:: sphx-glr-script-out .. code-block:: none g = [-450. -540.] .. GENERATED FROM PYTHON SOURCE LINES 143-144 .. code-block:: Python pd.DataFrame(h) .. raw:: html
0 1
0 -1380.0 -150.0
1 -150.0 -540.0


.. GENERATED FROM PYTHON SOURCE LINES 145-147 .. code-block:: Python pd.DataFrame(gdiff) # print(f'gdiff = {gdiff}') .. raw:: html
0
0 0.000069
1 0.000081


.. GENERATED FROM PYTHON SOURCE LINES 148-151 .. code-block:: Python pd.DataFrame(hdiff) # print(f'hdiff = {hdiff}') .. raw:: html
0 1
0 0.000202 2.425509e-10
1 0.000045 5.396423e-05


.. GENERATED FROM PYTHON SOURCE LINES 152-154 Estimation ---------- .. GENERATED FROM PYTHON SOURCE LINES 156-157 Estimation of the parameters, with bootstrapping .. GENERATED FROM PYTHON SOURCE LINES 157-160 .. code-block:: Python my_biogeme.bootstrap_samples = 10 results = my_biogeme.estimate(run_bootstrap=True) .. rst-class:: sphx-glr-script-out .. code-block:: none As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" *** Initial values of the parameters are obtained from the file __simple_example.iter Parameter values restored from __simple_example.iter As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds] ** Optimization: Newton with trust region for simple bounds Iter. beta1 beta2 Function Relgrad Radius Rho 0 -0.22 2.1 1.9e+02 0.019 10 1.2 ++ 1 -0.6 1.5 93 0.013 1e+02 1.2 ++ 2 -1 1.3 70 0.01 1e+03 1.2 ++ 3 -1.2 1.3 67 0.0039 1e+04 1.1 ++ 4 -1.2 1.3 67 7.2e-05 1e+04 1 ++ Re-estimate the model 10 times for bootstrapping 0%| | 0/10 [00:00
Value Rob. Std err Rob. t-test Rob. p-value
beta1 -1.272838 0.013630 -93.387994 0.0
beta2 1.248867 0.059077 21.139711 0.0


.. GENERATED FROM PYTHON SOURCE LINES 164-167 If the model has already been estimated, it is possible to recycle the estimation results. In that case, the other arguments are ignored, and the results are whatever is in the file. .. GENERATED FROM PYTHON SOURCE LINES 169-171 .. code-block:: Python recycled_results = my_biogeme.estimate(recycle=True, run_bootstrap=True) .. rst-class:: sphx-glr-script-out .. code-block:: none As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" Estimation results read from simple_example.pickle. There is no guarantee that they correspond to the specified model. .. GENERATED FROM PYTHON SOURCE LINES 172-174 .. code-block:: Python print(recycled_results.short_summary()) .. rst-class:: sphx-glr-script-out .. code-block:: none Results for model simple_example Nbr of parameters: 2 Sample size: 5 Excluded data: 0 Final log likelihood: -67.0655 Akaike Information Criterion: 138.131 Bayesian Information Criterion: 137.3499 .. GENERATED FROM PYTHON SOURCE LINES 175-177 .. code-block:: Python recycled_results.get_estimated_parameters() .. raw:: html
Value Rob. Std err Rob. t-test Rob. p-value
beta1 -1.272838 0.013630 -93.387994 0.0
beta2 1.248867 0.059077 21.139711 0.0


.. GENERATED FROM PYTHON SOURCE LINES 178-180 Simulation ---------- .. GENERATED FROM PYTHON SOURCE LINES 182-183 Simulate with the initial values for the parameters. .. GENERATED FROM PYTHON SOURCE LINES 183-188 .. code-block:: Python simulation_with_default_betas = my_biogeme.simulate( my_biogeme.log_like.get_beta_values() ) simulation_with_default_betas .. raw:: html
log_like beta1 simul
0 -20.733455 -1.272838 -0.229590
1 -17.073277 -1.272838 -0.286988
2 -17.073277 -1.272838 -0.286988
3 -9.752922 -1.272838 -0.573976
4 -6.092744 -1.272838 -1.147951


.. GENERATED FROM PYTHON SOURCE LINES 189-190 Simulate with the estimated values for the parameters. .. GENERATED FROM PYTHON SOURCE LINES 192-194 .. code-block:: Python print(results.get_beta_values()) .. rst-class:: sphx-glr-script-out .. code-block:: none {'beta1': np.float64(-1.272838017207035), 'beta2': np.float64(1.248867015967332)} .. GENERATED FROM PYTHON SOURCE LINES 195-198 .. code-block:: Python simulation_with_estimated_betas = my_biogeme.simulate(results.get_beta_values()) simulation_with_estimated_betas .. raw:: html
log_like beta1 simul
0 -20.733455 -1.272838 -0.229590
1 -17.073277 -1.272838 -0.286988
2 -17.073277 -1.272838 -0.286988
3 -9.752922 -1.272838 -0.573976
4 -6.092744 -1.272838 -1.147951


.. GENERATED FROM PYTHON SOURCE LINES 199-201 Confidence intervals. First, we extract the values of betas from the bootstrapping draws. .. GENERATED FROM PYTHON SOURCE LINES 201-207 .. code-block:: Python draws_from_betas = results.get_betas_for_sensitivity_analysis( my_biogeme.id_manager.free_betas.names ) for draw in draws_from_betas: print(draw) .. rst-class:: sphx-glr-script-out .. code-block:: none {'beta1': np.float64(-1.2649797746053077), 'beta2': np.float64(1.284263176431638)} {'beta1': np.float64(-1.2732639061775262), 'beta2': np.float64(1.2487688275262538)} {'beta1': np.float64(-1.2649797746053077), 'beta2': np.float64(1.284263176431638)} {'beta1': np.float64(-1.2777126115403008), 'beta2': np.float64(1.2295568141100899)} {'beta1': np.float64(-1.2873325302586314), 'beta2': np.float64(1.1875198336493942)} {'beta1': np.float64(-1.2777126115403008), 'beta2': np.float64(1.2295568141100899)} {'beta1': np.float64(-1.2981043644725554), 'beta2': np.float64(1.1393509911926116)} {'beta1': np.float64(-1.2777126115403008), 'beta2': np.float64(1.22955681411009)} {'beta1': np.float64(-1.2611085824685073), 'beta2': np.float64(1.300751700054335)} {'beta1': np.float64(-1.2690260405818319), 'beta2': np.float64(1.2669668838241481)} .. GENERATED FROM PYTHON SOURCE LINES 208-210 Then, we calculate the confidence intervals. The default interval size is 0.9. Here, we use a different one. .. GENERATED FROM PYTHON SOURCE LINES 210-213 .. code-block:: Python left, right = my_biogeme.confidence_intervals(draws_from_betas, interval_size=0.95) left .. raw:: html
log_like beta1 simul
0 -21.416393 -1.295681 -0.236132
1 -17.483798 -1.295681 -0.295165
2 -17.483798 -1.295681 -0.295165
3 -9.907866 -1.295681 -0.590331
4 -6.369267 -1.295681 -1.180662


.. GENERATED FROM PYTHON SOURCE LINES 214-216 .. code-block:: Python right .. raw:: html
log_like beta1 simul
0 -20.523662 -1.26198 -0.226455
1 -16.985063 -1.26198 -0.283069
2 -16.985063 -1.26198 -0.283069
3 -9.618608 -1.26198 -0.566138
4 -5.686012 -1.26198 -1.132275


.. GENERATED FROM PYTHON SOURCE LINES 217-227 Validation ---------- The validation consists in organizing the data into several slices of about the same size, randomly defined. Each slide is considered as a validation dataset. The model is then re-estimated using all the data except the slice, and the estimated model is applied on the validation set (i.e. the slice). The value of the log likelihood for each observation in the validation set is reported in a dataframe. As this is done for each slice, the output is a list of dataframes, each corresponding to one of these exercises. .. GENERATED FROM PYTHON SOURCE LINES 229-232 .. code-block:: Python validationData = my_data.split(slices=5) validation_results = my_biogeme.validate(results, validationData) .. rst-class:: sphx-glr-script-out .. code-block:: none /Users/bierlair/venv312/lib/python3.12/site-packages/numpy/_core/fromnumeric.py:57: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead. return bound(*args, **kwds) Biogeme parameters read from biogeme.toml. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" *** Initial values of the parameters are obtained from the file __simple_example_val_est_1.iter Cannot read file __simple_example_val_est_1.iter. Statement is ignored. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds] ** Optimization: Newton with trust region for simple bounds Iter. beta1 beta2 Function Relgrad Radius Rho 0 -1.3 1.3 61 0.0012 10 0.99 ++ 1 -1.3 1.3 61 1.5e-07 10 1 ++ Results saved in file simple_example_val_est_1.html Results saved in file simple_example_val_est_1.pickle Biogeme parameters read from biogeme.toml. Biogeme parameters read from biogeme.toml. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" *** Initial values of the parameters are obtained from the file __simple_example_val_est_2.iter Cannot read file __simple_example_val_est_2.iter. Statement is ignored. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds] ** Optimization: Newton with trust region for simple bounds Iter. beta1 beta2 Function Relgrad Radius Rho 0 -1.3 1.2 54 1.1e-07 1 1 Results saved in file simple_example_val_est_2.html Results saved in file simple_example_val_est_2.pickle Biogeme parameters read from biogeme.toml. Biogeme parameters read from biogeme.toml. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" *** Initial values of the parameters are obtained from the file __simple_example_val_est_3.iter Cannot read file __simple_example_val_est_3.iter. Statement is ignored. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds] ** Optimization: Newton with trust region for simple bounds Iter. beta1 beta2 Function Relgrad Radius Rho 0 -1.3 1.2 46 0.0022 10 1 ++ 1 -1.3 1.2 46 6e-07 10 1 ++ Results saved in file simple_example_val_est_3.html Results saved in file simple_example_val_est_3.pickle Biogeme parameters read from biogeme.toml. Biogeme parameters read from biogeme.toml. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" *** Initial values of the parameters are obtained from the file __simple_example_val_est_4.iter Cannot read file __simple_example_val_est_4.iter. Statement is ignored. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds] ** Optimization: Newton with trust region for simple bounds Iter. beta1 beta2 Function Relgrad Radius Rho 0 -1.3 1.2 50 0.00048 10 1 ++ 1 -1.3 1.2 50 2.6e-08 10 1 ++ Results saved in file simple_example_val_est_4.html Results saved in file simple_example_val_est_4.pickle Biogeme parameters read from biogeme.toml. Biogeme parameters read from biogeme.toml. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" *** Initial values of the parameters are obtained from the file __simple_example_val_est_5.iter Cannot read file __simple_example_val_est_5.iter. Statement is ignored. As the model is not too complex, we activate the calculation of second derivatives. If you want to change it, change the name of the algorithm in the TOML file from "automatic" to "simple_bounds" Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds] ** Optimization: Newton with trust region for simple bounds Iter. beta1 beta2 Function Relgrad Radius Rho 0 -1.3 1.3 57 0.00035 10 1 ++ 1 -1.3 1.3 57 1.3e-08 10 1 ++ Results saved in file simple_example_val_est_5.html Results saved in file simple_example_val_est_5.pickle Biogeme parameters read from biogeme.toml. Simulation results saved in file simple_example_validation.pickle .. GENERATED FROM PYTHON SOURCE LINES 233-240 .. code-block:: Python for slide in validation_results: print( f'Log likelihood for {slide.shape[0]} ' f'validation data: {slide["Loglikelihood"].sum()}' ) .. rst-class:: sphx-glr-script-out .. code-block:: none Log likelihood for 1 validation data: -6.341108764653339 Log likelihood for 1 validation data: -13.41309809589276 Log likelihood for 1 validation data: -21.037421356430013 Log likelihood for 1 validation data: -17.145326445763835 Log likelihood for 1 validation data: -9.817719764565792 .. GENERATED FROM PYTHON SOURCE LINES 241-243 The following tools is used to find .py with the model name and a specific extension. .. GENERATED FROM PYTHON SOURCE LINES 243-244 .. code-block:: Python my_biogeme.files_of_type('pickle') .. rst-class:: sphx-glr-script-out .. code-block:: none ['simple_example.pickle'] .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.161 seconds) .. _sphx_glr_download_auto_examples_programmers_plot_biogeme.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_biogeme.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_biogeme.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_biogeme.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_