biogeme.segmentation.segmentation_context module

Class representing the characterization of a discrete segmentation.

A discrete segmentation divides a population based on the values of a socio-economic variable, mapping each value to a category name. A reference category is defined for comparison in model estimation.

Michel Bierlaire Thu Apr 3 10:08:10 2025

class biogeme.segmentation.segmentation_context.DiscreteSegmentationTuple(variable, mapping, reference=None)[source]

Bases: object

Characterization of a discrete segmentation.

This class is used to define how a discrete socio-economic variable is mapped to category names for segmentation purposes. One category is selected as the reference for use in estimation.

Parameters:
  • variable (Variable | str)

  • mapping (dict[int, str])

  • reference (str | None)