biogeme.function_output module

Object containing the output of numerical expression calculation

class biogeme.function_output.BiogemeDisaggregateFunctionOutput(functions, gradients=None, hessians=None, bhhhs=None)[source]

Bases: object

Output of a function calculation

Parameters:
  • functions (ndarray)

  • gradients (ndarray | None)

  • hessians (ndarray | None)

  • bhhhs (ndarray | None)

bhhhs: ndarray | None = None
functions: ndarray
gradients: ndarray | None = None
hessians: ndarray | None = None
unique_entry()[source]

When there is only one entry, we generate the BiogemeFunctionOutput object

Return type:

BiogemeFunctionOutput | None

class biogeme.function_output.BiogemeDisaggregateFunctionOutputSmartOutputProxy(data)[source]

Bases: SmartOutputProxy

class biogeme.function_output.BiogemeFunctionOutput(function, gradient=None, hessian=None, bhhh=None)[source]

Bases: FunctionOutput

Output of a function calculation

Parameters:
  • function (float)

  • gradient (ndarray | None)

  • hessian (ndarray | None)

  • bhhh (ndarray | None)

bhhh: ndarray | None = None
class biogeme.function_output.BiogemeFunctionOutputSmartOutputProxy(data)[source]

Bases: SmartOutputProxy

class biogeme.function_output.FunctionOutput(function, gradient=None, hessian=None)[source]

Bases: object

Output of a function calculation

Parameters:
  • function (float)

  • gradient (ndarray | None)

  • hessian (ndarray | None)

function: float
gradient: ndarray | None = None
hessian: ndarray | None = None
class biogeme.function_output.NamedBiogemeDisaggregateFunctionOutput(function_output, mapping)[source]

Bases: object

Output of a function calculation

Parameters:
class biogeme.function_output.NamedBiogemeFunctionOutput(function_output, mapping)[source]

Bases: NamedFunctionOutput

Output of a function calculation, with names of variables

Parameters:
class biogeme.function_output.NamedFunctionOutput(function_output, mapping)[source]

Bases: object

Output of a function calculation, with names of variables

Parameters:
property mapping
class biogeme.function_output.SmartOutputProxy(data)[source]

Bases: object

Backward compatibility allowing to unpack the results into a tuple

biogeme.function_output.convert_to_dict(the_sequence, the_map)[source]

Convert an indexed sequence into a dict mapping a name to the elements.

Parameters:
  • the_sequence (Sequence[TypeVar(GenericType)]) – sequence of element to convert

  • the_map (dict[str, int]) – dict mapping the names with their index in the sequence.

Return type:

dict[str, TypeVar(GenericType)]

Returns:

the sequence converted into dict