Re-estimation of best models

After running the assisted specification algorithm for the 432 specifications in Combination of many specifications, we use post processing to re-estimate all Pareto optimal models, and display some information about the algorithm. See Bierlaire and Ortelli (2023).

author:

Michel Bierlaire, EPFL

date:

Thu Jul 20 17:15:37 2023

try:
    import matplotlib.pyplot as plt

    can_plot = True
except ModuleNotFoundError:
    can_plot = False
import biogeme.biogeme_logging as blog
import biogeme.biogeme as bio
from biogeme.assisted import ParetoPostProcessing

from everything_spec import model_catalog, database

logger = blog.get_screen_logger(level=blog.INFO)
logger.info('Example b08selected_specification')

PARETO_FILE_NAME = 'saved_results/b07everything_assisted.pareto'
Example b08selected_specification

Create the biogeme object from the catalog.

the_biogeme = bio.BIOGEME(database, model_catalog)
the_biogeme.modelName = 'b09post_processing'
Biogeme parameters read from biogeme.toml.

Create the post processing object.

post_processing = ParetoPostProcessing(
    biogeme_object=the_biogeme, pareto_file_name=PARETO_FILE_NAME
)
Pareto set initialized from file with 192 elements [11 Pareto] and 29 invalid elements.

Re-estimate the models.

