biogeme.expressions.variable module¶
Arithmetic expressions accepted by Biogeme: variables
Michel Bierlaire Fri Jun 27 2025, 14:43:42
- class biogeme.expressions.variable.Variable(name)[source]¶
Bases:
Elementary
Explanatory variable
This represents the explanatory variables of the choice model. Typically, they come from the data set.
- Parameters:
name (str)
- 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:
- expression_type = 1¶
- 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]
- property safe_variable_id: int¶
Check the presence of the ID before using it