biogeme.dict_of_formulas module

Functions managing the dict of formulas used by Biogeme

author:

Michel Bierlaire

date:

Mon May 13 13:42:50 2024

biogeme.dict_of_formulas.check_validity(dict_of_formulas)[source]

Verifies if the formulas are Biogeme expressions. If not, an exception is raised

Return type:

None

Parameters:

dict_of_formulas (dict[str, Any])

biogeme.dict_of_formulas.get_expression(dict_of_formulas, valid_keywords)[source]

Extract the formula for specific keywords

Parameters:
  • dict_of_formulas (dict[str, Expression]) – as the name says…

  • valid_keywords (list[str]) – keywords that are considered valid to represent the expression

Return type:

Expression | None

Returns:

the requested expression

biogeme.dict_of_formulas.is_similar_to(word_1, word_2)[source]

Checks if two words are similar.

Return type:

bool

Parameters:
  • word_1 (str)

  • word_2 (str)