Mixture of logit¶

Example of the use of different algorithms to estimate the model.

Michel Bierlaire, EPFL Wed Jun 18 2025, 12:31:43

import itertools

import biogeme.biogeme_logging as blog
import pandas as pd
from IPython.core.display_functions import display
from biogeme.biogeme import BIOGEME
from biogeme.exceptions import BiogemeError
from biogeme.expressions import Beta, Draws, MonteCarlo, log
from biogeme.models import logit
from biogeme.tools import format_timedelta

See the data processing script: Data preparation for Swissmetro.

from swissmetro_data import (
    CAR_AV_SP,
    CAR_CO_SCALED,
    CAR_TT_SCALED,
    CHOICE,
    SM_AV,
    SM_COST_SCALED,
    SM_TT_SCALED,
    TRAIN_AV_SP,
    TRAIN_COST_SCALED,
    TRAIN_TT_SCALED,
    database,
)

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

Parameters to be estimated

asc_car = Beta('asc_car', 0, None, None, 0)
asc_train = Beta('asc_train', 0, None, None, 0)
asc_sm = Beta('asc_sm', 0, None, None, 1)
b_cost = Beta('b_cost', 0, None, None, 0)

Define a random parameter, normally distributed, designed to be used for Monte-Carlo simulation.

b_time = Beta('b_time', 0, None, None, 0)

It is advised not to use 0 as starting value for the following parameter.

b_time_s = Beta('b_time_s', 1, None, None, 0)
b_time_rnd = b_time + b_time_s * Draws('b_time_rnd', 'NORMAL')

Definition of the utility functions.

v_train = asc_train + b_time_rnd * TRAIN_TT_SCALED + b_cost * TRAIN_COST_SCALED
v_swissmetro = asc_sm + b_time_rnd * SM_TT_SCALED + b_cost * SM_COST_SCALED
v_car = asc_car + b_time_rnd * CAR_TT_SCALED + b_cost * CAR_CO_SCALED

Associate utility functions with the numbering of alternatives

v = {1: v_train, 2: v_swissmetro, 3: v_car}

Associate the availability conditions with the alternatives

av = {1: TRAIN_AV_SP, 2: SM_AV, 3: CAR_AV_SP}

Conditional to b_time_rnd, we have a logit model (called the kernel)

prob = logit(v, av, CHOICE)

We integrate over b_time_rnd using Monte-Carlo

logprob = log(MonteCarlo(prob))

Options for the optimization algorithm¶

The conjugate gradient iteration can be constrained to stay feasible, or not.

infeasible_cg_values = [True, False]

The radius of the first trust region is tested with three different values.

initial_radius_values = [0.1, 1.0, 10.0]

The percentage of iterations such that the analytical second derivatives is evaluated.

second_derivatives_values = [0.0, 0.5, 1.0]

We run the optimization algorithm with all possible combinations of the parameters. The results are stored in a Pandas DataFrame called summary.

results = {}
summary_data = []

The first estimation is performed twice, to warm up the python code, so that the execution times are comparable

first = True
for infeasible_cg, initial_radius, second_derivatives in itertools.product(
    infeasible_cg_values, initial_radius_values, second_derivatives_values
):
    # Create the Biogeme object
    the_biogeme = BIOGEME(
        database,
        logprob,
        number_of_draws=10000,
        seed=1223,
        infeasible_cg=infeasible_cg,
        initial_radius=initial_radius,
        second_derivatives=second_derivatives,
        generate_html=False,
        generate_yaml=False,
    )

    name = (
        f'cg_{infeasible_cg}_radius_{initial_radius}_second_deriv_{second_derivatives}'
    )
    the_biogeme.model_name = f'b05normal_mixture_algo_{name}'.strip()

    result_data = {
        'InfeasibleCG': infeasible_cg,
        'InitialRadius': initial_radius,
        'SecondDerivatives': second_derivatives,
        'Status': 'Success',  # Assume success unless an exception is caught
    }

    try:
        results[name] = the_biogeme.estimate()
        if first:
            results[name] = the_biogeme.estimate()
            first = False
        opt_time = format_timedelta(
            results[name].optimization_messages["Optimization time"]
        )

        result_data.update(
            {
                'LogLikelihood': results[name].final_log_likelihood,
                'GradientNorm': results[name].gradient_norm,
                'Number of draws': results[name].number_of_draws,
                'Optimization time': opt_time,
                'TerminationCause': results[name].optimization_messages[
                    "Cause of termination"
                ],
            }
        )

    except BiogemeError as e:
        print(e)
        result_data.update(
            {
                'Status': 'Failed',
                'LogLikelihood': None,
                'GradientNorm': None,
                'Number of draws': None,
                'Optimization time': None,
                'TerminationCause': str(e),
            }
        )
        results[name] = None
    summary_data.append(result_data)