all_results = post_processing.reestimate(recycle=True)
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000000.iter
Cannot read file __b09post_processing_000000.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.         ASC_CAR      ASC_CAR_GA       ASC_TRAIN    ASC_TRAIN_GA      B_COST_CAR       B_COST_SM    B_COST_TRAIN          B_TIME B_TIME_commuter    cube_tt_coef     mu_existing  square_tt_coef     Function    Relgrad   Radius      Rho
    0            0.16            -1.3           -0.92             1.6           -0.24           -0.74           -0.77               0               0         0.00019             1.5            -0.1        1e+04       0.28      0.5     -1.5    -
    1           -0.25            -1.3           -0.95             1.5           -0.67           -0.24           -0.75            -0.3          -0.047          0.0075             1.5            -0.1      9.2e+03        5.3      0.5     0.52    +
    2           -0.25            -1.3           -0.95             1.5           -0.67           -0.24           -0.75            -0.3          -0.047          0.0075             1.5            -0.1      9.2e+03        5.3     0.25     0.52    -
    3           -0.25            -1.3           -0.95             1.5           -0.67           -0.24           -0.75            -0.3          -0.047          0.0075             1.5            -0.1      9.2e+03        5.3     0.12     0.52    -
    4           -0.25            -1.3           -0.95             1.5           -0.67           -0.24           -0.75            -0.3          -0.047          0.0075             1.5            -0.1      9.2e+03        5.3    0.062     0.52    -
    5           -0.25            -1.3           -0.95             1.5           -0.67           -0.24           -0.75            -0.3          -0.047          0.0075             1.5            -0.1      9.2e+03        5.3    0.031     0.52    -
    6           -0.25            -1.3           -0.95             1.5           -0.67           -0.24           -0.75            -0.3          -0.047          0.0075             1.5            -0.1      9.2e+03        5.3    0.016     -1.6    -
    7           -0.25            -1.3           -0.95             1.5           -0.67           -0.24           -0.75            -0.3          -0.047          0.0075             1.5            -0.1      9.2e+03        5.3   0.0078     -0.7    -
    8           -0.25            -1.3           -0.96             1.5           -0.66           -0.25           -0.75           -0.29          -0.039        -0.00034             1.5            -0.1      8.9e+03        9.9   0.0078     0.78    +
    9           -0.25            -1.3           -0.96             1.5           -0.66           -0.25           -0.75           -0.29          -0.039        -0.00034             1.5            -0.1      8.9e+03        9.9   0.0039    -0.36    -
   10           -0.25            -1.3           -0.96             1.5           -0.66           -0.25           -0.75           -0.29          -0.039        -0.00034             1.5            -0.1      8.9e+03        9.9    0.002     -0.4    -
   11           -0.25            -1.3           -0.96             1.5           -0.66           -0.25           -0.75           -0.29          -0.039        -0.00034             1.5            -0.1      8.9e+03        9.9  0.00098  -0.0026    -
   12           -0.25            -1.3           -0.96             1.5           -0.66           -0.25           -0.75           -0.29          -0.039         0.00064             1.5            -0.1      8.8e+03        3.7  0.00098     0.41    +
   13           -0.25            -1.3           -0.96             1.5           -0.66           -0.25           -0.75           -0.29          -0.039         0.00064             1.5            -0.1      8.8e+03        3.7  0.00049    -0.82    -
   14           -0.25            -1.3           -0.96             1.5           -0.66           -0.25           -0.75           -0.29           -0.04         0.00015             1.5            -0.1      8.8e+03          4  0.00049     0.67    +
   15           -0.25            -1.3           -0.96             1.5           -0.66           -0.25           -0.75           -0.29           -0.04         0.00023             1.5            -0.1      8.8e+03       0.19   0.0049     0.97   ++
   16           -0.24            -1.3           -0.96             1.5           -0.66           -0.26           -0.75           -0.29           -0.04         0.00021             1.5          -0.098      8.8e+03       0.17    0.049        1   ++
   17           -0.21            -1.3           -0.98             1.5           -0.62            -0.3           -0.76           -0.32          -0.047         6.8e-05             1.5          -0.067      8.7e+03       0.07     0.49        1   ++
   18           -0.21            -1.3           -0.98             1.5           -0.62            -0.3           -0.76           -0.32          -0.047         6.8e-05             1.5          -0.067      8.7e+03       0.07     0.24     -0.1    -
   19           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1     0.24     0.82    +
   20           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1     0.12     -1.9    -
   21           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1    0.061     -1.5    -
   22           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1    0.031     -1.5    -
   23           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1    0.015     -1.9    -
   24           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1   0.0076     -2.3    -
   25           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1   0.0038     -2.7    -
   26           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1   0.0019     -2.9    -
   27           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1  0.00095     -2.6    -
   28           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1  0.00048     -1.7    -
   29           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1  0.00024       -1    -
   30           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1         -0.0011             1.5            0.18      8.4e+03        6.1  0.00012    -0.13    -
   31           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1        -0.00098             1.5            0.18      8.4e+03        1.1  0.00012     0.82    +
   32           -0.09            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1        -0.00097             1.5            0.18      8.4e+03       0.06   0.0012     0.99   ++
   33          -0.091            -1.2            -1.1             1.4           -0.49           -0.54           -0.74           -0.56            -0.1        -0.00097             1.5            0.18      8.4e+03      0.059    0.012        1   ++
   34            -0.1            -1.2            -1.1             1.4            -0.5           -0.55           -0.73           -0.56            -0.1        -0.00093             1.5            0.17      8.4e+03      0.049     0.12        1   ++
   35           -0.19            -1.2           -0.97             1.3           -0.53           -0.63           -0.63           -0.68          -0.099        -0.00076             1.4            0.12      8.3e+03       0.25      1.2     0.98   ++
   36           -0.19            -1.2           -0.97             1.3           -0.53           -0.63           -0.63           -0.68          -0.099        -0.00076             1.4            0.12      8.3e+03       0.25      0.6      -35    -
   37           -0.19            -1.2           -0.97             1.3           -0.53           -0.63           -0.63           -0.68          -0.099        -0.00076             1.4            0.12      8.3e+03       0.25      0.3       -4    -
   38            -0.2            -1.1           -0.99             1.2           -0.42           -0.64           -0.69           -0.98           -0.12        -7.1e-05             1.4          -0.044      8.2e+03        2.1      0.3     0.78    +
   39           -0.24            -1.1           -0.82             1.2            -0.4           -0.69           -0.66            -1.3           -0.21          -5e-05             1.4          -0.049      8.2e+03          2        3        1   ++
   40           -0.24            -1.1           -0.82             1.2            -0.4           -0.69           -0.66            -1.3           -0.21          -5e-05             1.4          -0.049      8.2e+03          2      1.4 -1.2e+02    -
   41           -0.24            -1.1           -0.82             1.2            -0.4           -0.69           -0.66            -1.3           -0.21          -5e-05             1.4          -0.049      8.2e+03          2     0.71      -19    -
   42           -0.24            -1.1           -0.82             1.2            -0.4           -0.69           -0.66            -1.3           -0.21          -5e-05             1.4          -0.049      8.2e+03          2     0.36     -6.2    -
   43           -0.24            -1.1           -0.82             1.2            -0.4           -0.69           -0.66            -1.3           -0.21          -5e-05             1.4          -0.049      8.2e+03          2     0.18     -1.3    -
   44           -0.23              -1           -0.81             1.2           -0.37           -0.62           -0.72            -1.5           -0.27         0.00021             1.4           -0.11      8.2e+03         20     0.18     0.43    +
   45           -0.23           -0.98           -0.66             1.2           -0.36           -0.69           -0.67            -1.6           -0.37         0.00012             1.4          -0.089      8.1e+03          6      1.8      0.9   ++
   46           -0.14           -0.35           -0.27            0.97           -0.24           -0.63           -0.78              -2              -1         0.00029             1.7           -0.13      8.1e+03         21      1.8     0.12    +
   47           -0.17           -0.49           -0.32               1           -0.24           -0.67           -0.77            -1.9           -0.98         0.00018             1.6            -0.1      8.1e+03         29      1.8      0.7    +
   48           -0.17           -0.54           -0.34               1           -0.26           -0.66           -0.81              -2           -0.97          0.0002             1.6           -0.11      8.1e+03         10      1.8     0.87    +
   49           -0.17           -0.56           -0.35               1           -0.27           -0.66           -0.82            -1.9           -0.94          0.0002             1.6           -0.11      8.1e+03       0.62       18        1   ++
   50           -0.17           -0.55           -0.35               1           -0.27           -0.66           -0.82            -1.9           -0.93          0.0002             1.6           -0.11      8.1e+03     0.0046  1.8e+02        1   ++
   51           -0.17           -0.55           -0.35               1           -0.27           -0.66           -0.82            -1.9           -0.93          0.0002             1.6           -0.11      8.1e+03    1.2e-05  1.8e+02        1   ++
