.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/hybrid_choice/plot_b01_choice_only_ml.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_hybrid_choice_plot_b01_choice_only_ml.py: 1. Choice model only - maximum likelihood estimation ==================================================== This script runs a **standard discrete choice model** without any latent variables, estimated by **maximum likelihood** using Biogeme. It serves as a baseline specification against which hybrid choice models (with latent variables and measurement equations) can be compared. The configuration is defined locally in this file and passed to the generic estimation pipeline via :func:`estimate_model`. Michel Bierlaire Thu Dec 25 2025, 08:24:06 .. GENERATED FROM PYTHON SOURCE LINES 17-37 .. rst-class:: sphx-glr-script-out .. code-block:: none Default values of the Biogeme parameters are used. File biogeme.toml has been created Results are read from the file saved_results/b01_choice_only_ml.yaml. Results for model b01_choice_only_ml Nbr of parameters: 7 Sample size: 896 Excluded data: 0 Final log likelihood: -512.5193 Akaike Information Criterion: 1039.039 Bayesian Information Criterion: 1072.624 Name Value ... BHHH t-stat. BHHH p-value 0 choice_asc_pt -0.665118 ... -2.401766 0.016316 1 choice_beta_time_pt_ref -0.955522 ... -8.439265 0.000000 2 choice_beta_cost -0.079532 ... -9.546250 0.000000 3 choice_asc_car -0.246145 ... -1.065900 0.286469 4 choice_beta_time_car_ref -2.033204 ... -13.104580 0.000000 5 choice_beta_dist_work -0.204695 ... -13.801076 0.000000 6 choice_beta_dist_other_purposes -0.323970 ... -10.584442 0.000000 [7 rows x 5 columns] | .. code-block:: Python import biogeme.biogeme_logging as blog from config import Config from estimate import estimate_model logger = blog.get_screen_logger(level=blog.INFO) # Choice model only the_config = Config( name='b01_choice_only_ml', latent_variables="zero", choice_model="yes", estimation="ml", number_of_bayesian_draws_per_chain=20_000, number_of_monte_carlo_draws=20_000, ) estimate_model(config=the_config) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.834 seconds) .. _sphx_glr_download_auto_examples_hybrid_choice_plot_b01_choice_only_ml.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_b01_choice_only_ml.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_b01_choice_only_ml.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_b01_choice_only_ml.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_