summary = pd.DataFrame(summary_data)
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_0.1_second_deriv_0.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_0.1_second_deriv_0.0.iter
Starting values for the algorithm: {'asc_train': -0.7011934155566429, 'b_time': -1.277848494693303, 'b_cost': -1.083782923591546, 'asc_car': -0.15463638276424457}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0            -0.7            -1.3               1            -1.1           -0.15      7.1e+03       0.15     0.05    0.097    -
    1           -0.65            -1.2            0.95            -1.1            -0.1      7.1e+03       0.16     0.05     0.12    +
    2            -0.7            -1.2             0.9            -1.2          -0.055      7.1e+03       0.16     0.05     0.12    +
    3           -0.75            -1.1            0.85            -1.2         -0.0046      7.1e+03       0.17     0.05     0.13    +
    4           -0.75            -1.1            0.85            -1.2         -0.0046      7.1e+03       0.17    0.025     -0.2    -
    5           -0.75            -1.1            0.85            -1.2         -0.0046      7.1e+03       0.17    0.013    -0.12    -
    6           -0.75            -1.1            0.85            -1.2         -0.0046      7.1e+03       0.17   0.0063     -0.1    -
    7           -0.75            -1.1            0.85            -1.2         -0.0046      7.1e+03       0.17   0.0031    0.043    -
    8           -0.75            -1.1            0.85            -1.2         -0.0015      7.1e+03       0.17   0.0031     0.13    +
    9           -0.75            -1.1            0.85            -1.2         -0.0015      7.1e+03       0.17   0.0016    -0.02    -
   10           -0.76            -1.1            0.85            -1.2         5.1e-05      7.1e+03       0.17   0.0016     0.13    +
   11           -0.76            -1.1            0.85            -1.2         5.1e-05      7.1e+03       0.17  0.00078    -0.16    -
   12           -0.76            -1.1            0.85            -1.2         5.1e-05      7.1e+03       0.17  0.00039    -0.08    -
   13           -0.76            -1.1            0.85            -1.2         5.1e-05      7.1e+03       0.17   0.0002    0.083    -
   14           -0.76            -1.1            0.85            -1.2         0.00025      7.1e+03       0.17   0.0002     0.13    +
   15           -0.76            -1.1            0.85            -1.2         0.00025      7.1e+03       0.17  9.8e-05    0.044    -
   16           -0.76            -1.1            0.85            -1.2         0.00034      7.1e+03       0.17  9.8e-05     0.13    +
   17           -0.76            -1.1            0.85            -1.2         0.00034      7.1e+03       0.17  4.9e-05   -0.035    -
   18           -0.76            -1.1            0.84            -1.2         0.00039      7.1e+03       0.17  4.9e-05     0.13    +
   19           -0.76            -1.1            0.84            -1.2         0.00039      7.1e+03       0.17  2.4e-05    -0.19    -
   20           -0.76            -1.1            0.84            -1.2         0.00039      7.1e+03       0.17  1.2e-05    -0.14    -
   21           -0.76            -1.1            0.84            -1.2         0.00039      7.1e+03       0.17  6.1e-06   -0.042    -
   22           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  6.1e-06     0.13    +
   23           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  3.1e-06    -0.21    -
   24           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  1.5e-06    -0.17    -
   25           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  7.6e-07   -0.099    -
   26           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  3.8e-07    0.044    -
   27           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  3.8e-07     0.13    +
   28           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  1.9e-07   -0.034    -
   29           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  1.9e-07     0.13    +
   30           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  9.5e-08    -0.19    -
   31           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  4.8e-08    -0.14    -
   32           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  2.4e-08   -0.037    -
   33           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  2.4e-08     0.13    +
   34           -0.76            -1.1            0.84            -1.2          0.0004      7.1e+03       0.17  1.2e-08    -0.24    +
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.1920928955077447e-08
Number of iterations: 35
Proportion of Hessian calculation: 0/13 = 0.0%
Optimization time: 0:00:50.798634
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_0.1_second_deriv_0.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_0.1_second_deriv_0.0.iter
Starting values for the algorithm: {'asc_train': -0.7562294119937158, 'b_time': -1.1228124982562306, 'b_time_s': 0.844964003562927, 'b_cost': -1.2388189200286184, 'asc_car': 0.00039961367282818927}
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.86            -1.2            0.74            -1.1            -0.1      5.3e+03      0.033      0.1     0.66    +
    1           -0.76            -1.3            0.84              -1            -0.2      5.3e+03      0.022      0.1     0.54    +
    2           -0.76            -1.4            0.86            -1.1           -0.16      5.2e+03      0.014      0.1     0.79    +
    3           -0.66            -1.5            0.96            -1.2          -0.063      5.2e+03      0.025      0.1     0.69    +
    4           -0.61            -1.6             1.1            -1.1           -0.14      5.2e+03      0.017      0.1      0.3    +
    5           -0.71            -1.7             1.2            -1.2          -0.036      5.2e+03      0.014      0.1     0.45    +
    6           -0.61            -1.7             1.3            -1.2           -0.11      5.2e+03      0.014      0.1     0.54    +
    7           -0.65            -1.8             1.2            -1.2          -0.011      5.2e+03      0.012      0.1     0.82    +
    8           -0.55            -1.8             1.3            -1.2          -0.034      5.2e+03      0.019      0.1     0.49    +
    9           -0.56            -1.9             1.3            -1.2           0.024      5.2e+03     0.0051      0.1     0.88    +
   10           -0.46              -2             1.4            -1.2           0.031      5.2e+03      0.012      0.1     0.43    +
   11           -0.47            -2.1             1.4            -1.2           0.088      5.2e+03     0.0045      0.1     0.65    +
   12           -0.43            -2.1             1.5            -1.2           0.085      5.2e+03     0.0026      0.1     0.76    +
   13           -0.43            -2.1             1.5            -1.2           0.085      5.2e+03     0.0026     0.05    -0.65    -
   14           -0.43            -2.1             1.5            -1.2           0.085      5.2e+03     0.0026    0.025    0.024    -
   15           -0.46            -2.1             1.5            -1.3            0.11      5.2e+03     0.0034    0.025     0.13    +
   16           -0.43            -2.1             1.5            -1.3             0.1      5.2e+03     0.0032    0.025     0.87    +
   17           -0.44            -2.2             1.5            -1.3             0.1      5.2e+03     0.0021    0.025     0.73    +
   18           -0.43            -2.2             1.6            -1.3            0.12      5.2e+03     0.0028    0.025     0.82    +
   19           -0.42            -2.2             1.6            -1.3            0.11      5.2e+03    0.00099    0.025     0.89    +
   20           -0.42            -2.2             1.6            -1.3            0.13      5.2e+03     0.0018    0.025     0.33    +
   21           -0.41            -2.2             1.6            -1.3            0.13      5.2e+03     0.0011     0.25     0.93   ++
   22           -0.41            -2.2             1.6            -1.3            0.13      5.2e+03     0.0011    0.088      -65    -
   23           -0.41            -2.2             1.6            -1.3            0.13      5.2e+03     0.0011    0.044      -20    -
   24           -0.41            -2.2             1.6            -1.3            0.13      5.2e+03     0.0011    0.022     -1.4    -
   25           -0.41            -2.2             1.6            -1.3            0.13      5.2e+03    0.00056    0.022      0.8    +
   26            -0.4            -2.3             1.7            -1.3            0.13      5.2e+03    0.00053    0.022     0.14    +
   27            -0.4            -2.3             1.7            -1.3            0.13      5.2e+03    0.00053    0.011    -0.69    -
   28            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    0.00041    0.011     0.41    +
   29            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    0.00041   0.0055    -0.77    -
   30            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    0.00061   0.0055     0.24    +
   31            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    0.00061   0.0027     -1.2    -
   32            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    0.00061   0.0014    0.041    -
   33            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    6.8e-05   0.0014     0.71    +
   34            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    6.9e-05   0.0014     0.36    +
   35            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    6.9e-05  0.00068    -0.37    -
   36            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    6.2e-05  0.00068     0.33    +
   37            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    1.5e-05  0.00068     0.52    +
   38            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    1.5e-05  0.00034    -0.59    -
   39            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    3.6e-05  0.00034     0.24    +
   40            -0.4            -2.3             1.7            -1.3            0.14      5.2e+03    2.9e-06  0.00034     0.94    +
