biogeme.native_draws module
- biogeme.native_draws.MLHS_anti(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- class biogeme.native_draws.RandomNumberGeneratorTuple(generator, description)[source]
Bases:
NamedTuple
- Parameters:
generator (Callable[[int, int], ndarray])
description (str)
-
description:
str
Alias for field number 1
- classmethod from_tuple(the_tuple)[source]
For backward compatibility, this constructor accepts a regular tuple as input
- Return type:
- Parameters:
the_tuple ([Callable[[int, int], numpy.ndarray], <class 'str'>])
-
generator:
Callable
[[int
,int
],ndarray
] Alias for field number 0
- biogeme.native_draws.convert_random_generator_tuple(the_tuple)[source]
Generates an object of the correct type. Designed for backward compatibility
- Parameters:
the_tuple (
RandomNumberGeneratorTuple
|tuple
[Callable
[[int
,int
],ndarray
],str
]) – the tuple in the old or new format.- Return type:
- Returns:
the tuple in the new format
- biogeme.native_draws.description_of_native_draws()[source]
Describe the draws available draws with Biogeme
- Returns:
dict, where the keys are the names of the draws, and the value their description
- Return type:
dict[str, str]
Example of output:
{'UNIFORM: Uniform U[0, 1]', 'UNIFORM_ANTI: Antithetic uniform U[0, 1]'], 'NORMAL: Normal N(0, 1) draws'}
- Return type:
dict
- biogeme.native_draws.halton2(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.halton3(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.halton5(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.normal_MLHS(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.normal_MLHS_anti(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.normal_antithetic(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.normal_halton2(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.normal_halton3(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.normal_halton5(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.symm_MLHS(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.symm_MLHS_anti(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.symm_halton2(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.symm_halton3(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.symm_halton5(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)
- biogeme.native_draws.symm_uniform(sample_size, number_of_draws)[source]
- Return type:
ndarray
- Parameters:
sample_size (int)
number_of_draws (int)