Results saved in file b09post_processing_000000.html
Results saved in file b09post_processing_000000.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000001.iter
Cannot read file __b09post_processing_000001.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.         ASC_CAR      ASC_CAR_GA       ASC_TRAIN    ASC_TRAIN_GA          B_COST          B_TIME    cube_tt_coef     mu_existing  square_tt_coef     Function    Relgrad   Radius      Rho
    0           -0.17           -0.55           -0.35               1           -0.77            -2.1          0.0002             1.6           -0.11      8.4e+03         11      0.5    -0.11    -
    1            0.31           -0.54           -0.42             1.1           -0.34            -1.8         0.00022             2.1           -0.11      8.2e+03       0.44      0.5     0.44    +
    2            0.13           -0.59            -0.5            0.98           -0.54            -1.7         0.00019             1.8            -0.1      8.2e+03        2.1        5        1   ++
    3            0.16           -0.65           -0.51             1.1            -0.6            -1.8         0.00019             1.6            -0.1      8.2e+03        4.3       50     0.99   ++
    4            0.16           -0.68           -0.51             1.1            -0.6            -1.8         0.00019             1.6            -0.1      8.2e+03       0.22    5e+02     0.99   ++
    5            0.16           -0.68           -0.51             1.1            -0.6            -1.8         0.00019             1.6            -0.1      8.2e+03     0.0042    5e+03        1   ++
    6            0.16           -0.68           -0.51             1.1            -0.6            -1.8         0.00019             1.6            -0.1      8.2e+03    2.1e-05    5e+03        1   ++
Results saved in file b09post_processing_000001.html
Results saved in file b09post_processing_000001.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000002.iter
Cannot read file __b09post_processing_000002.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.         ASC_CAR       ASC_TRAIN          B_COST          B_TIME     Function    Relgrad   Radius      Rho
    0          -0.022            -0.7           -0.78            -1.1      8.7e+03      0.022        1     0.83    +
    1           0.014           -0.66           -0.79            -1.3      8.7e+03     0.0011       10        1   ++
    2           0.014           -0.66           -0.79            -1.3      8.7e+03    2.9e-06       10        1   ++