Optimization algorithm has converged.
Relative gradient: 2.903458509330321e-06
Cause of termination: Relative gradient = 2.9e-06 <= 6.1e-06
Number of function evaluations: 102
Number of gradient evaluations: 61
Number of hessian evaluations: 0
Algorithm: BFGS with trust region for simple bound constraints
Number of iterations: 41
Proportion of Hessian calculation: 0/30 = 0.0%
Optimization time: 0:01:40.361105
Calculate second derivatives and BHHH
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_0.1_second_deriv_0.5.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_0.1_second_deriv_0.5.iter
Starting values for the algorithm: {'asc_train': -0.6301136023536084, 'b_time': -1.1397746332835221, 'b_cost': -1.372071694871092, 'asc_car': 0.014893851869430225}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19     0.05    -0.62    -
    1           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19    0.025    -0.62    -
    2           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19    0.013    -0.63    -
    3           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0063    -0.63    -
    4           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0031    -0.63    -
    5           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0016    -0.63    -
    6           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  0.00078    -0.63    -
    7           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  0.00039    -0.63    -
    8           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0002    -0.63    -
    9           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  9.8e-05    -0.63    -
   10           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  4.9e-05    -0.63    -
   11           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  2.4e-05    -0.63    -
   12           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.2e-05    -0.63    -
   13           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  6.1e-06    -0.63    -
   14           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  3.1e-06    -0.63    -
   15           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.5e-06    -0.63    -
   16           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  7.6e-07    -0.63    -
   17           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  3.8e-07    -0.63    -
   18           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.9e-07    -0.63    -
   19           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  9.5e-08    -0.63    -
   20           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  4.8e-08    -0.63    -
   21           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  2.4e-08    -0.63    -
   22           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.2e-08    -0.63    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.1920928955078126e-08
