biogeme.negative_likelihood module

Class that provides the function to the optimization algorithm

author:

Michel Bierlaire

date:

Wed Nov 30 10:17:26 2022

class biogeme.negative_likelihood.NegativeLikelihood(dimension, like, like_derivatives, parameters=None)[source]

Bases: FunctionToMinimize

Provides the value of the function to be minimized, as well as its derivatives. To be used by the optimization package.

Parameters:
  • dimension (int)

  • like (Callable[[ndarray, bool, float | None], float])

  • like_derivatives (Callable[[ndarray, bool, bool, bool, float | None], FunctionOutput])

dimension()[source]

Provides the number of variables of the problem

Return type:

int

like_derivatives: Callable[[ndarray, bool, bool, bool, float | None], FunctionOutput]

function calculating the log likelihood and its derivatives.

the_dimension: int

number of parameters to estimate