biogeme.segmentation.segmentation module¶
Class that provides some automatic specification for segmented parameters
Michel Bierlaire Thu Apr 3 12:07:44 2025
- class biogeme.segmentation.segmentation.Segmentation(beta, segmentation_tuples, prefix='segmented')[source]¶
Bases:
object
Segmentation of a parameter, possibly with multiple socio-economic variables
- Parameters:
beta (Beta)
segmentation_tuples (Iterable[DiscreteSegmentationTuple])
prefix (str)
- beta_ref_code()[source]¶
Constructs the Python code for the parameter
- Returns:
Python code
- Return type:
str
- calculates_estimated_values(estimation_results)[source]¶
Calculates the estimated values of the parameter for each segment.
- Parameters:
estimation_results (
EstimationResults
) – results of the estimation- Return type:
DataFrame
- Returns:
a pandas data frame with the definition of the segments and the corresponding values for the
coefficient