Number of iterations: 23
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:12.991246
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_0.1_second_deriv_1.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_0.1_second_deriv_1.0.iter
Starting values for the algorithm: {'asc_train': -0.6301136023536084, 'b_time': -1.1397746332835221, 'b_cost': -1.372071694871092, 'asc_car': 0.014893851869430225}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19     0.05    -0.62    -
    1           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19    0.025    -0.62    -
    2           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19    0.013    -0.63    -
    3           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0063    -0.63    -
    4           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0031    -0.63    -
    5           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0016    -0.63    -
    6           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  0.00078    -0.63    -
    7           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  0.00039    -0.63    -
    8           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0002    -0.63    -
    9           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  9.8e-05    -0.63    -
   10           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  4.9e-05    -0.63    -
   11           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  2.4e-05    -0.63    -
   12           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.2e-05    -0.63    -
   13           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  6.1e-06    -0.63    -
   14           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  3.1e-06    -0.63    -
   15           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.5e-06    -0.63    -
   16           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  7.6e-07    -0.63    -
   17           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  3.8e-07    -0.63    -
   18           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.9e-07    -0.63    -
   19           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  9.5e-08    -0.63    -
   20           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  4.8e-08    -0.63    -
   21           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  2.4e-08    -0.63    -
   22           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.2e-08    -0.63    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.1920928955078126e-08
Number of iterations: 23
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:13.124988
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_1.0_second_deriv_0.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_1.0_second_deriv_0.0.iter
Starting values for the algorithm: {'asc_train': -0.9177482352984265, 'b_time': -1.1013530685809614, 'b_cost': -4.743616385918859, 'asc_car': -0.8427066885931831}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33      0.5    -0.13    -
    1           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33     0.25    -0.15    -
    2           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33     0.12    -0.15    -
    3           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33    0.062    -0.15    -
    4           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33    0.031    -0.15    -
    5           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33    0.016    -0.15    -
    6           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33   0.0078    -0.15    -
    7           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33   0.0039    -0.15    -
    8           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33    0.002    -0.15    -
    9           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  0.00098    -0.15    -
   10           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  0.00049    -0.15    -
   11           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  0.00024    -0.15    -
   12           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  0.00012    -0.15    -
   13           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  6.1e-05    -0.15    -
   14           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  3.1e-05    -0.15    -
   15           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  1.5e-05    -0.15    -
   16           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  7.6e-06    -0.15    -
   17           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  3.8e-06    -0.15    -
   18           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  1.9e-06    -0.15    -
   19           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  9.5e-07    -0.15    -
   20           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  4.8e-07    -0.15    -
   21           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  2.4e-07    -0.15    -
   22           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  1.2e-07    -0.15    -
   23           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33    6e-08    -0.15    -
   24           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33    3e-08    -0.15    -
   25           -0.92            -1.1             1.7            -4.7           -0.84      1.3e+04       0.33  1.5e-08    -0.15    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.4901161193847656e-08
Number of iterations: 26
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:15.339115
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_1.0_second_deriv_0.5.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_1.0_second_deriv_0.5.iter
Starting values for the algorithm: {'asc_train': -0.8521877127156223, 'b_time': -1.1399084216136535, 'b_cost': -5.743351193771863, 'asc_car': -0.8194102568445889}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35      0.5    -0.13    -
    1           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35     0.25    -0.15    -
    2           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35     0.12    -0.16    -
    3           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35    0.062    -0.16    -
    4           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35    0.031    -0.16    -
    5           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35    0.016    -0.16    -
    6           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35   0.0078    -0.16    -
    7           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35   0.0039    -0.16    -
    8           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35    0.002    -0.16    -
    9           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  0.00098    -0.16    -
   10           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  0.00049    -0.16    -
   11           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  0.00024    -0.16    -
   12           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  0.00012    -0.16    -
   13           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  6.1e-05    -0.16    -
   14           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  3.1e-05    -0.16    -
   15           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  1.5e-05    -0.16    -
   16           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  7.6e-06    -0.16    -
   17           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  3.8e-06    -0.16    -
   18           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  1.9e-06    -0.16    -
   19           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  9.5e-07    -0.16    -
   20           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  4.8e-07    -0.16    -
   21           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  2.4e-07    -0.16    -
   22           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  1.2e-07    -0.16    -
   23           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35    6e-08    -0.16    -
   24           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35    3e-08    -0.16    -
   25           -0.85            -1.1             1.7            -5.7           -0.82      1.5e+04       0.35  1.5e-08    -0.16    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.4901161193847656e-08
Number of iterations: 26
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:15:15.879759
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_1.0_second_deriv_1.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_1.0_second_deriv_1.0.iter
Starting values for the algorithm: {'asc_train': -0.8556872571388953, 'b_time': -1.1356582164383995, 'b_cost': -5.765076262533967, 'asc_car': -0.8067049515176055}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35      0.5    -0.13    -
    1           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35     0.25    -0.15    -
    2           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35     0.12    -0.15    -
    3           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35    0.062    -0.16    -
    4           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35    0.031    -0.16    -
    5           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35    0.016    -0.16    -
    6           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35   0.0078    -0.16    -
    7           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35   0.0039    -0.16    -
    8           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35    0.002    -0.16    -
    9           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  0.00098    -0.16    -
   10           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  0.00049    -0.16    -
   11           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  0.00024    -0.16    -
   12           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  0.00012    -0.16    -
   13           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  6.1e-05    -0.16    -
   14           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  3.1e-05    -0.16    -
   15           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  1.5e-05    -0.16    -
   16           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  7.6e-06    -0.16    -
   17           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  3.8e-06    -0.16    -
   18           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  1.9e-06    -0.16    -
   19           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  9.5e-07    -0.16    -
   20           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  4.8e-07    -0.16    -
   21           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  2.4e-07    -0.16    -
   22           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  1.2e-07    -0.16    -
   23           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35    6e-08    -0.16    -
   24           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35    3e-08    -0.16    -
   25           -0.86            -1.1             1.7            -5.8           -0.81      1.5e+04       0.35  1.5e-08    -0.16    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.4901161193847656e-08