Results saved in file b09post_processing_000002.html
Results saved in file b09post_processing_000002.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000003.iter
Cannot read file __b09post_processing_000003.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.         ASC_CAR      ASC_CAR_GA       ASC_TRAIN    ASC_TRAIN_GA          B_COST          B_TIME B_TIME_1st_clas     Function    Relgrad   Radius      Rho
    0          -0.046              -1            -1.3             1.5           -0.77           -0.69            -0.5      8.3e+03      0.025        1     0.79    +
    1           0.002            -1.2            -1.2             1.5           -0.78           -0.86           -0.61      8.3e+03     0.0015       10        1   ++
    2           0.002            -1.2            -1.2             1.5           -0.78           -0.86           -0.61      8.3e+03    9.2e-06       10        1   ++
Results saved in file b09post_processing_000003.html
Results saved in file b09post_processing_000003.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000004.iter
Cannot read file __b09post_processing_000004.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.         ASC_CAR      ASC_CAR_GA       ASC_TRAIN    ASC_TRAIN_GA      B_COST_CAR       B_COST_SM    B_COST_TRAIN          B_TIME B_TIME_commuter    cube_tt_coef  square_tt_coef     Function    Relgrad   Radius      Rho
    0           -0.17            -1.1           -0.42             1.2           -0.35           -0.75            -1.2            -2.1            -1.1         0.00021           -0.11      8.1e+03         13       10     0.91   ++
    1           -0.17            -1.1           -0.55             1.3           -0.36           -0.76            -1.1            -2.1            -1.1          0.0002           -0.11      8.1e+03        0.3    1e+02        1   ++
    2           -0.18            -1.1           -0.56             1.3           -0.36           -0.76            -1.1            -2.1            -1.1         0.00021           -0.11      8.1e+03     0.0031    1e+03        1   ++
    3           -0.18            -1.1           -0.56             1.3           -0.36           -0.76            -1.1            -2.1            -1.1         0.00021           -0.11      8.1e+03      7e-06    1e+03        1   ++
Results saved in file b09post_processing_000004.html
Results saved in file b09post_processing_000004.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000005.iter
Cannot read file __b09post_processing_000005.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.     Function    Relgrad   Radius      Rho
    0      8.6e+03         23      0.5    0.068    -
    1      8.2e+03         19      0.5      0.7    +
    2      8.1e+03        4.6        5     0.94   ++
    3      8.1e+03       0.76       50        1   ++
    4      8.1e+03      0.017    5e+02        1   ++
    5      8.1e+03    1.9e-05    5e+02        1   ++
Results saved in file b09post_processing_000005.html
Results saved in file b09post_processing_000005.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000006.iter
Cannot read file __b09post_processing_000006.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.         ASC_CAR      ASC_CAR_GA       ASC_TRAIN    ASC_TRAIN_GA          B_COST          B_TIME    cube_tt_coef  square_tt_coef     Function    Relgrad   Radius      Rho
    0            0.26            -1.1           -0.52             1.3           -0.78            -2.2        -7.9e-05          -0.048      8.3e+03         11        1     0.73    +
    1            0.26            -1.1           -0.52             1.3           -0.78            -2.2        -7.9e-05          -0.048      8.3e+03         11      0.5       -6    -
    2            0.26            -1.1           -0.52             1.3           -0.78            -2.2        -7.9e-05          -0.048      8.3e+03         11     0.25     -1.2    -
    3            0.26            -1.1           -0.52             1.3           -0.78            -2.2        -7.9e-05          -0.048      8.3e+03         11     0.12   0.0099    -
    4            0.24            -1.1           -0.65             1.3           -0.74            -2.3         0.00045           -0.13      8.3e+03        9.8     0.12     0.34    +
    5            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55     0.12     0.67    +
    6            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55    0.062    -0.69    -
    7            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55    0.031    -0.64    -
    8            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55    0.016    -0.64    -
    9            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55   0.0078    -0.48    -
   10            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55   0.0039    -0.47    -
   11            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55    0.002    -0.49    -
   12            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55  0.00098     -0.5    -
   13            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55  0.00049    -0.51    -
   14            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55  0.00024    -0.52    -
   15            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00016           -0.11      8.2e+03         55  0.00012    -0.32    -
   16            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00028           -0.11      8.2e+03         25  0.00012     0.18    +
   17            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00028           -0.11      8.2e+03         25  6.1e-05    -0.46    -
   18            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00022           -0.11      8.2e+03        4.7  6.1e-05     0.84    +
   19            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00021           -0.11      8.2e+03       0.98  6.1e-05     0.88    +
   20            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00021           -0.11      8.2e+03      0.031  0.00061        1   ++
   21            0.21            -1.2           -0.77             1.4           -0.71            -2.3         0.00022           -0.11      8.2e+03      0.018   0.0061        1   ++
   22            0.22            -1.2           -0.78             1.4           -0.71            -2.3         0.00022           -0.11      8.2e+03      0.069    0.061        1   ++
   23            0.23            -1.2           -0.81             1.5           -0.73            -2.2          0.0002           -0.11      8.2e+03        1.1     0.61     0.99   ++
   24            0.15            -1.2           -0.92             1.6           -0.72            -2.1          0.0002            -0.1      8.2e+03       0.21      6.1        1   ++
   25            0.16            -1.3           -0.92             1.6           -0.72            -2.1          0.0002            -0.1      8.2e+03    0.00068       61        1   ++
   26            0.16            -1.3           -0.92             1.6           -0.72            -2.1          0.0002            -0.1      8.2e+03    3.5e-05       61        1   ++
