biogeme.check_parameters module

Functions to verify the validity of parameters

author:

Michel Bierlaire

date:

Thu Dec 1 16:22:34 2022

biogeme.check_parameters.check_algo_name(x)[source]

Return true if x is a valid algorithm name

Parameters:

x (bool | int | float | str) – value of the parameter to check

Return type:

tuple[bool, str | None]

biogeme.check_parameters.is_boolean(x)[source]

Return true if x is a boolean

Parameters:

x (float) – value of the parameter to check

Return type:

tuple[bool, str | None]

biogeme.check_parameters.is_integer(x)[source]

Return true if x is integer

Parameters:

x (bool | int | float | str) – value of the parameter to check

Return type:

tuple[bool, str | None]

biogeme.check_parameters.is_non_negative(x)[source]

Return true if x is non_negative

Parameters:

x (bool | int | float | str) – value of the parameter to check

Return type:

tuple[bool, str | None]

biogeme.check_parameters.is_number(x)[source]

Return true if x is a number

Parameters:

x (bool | int | float | str) – value of the parameter to check

Return type:

tuple[bool, str | None]

biogeme.check_parameters.is_positive(x)[source]

Return true if x is positive

Parameters:

x (bool | int | float | str) – value of the parameter to check

Return type:

tuple[bool, str | None]

biogeme.check_parameters.zero_one(x)[source]

Return true if x is between zero and one

Parameters:

x (bool | int | float | str) – value of the parameter to check

Return type:

tuple[bool, str | None]