Number of iterations: 26
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:14.555175
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_10.0_second_deriv_0.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_10.0_second_deriv_0.0.iter
Starting values for the algorithm: {'asc_train': -0.9065791974431352, 'b_time': -1.087026479195047, 'b_cost': -8.97135215982439, 'asc_car': -0.8806637069901584}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38        5    -0.14    -
    1           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      2.5    -0.14    -
    2           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      1.2    -0.13    -
    3           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.62    -0.13    -
    4           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.31    -0.17    -
    5           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.16    -0.17    -
    6           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.078    -0.17    -
    7           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.039    -0.17    -
    8           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.02    -0.17    -
    9           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0098    -0.17    -
   10           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0049    -0.17    -
   11           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0024    -0.17    -
   12           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0012    -0.17    -
   13           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00061    -0.17    -
   14           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00031    -0.17    -
   15           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00015    -0.17    -
   16           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.6e-05    -0.17    -
   17           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.8e-05    -0.17    -
   18           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-05    -0.17    -
   19           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.5e-06    -0.17    -
   20           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  4.8e-06    -0.17    -
   21           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  2.4e-06    -0.17    -
   22           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.2e-06    -0.17    -
   23           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    6e-07    -0.17    -
   24           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    3e-07    -0.17    -
   25           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.5e-07    -0.17    -
   26           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.5e-08    -0.17    -
   27           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.7e-08    -0.17    -
   28           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-08    -0.17    -
   29           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.3e-09    -0.17    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 9.313225746154785e-09
Number of iterations: 30
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:16.260207
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_10.0_second_deriv_0.5.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_10.0_second_deriv_0.5.iter
Starting values for the algorithm: {'asc_train': -0.9065791974431352, 'b_time': -1.087026479195047, 'b_cost': -8.97135215982439, 'asc_car': -0.8806637069901584}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38        5    -0.14    -
    1           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      2.5    -0.14    -
    2           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      1.2    -0.13    -
    3           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.62    -0.13    -
    4           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.31    -0.17    -
    5           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.16    -0.17    -
    6           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.078    -0.17    -
    7           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.039    -0.17    -
    8           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.02    -0.17    -
    9           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0098    -0.17    -
   10           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0049    -0.17    -
   11           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0024    -0.17    -
   12           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0012    -0.17    -
   13           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00061    -0.17    -
   14           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00031    -0.17    -
   15           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00015    -0.17    -
   16           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.6e-05    -0.17    -
   17           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.8e-05    -0.17    -
   18           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-05    -0.17    -
   19           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.5e-06    -0.17    -
   20           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  4.8e-06    -0.17    -
   21           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  2.4e-06    -0.17    -
   22           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.2e-06    -0.17    -
   23           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    6e-07    -0.17    -
   24           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    3e-07    -0.17    -
   25           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.5e-07    -0.17    -
   26           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.5e-08    -0.17    -
   27           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.7e-08    -0.17    -
   28           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-08    -0.17    -
   29           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.3e-09    -0.17    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 9.313225746154785e-09
Number of iterations: 30
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:16.077689
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_True_radius_10.0_second_deriv_1.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_True_radius_10.0_second_deriv_1.0.iter
Starting values for the algorithm: {'asc_train': -0.9065791974431352, 'b_time': -1.087026479195047, 'b_cost': -8.97135215982439, 'asc_car': -0.8806637069901584}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38        5    -0.14    -
    1           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      2.5    -0.14    -
    2           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      1.2    -0.13    -
    3           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.62    -0.13    -
    4           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.31    -0.17    -
    5           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.16    -0.17    -
    6           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.078    -0.17    -
    7           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.039    -0.17    -
    8           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.02    -0.17    -
    9           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0098    -0.17    -
   10           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0049    -0.17    -
   11           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0024    -0.17    -
   12           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0012    -0.17    -
   13           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00061    -0.17    -
   14           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00031    -0.17    -
   15           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00015    -0.17    -
   16           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.6e-05    -0.17    -
   17           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.8e-05    -0.17    -
   18           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-05    -0.17    -
   19           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.5e-06    -0.17    -
   20           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  4.8e-06    -0.17    -
   21           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  2.4e-06    -0.17    -
   22           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.2e-06    -0.17    -
   23           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    6e-07    -0.17    -
   24           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    3e-07    -0.17    -
   25           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.5e-07    -0.17    -
   26           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.5e-08    -0.17    -
   27           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.7e-08    -0.17    -
   28           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-08    -0.17    -
   29           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.3e-09    -0.17    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 9.313225746154785e-09