Results saved in file b09post_processing_000006.html
Results saved in file b09post_processing_000006.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000007.iter
Cannot read file __b09post_processing_000007.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.         ASC_CAR      ASC_CAR_GA       ASC_TRAIN    ASC_TRAIN_GA          B_COST          B_TIME B_TIME_commuter    cube_tt_coef       mu_public  square_tt_coef     Function    Relgrad   Radius      Rho
    0            0.18            -1.3           -0.89             1.6           -0.71              -2            -1.1          0.0002               1           -0.11      8.2e+03        4.5       10     0.99   ++
    1            0.17            -1.3           -0.91             1.6           -0.71              -2            -1.1          0.0002               1           -0.11      8.2e+03       0.14    1e+02        1   ++
    2            0.17            -1.3            -0.9             1.6           -0.71              -2            -1.1          0.0002               1           -0.11      8.2e+03       0.39    1e+03        1   ++
    3            0.17            -1.3            -0.9             1.6           -0.71              -2            -1.2          0.0002               1           -0.11      8.2e+03      0.092    1e+04        1   ++
    4            0.17            -1.3            -0.9             1.6           -0.71              -2            -1.2          0.0002               1           -0.11      8.2e+03    7.4e-05    1e+04        1   ++
Results saved in file b09post_processing_000007.html
Results saved in file b09post_processing_000007.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000008.iter
Cannot read file __b09post_processing_000008.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.         ASC_CAR       ASC_TRAIN          B_COST          B_TIME B_TIME_1st_clas     Function    Relgrad   Radius      Rho
    0          0.0085           -0.71           -0.86           -0.91           -0.68      8.6e+03    0.00067       10        1   ++
    1          0.0085           -0.71           -0.86           -0.91           -0.68      8.6e+03    2.7e-06       10        1   ++
Results saved in file b09post_processing_000008.html
Results saved in file b09post_processing_000008.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000009.iter
Cannot read file __b09post_processing_000009.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.         ASC_CAR      ASC_CAR_GA ASC_CAR_one_lug ASC_CAR_several       ASC_TRAIN    ASC_TRAIN_GA ASC_TRAIN_one_l ASC_TRAIN_sever      B_COST_CAR       B_COST_SM    B_COST_TRAIN          B_TIME B_TIME_commuter    cube_tt_coef  square_tt_coef     Function    Relgrad   Radius      Rho
    0           -0.14           -0.92          -0.082            -0.5           -0.88             1.2            0.49            0.44           -0.35           -0.75              -1            -2.1            -1.1          0.0002           -0.11      8.1e+03        2.5       10      1.1   ++
    1           -0.13              -1          -0.083           -0.51           -0.92             1.2            0.54            0.51           -0.36           -0.76            -1.1            -2.1            -1.2         0.00021           -0.11      8.1e+03       0.25    1e+02        1   ++
    2           -0.13              -1          -0.083           -0.51           -0.93             1.2            0.55            0.52           -0.36           -0.76            -1.1            -2.1            -1.2         0.00021           -0.11      8.1e+03     0.0021    1e+03        1   ++
    3           -0.13              -1          -0.083           -0.51           -0.93             1.2            0.55            0.52           -0.36           -0.76            -1.1            -2.1            -1.2         0.00021           -0.11      8.1e+03    1.1e-05    1e+03        1   ++
