biogeme.expressions.linear_utility module¶
Arithmetic expressions accepted by Biogeme: nary operators
Michel Bierlaire Sat Sep 9 15:29:36 2023
- class biogeme.expressions.linear_utility.LinearUtility(list_of_terms)[source]¶
Bases:
Expression
When the utility function is linear, it is expressed as a list of terms, where a parameter multiplies a variable.
- Parameters:
list_of_terms (list[LinearTermTuple])
- betas¶
list of parameters
- deep_flat_copy()[source]¶
Provides a copy of the expression. It is deep in the sense that it generates copies of the children. It is flat in the sense that any MultipleExpression is transformed into the currently selected expression. The flat part is irrelevant for this expression.
- Return type:
- list_of_terms¶
List of terms
- recursive_construct_jax_function(numerically_safe)[source]¶
Generates a function to be used by biogeme_jax. Must be overloaded by each expression :rtype:
Callable
[[Array
,Array
,Array
,Array
],array
] :return: the function takes two parameters: the parameters, and one row of the database.- Parameters:
numerically_safe (bool)
- Return type:
Callable[[Array, Array, Array, Array], array]
- variables¶
list of variables