Number of iterations: 30
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:16.137535
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_0.1_second_deriv_0.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_0.1_second_deriv_0.0.iter
Starting values for the algorithm: {'asc_train': -0.601186891685691, 'b_time': -1.1778597983711934, 'b_cost': -1.383790444871092, 'asc_car': 0.054103067538369035}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19     0.05    -0.59    -
    1            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19    0.025    -0.59    -
    2            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19    0.013    -0.59    -
    3            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19   0.0062     -0.6    -
    4            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19   0.0031     -0.6    -
    5            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19   0.0016     -0.6    -
    6            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  0.00078     -0.6    -
    7            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  0.00039     -0.6    -
    8            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19   0.0002     -0.6    -
    9            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  9.8e-05     -0.6    -
   10            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  4.9e-05     -0.6    -
   11            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  2.4e-05     -0.6    -
   12            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  1.2e-05     -0.6    -
   13            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  6.1e-06     -0.6    -
   14            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  3.1e-06     -0.6    -
   15            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  1.5e-06     -0.6    -
   16            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  7.6e-07     -0.6    -
   17            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  3.8e-07     -0.6    -
   18            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  1.9e-07     -0.6    -
   19            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  9.5e-08     -0.6    -
   20            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  4.8e-08     -0.6    -
   21            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  2.4e-08     -0.6    -
   22            -0.6            -1.2             1.7            -1.4           0.054      8.1e+03       0.19  1.2e-08     -0.6    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.1920928954904653e-08
Number of iterations: 23
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:12.907114
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_0.1_second_deriv_0.5.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_0.1_second_deriv_0.5.iter
Starting values for the algorithm: {'asc_train': -0.6301136023536084, 'b_time': -1.1397746332835221, 'b_cost': -1.372071694871092, 'asc_car': 0.014893851869430225}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19     0.05    -0.62    -
    1           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19    0.025    -0.62    -
    2           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19    0.013    -0.63    -
    3           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0063    -0.63    -
    4           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0031    -0.63    -
    5           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0016    -0.63    -
    6           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  0.00078    -0.63    -
    7           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  0.00039    -0.63    -
    8           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0002    -0.63    -
    9           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  9.8e-05    -0.63    -
   10           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  4.9e-05    -0.63    -
   11           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  2.4e-05    -0.63    -
   12           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.2e-05    -0.63    -
   13           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  6.1e-06    -0.63    -
   14           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  3.1e-06    -0.63    -
   15           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.5e-06    -0.63    -
   16           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  7.6e-07    -0.63    -
   17           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  3.8e-07    -0.63    -
   18           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.9e-07    -0.63    -
   19           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  9.5e-08    -0.63    -
   20           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  4.8e-08    -0.63    -
   21           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  2.4e-08    -0.63    -
   22           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.2e-08    -0.63    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.1920928955078126e-08
Number of iterations: 23
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:12.976760
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_0.1_second_deriv_1.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_0.1_second_deriv_1.0.iter
Starting values for the algorithm: {'asc_train': -0.6301136023536084, 'b_time': -1.1397746332835221, 'b_cost': -1.372071694871092, 'asc_car': 0.014893851869430225}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19     0.05    -0.62    -
    1           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19    0.025    -0.62    -
    2           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19    0.013    -0.63    -
    3           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0063    -0.63    -
    4           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0031    -0.63    -
    5           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0016    -0.63    -
    6           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  0.00078    -0.63    -
    7           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  0.00039    -0.63    -
    8           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19   0.0002    -0.63    -
    9           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  9.8e-05    -0.63    -
   10           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  4.9e-05    -0.63    -
   11           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  2.4e-05    -0.63    -
   12           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.2e-05    -0.63    -
   13           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  6.1e-06    -0.63    -
   14           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  3.1e-06    -0.63    -
   15           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.5e-06    -0.63    -
   16           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  7.6e-07    -0.63    -
   17           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  3.8e-07    -0.63    -
   18           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.9e-07    -0.63    -
   19           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  9.5e-08    -0.63    -
   20           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  4.8e-08    -0.63    -
   21           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  2.4e-08    -0.63    -
   22           -0.63            -1.1             1.7            -1.4           0.015        8e+03       0.19  1.2e-08    -0.63    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.1920928955078126e-08
Number of iterations: 23
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:13.001446
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_1.0_second_deriv_0.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_1.0_second_deriv_0.0.iter
Starting values for the algorithm: {'asc_train': -0.8744628927153982, 'b_time': -1.1071507932650737, 'b_cost': -6.476004177198439, 'asc_car': -0.8371452296773607}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36      0.5    -0.13    -
    1           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36     0.25    -0.16    -
    2           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36     0.12    -0.16    -
    3           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.062    -0.16    -
    4           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.031    -0.16    -
    5           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.016    -0.16    -
    6           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36   0.0078    -0.16    -
    7           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36   0.0039    -0.16    -
    8           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.002    -0.16    -
    9           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00098    -0.16    -
   10           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00049    -0.16    -
   11           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00024    -0.16    -
   12           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00012    -0.16    -
   13           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  6.1e-05    -0.16    -
   14           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  3.1e-05    -0.16    -
   15           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.5e-05    -0.16    -
   16           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  7.6e-06    -0.16    -
   17           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  3.8e-06    -0.16    -
   18           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.9e-06    -0.16    -
   19           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  9.5e-07    -0.16    -
   20           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  4.8e-07    -0.16    -
   21           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  2.4e-07    -0.16    -
   22           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.2e-07    -0.16    -
   23           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    6e-08    -0.16    -
   24           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    3e-08    -0.16    -
   25           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.5e-08    -0.16    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.4901161193847656e-08
