Combine many specifications: exception is raisedΒΆ

We combine many specifications, defined in Combination of many specifications. This leads to a total of 432 specifications. When the total number of specifications exceeds 100, Biogeme raises an ValueOutOfRange exception when the estimate_catalog is called. See Bierlaire and Ortelli (2023).

Michel Bierlaire, EPFL Sun Apr 27 2025, 15:57:10

from biogeme.biogeme import BIOGEME
from biogeme.exceptions import BiogemeError

See Combination of many specifications.

from everything_spec import database, model_catalog

Create the Biogeme object.

the_biogeme = BIOGEME(database, model_catalog, generate_html=False, generate_yaml=False)
the_biogeme.model_name = 'b06everything'

Estimate the parameters. It does not work as there are too many specifications

try:
    dict_of_results = the_biogeme.estimate_catalog()
except BiogemeError as e:
    print(e)
There are too many [432] different specifications for the log likelihood function. This is above the maximum number: 100. Simplify the specification, change the value of the parameter maximum_number_catalog_expressions, or consider using the AssistedSpecification object in the "biogeme.assisted" module.

Total running time of the script: (0 minutes 0.379 seconds)

Gallery generated by Sphinx-Gallery