Results saved in file b09post_processing_000009.html
Results saved in file b09post_processing_000009.pickle
Biogeme parameters provided by the user.
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"
Recycling was requested, but no pickle file was found
*** Initial values of the parameters are obtained from the file __b09post_processing_000010.iter
Cannot read file __b09post_processing_000010.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.         ASC_CAR       ASC_TRAIN      B_COST_CAR       B_COST_SM    B_COST_TRAIN          B_TIME     Function    Relgrad   Radius      Rho
    0           -0.28           0.027           -0.35           -0.62            -1.4            -1.1      8.6e+03      0.053        1     0.67    +
    1           -0.41          -0.079           -0.38           -0.81            -1.8            -1.2      8.5e+03      0.012       10      1.1   ++
    2           -0.42          -0.049           -0.38           -0.82            -1.9            -1.3      8.4e+03    0.00078    1e+02        1   ++
    3           -0.42          -0.049           -0.38           -0.82            -1.9            -1.3      8.4e+03    3.7e-06    1e+02        1   ++
Results saved in file b09post_processing_000010.html
Results saved in file b09post_processing_000010.pickle

We retrieve the first estimation results for illustration.

spec, results = next(iter(all_results.items()))
print(spec)
ASC:GA;B_COST_gen_altspec:altspec;B_TIME:COMMUTERS;B_TIME_gen_altspec:generic;model_catalog:nested existing;train_tt_catalog:power
print(results.short_summary())
Results for model b09post_processing_000000
Nbr of parameters:              12
Sample size:                    10719
Excluded data:                  9
Final log likelihood:           -8091.615
Akaike Information Criterion:   16207.23
Bayesian Information Criterion: 16294.59
results.get_estimated_parameters()
Value Rob. Std err Rob. t-test Rob. p-value
ASC_CAR -0.170118 0.056231 -3.025349 2.483463e-03
ASC_CAR_GA -0.554777 0.126828 -4.374231 1.218611e-05
ASC_TRAIN -0.353134 0.074537 -4.737730 2.161259e-06
ASC_TRAIN_GA 1.036052 0.093493 11.081582 0.000000e+00
B_COST_CAR -0.265681 0.064687 -4.107204 4.004783e-05
B_COST_SM -0.664358 0.049876 -13.320211 0.000000e+00
B_COST_TRAIN -0.818767 0.091104 -8.987175 0.000000e+00
B_TIME -1.925814 0.075990 -25.343147 0.000000e+00
B_TIME_commuters -0.932016 0.146361 -6.367925 1.916021e-10
cube_tt_coef 0.000200 0.000019 10.584589 0.000000e+00
mu_existing 1.562424 0.076670 20.378644 0.000000e+00
square_tt_coef -0.106243 0.003710 -28.638138 0.000000e+00


The following plot illustrates all models that have been estimated. Each dot corresponds to a model. The x-coordinate corresponds to the Akaike Information Criterion (AIC). The y-coordinate corresponds to the Bayesian Information Criterion (BIC). Note that there is a third objective that does not appear on this picture: the number of parameters. If the shape of the dot is a circle, it means that it corresponds to a Pareto optimal model. If the shape is a cross, it means that the model has been Pareto optimal at some point during the algorithm and later removed as a new model dominating it has been found. If the shape is a start, it means that the model has been deemed invalid.

if can_plot:
    _ = post_processing.plot(
        label_x='Nbr of parameters',
        label_y='Negative log likelihood',
        objective_x=1,
        objective_y=0,
    )
plot b09post processing

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

Gallery generated by Sphinx-Gallery