Number of iterations: 26
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:14.413125
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_1.0_second_deriv_0.5.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_1.0_second_deriv_0.5.iter
Starting values for the algorithm: {'asc_train': -0.8744628927153982, 'b_time': -1.1071507932650737, 'b_cost': -6.476004177198439, 'asc_car': -0.8371452296773607}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36      0.5    -0.13    -
    1           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36     0.25    -0.16    -
    2           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36     0.12    -0.16    -
    3           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.062    -0.16    -
    4           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.031    -0.16    -
    5           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.016    -0.16    -
    6           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36   0.0078    -0.16    -
    7           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36   0.0039    -0.16    -
    8           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.002    -0.16    -
    9           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00098    -0.16    -
   10           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00049    -0.16    -
   11           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00024    -0.16    -
   12           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00012    -0.16    -
   13           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  6.1e-05    -0.16    -
   14           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  3.1e-05    -0.16    -
   15           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.5e-05    -0.16    -
   16           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  7.6e-06    -0.16    -
   17           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  3.8e-06    -0.16    -
   18           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.9e-06    -0.16    -
   19           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  9.5e-07    -0.16    -
   20           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  4.8e-07    -0.16    -
   21           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  2.4e-07    -0.16    -
   22           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.2e-07    -0.16    -
   23           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    6e-08    -0.16    -
   24           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    3e-08    -0.16    -
   25           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.5e-08    -0.16    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.4901161193847656e-08
Number of iterations: 26
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:14.311400
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_1.0_second_deriv_1.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_1.0_second_deriv_1.0.iter
Starting values for the algorithm: {'asc_train': -0.8744628927153982, 'b_time': -1.1071507932650737, 'b_cost': -6.476004177198439, 'asc_car': -0.8371452296773607}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36      0.5    -0.13    -
    1           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36     0.25    -0.16    -
    2           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36     0.12    -0.16    -
    3           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.062    -0.16    -
    4           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.031    -0.16    -
    5           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.016    -0.16    -
    6           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36   0.0078    -0.16    -
    7           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36   0.0039    -0.16    -
    8           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    0.002    -0.16    -
    9           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00098    -0.16    -
   10           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00049    -0.16    -
   11           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00024    -0.16    -
   12           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  0.00012    -0.16    -
   13           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  6.1e-05    -0.16    -
   14           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  3.1e-05    -0.16    -
   15           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.5e-05    -0.16    -
   16           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  7.6e-06    -0.16    -
   17           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  3.8e-06    -0.16    -
   18           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.9e-06    -0.16    -
   19           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  9.5e-07    -0.16    -
   20           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  4.8e-07    -0.16    -
   21           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  2.4e-07    -0.16    -
   22           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.2e-07    -0.16    -
   23           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    6e-08    -0.16    -
   24           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36    3e-08    -0.16    -
   25           -0.87            -1.1             1.7            -6.5           -0.84      1.6e+04       0.36  1.5e-08    -0.16    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 1.4901161193847656e-08
Number of iterations: 26
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:14.518952
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_10.0_second_deriv_0.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_10.0_second_deriv_0.0.iter
Starting values for the algorithm: {'asc_train': -0.9065791974431352, 'b_time': -1.087026479195047, 'b_cost': -8.97135215982439, 'asc_car': -0.8806637069901584}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38        5    -0.14    -
    1           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      2.5    -0.14    -
    2           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      1.2    -0.13    -
    3           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.62    -0.13    -
    4           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.31    -0.17    -
    5           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.16    -0.17    -
    6           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.078    -0.17    -
    7           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.039    -0.17    -
    8           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.02    -0.17    -
    9           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0098    -0.17    -
   10           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0049    -0.17    -
   11           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0024    -0.17    -
   12           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0012    -0.17    -
   13           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00061    -0.17    -
   14           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00031    -0.17    -
   15           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00015    -0.17    -
   16           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.6e-05    -0.17    -
   17           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.8e-05    -0.17    -
   18           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-05    -0.17    -
   19           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.5e-06    -0.17    -
   20           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  4.8e-06    -0.17    -
   21           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  2.4e-06    -0.17    -
   22           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.2e-06    -0.17    -
   23           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    6e-07    -0.17    -
   24           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    3e-07    -0.17    -
   25           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.5e-07    -0.17    -
   26           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.5e-08    -0.17    -
   27           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.7e-08    -0.17    -
   28           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-08    -0.17    -
   29           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.3e-09    -0.17    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 9.313225746154785e-09
Number of iterations: 30
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:16.208890
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_10.0_second_deriv_0.5.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_10.0_second_deriv_0.5.iter
Starting values for the algorithm: {'asc_train': -0.9065791974431352, 'b_time': -1.087026479195047, 'b_cost': -8.97135215982439, 'asc_car': -0.8806637069901584}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38        5    -0.14    -
    1           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      2.5    -0.14    -
    2           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      1.2    -0.13    -
    3           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.62    -0.13    -
    4           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.31    -0.17    -
    5           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.16    -0.17    -
    6           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.078    -0.17    -
    7           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.039    -0.17    -
    8           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.02    -0.17    -
    9           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0098    -0.17    -
   10           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0049    -0.17    -
   11           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0024    -0.17    -
   12           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0012    -0.17    -
   13           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00061    -0.17    -
   14           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00031    -0.17    -
   15           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00015    -0.17    -
   16           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.6e-05    -0.17    -
   17           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.8e-05    -0.17    -
   18           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-05    -0.17    -
   19           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.5e-06    -0.17    -
   20           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  4.8e-06    -0.17    -
   21           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  2.4e-06    -0.17    -
   22           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.2e-06    -0.17    -
   23           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    6e-07    -0.17    -
   24           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    3e-07    -0.17    -
   25           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.5e-07    -0.17    -
   26           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.5e-08    -0.17    -
   27           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.7e-08    -0.17    -
   28           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-08    -0.17    -
   29           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.3e-09    -0.17    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 9.313225746154785e-09
Number of iterations: 30
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:16.093014
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
Biogeme parameters read from biogeme.toml.
*** Initial values of the parameters are obtained from the file __b05normal_mixture_algo_cg_False_radius_10.0_second_deriv_1.0.iter
Parameter values restored from __b05normal_mixture_algo_cg_False_radius_10.0_second_deriv_1.0.iter
Starting values for the algorithm: {'asc_train': -0.9065791974431352, 'b_time': -1.087026479195047, 'b_cost': -8.97135215982439, 'asc_car': -0.8806637069901584}
As the model is rather complex, we cancel the calculation of second derivatives. If you want to control the parameters, change the algorithm from "automatic" to "simple_bounds" in the TOML file.
Optimization algorithm: hybrid Newton/BFGS with simple bounds [simple_bounds]
** Optimization: BFGS with trust region for simple bounds
Iter.       asc_train          b_time        b_time_s          b_cost         asc_car     Function    Relgrad   Radius      Rho
    0           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38        5    -0.14    -
    1           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      2.5    -0.14    -
    2           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38      1.2    -0.13    -
    3           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.62    -0.13    -
    4           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.31    -0.17    -
    5           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.16    -0.17    -
    6           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.078    -0.17    -
    7           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    0.039    -0.17    -
    8           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38     0.02    -0.17    -
    9           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0098    -0.17    -
   10           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0049    -0.17    -
   11           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0024    -0.17    -
   12           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38   0.0012    -0.17    -
   13           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00061    -0.17    -
   14           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00031    -0.17    -
   15           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  0.00015    -0.17    -
   16           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.6e-05    -0.17    -
   17           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.8e-05    -0.17    -
   18           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-05    -0.17    -
   19           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.5e-06    -0.17    -
   20           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  4.8e-06    -0.17    -
   21           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  2.4e-06    -0.17    -
   22           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.2e-06    -0.17    -
   23           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    6e-07    -0.17    -
   24           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38    3e-07    -0.17    -
   25           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.5e-07    -0.17    -
   26           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  7.5e-08    -0.17    -
   27           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  3.7e-08    -0.17    -
   28           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  1.9e-08    -0.17    -
   29           -0.91            -1.1             1.7              -9           -0.88        2e+04       0.38  9.3e-09    -0.17    -
Optimization algorithm has *not* converged.
Algorithm: BFGS with trust region for simple bound constraints
Cause of termination: Trust region is too small: 9.313225746154785e-09
Number of iterations: 30
Proportion of Hessian calculation: 0/1 = 0.0%
Optimization time: 0:00:16.467547
Calculate second derivatives and BHHH
It seems that the optimization algorithm did not converge. Therefore, the results may not correspond to the maximum likelihood estimator. Check the specification of the model, or the criteria for convergence of the algorithm.
display(summary)
    InfeasibleCG  ...                                   TerminationCause
0           True  ...             Relative gradient = 2.9e-06 <= 6.1e-06
1           True  ...  Trust region is too small: 1.1920928955078126e-08
2           True  ...  Trust region is too small: 1.1920928955078126e-08
3           True  ...  Trust region is too small: 1.4901161193847656e-08
4           True  ...  Trust region is too small: 1.4901161193847656e-08
5           True  ...  Trust region is too small: 1.4901161193847656e-08
6           True  ...   Trust region is too small: 9.313225746154785e-09
7           True  ...   Trust region is too small: 9.313225746154785e-09
8           True  ...   Trust region is too small: 9.313225746154785e-09
9          False  ...  Trust region is too small: 1.1920928954904653e-08
10         False  ...  Trust region is too small: 1.1920928955078126e-08
11         False  ...  Trust region is too small: 1.1920928955078126e-08
12         False  ...  Trust region is too small: 1.4901161193847656e-08
13         False  ...  Trust region is too small: 1.4901161193847656e-08
14         False  ...  Trust region is too small: 1.4901161193847656e-08
15         False  ...   Trust region is too small: 9.313225746154785e-09
16         False  ...   Trust region is too small: 9.313225746154785e-09
17         False  ...   Trust region is too small: 9.313225746154785e-09

[18 rows x 9 columns]
SUMMARY_FILE = '05normal_mixture_all_algos.csv'
summary.to_csv(SUMMARY_FILE, index=False)
print(f'Summary reported in file {SUMMARY_FILE}')
Summary reported in file 05normal_mixture_all_algos.csv

Total running time of the script: (69 minutes 15.932 seconds)

Gallery generated by Sphinx-Gallery