biogeme.catalog.segmentation_catalog module

Defines a segmentation catalog

Michel Bierlaire Wed Apr 16 18:35:02 2025

class biogeme.catalog.segmentation_catalog.SegmentedParameters(beta_parameters, alternatives)[source]

Bases: object

Class managing the names of segmented and alternative specific parameters

Parameters:
  • beta_parameters (list[Beta])

  • alternatives (tuple[str, ...])

get_beta(beta_index, alternative)[source]

Return the Beta parameters for the given index and given alternative

Parameters:
  • beta_index (int) – index of the Beta in the generic list

  • alternative (str or None) – name of the alternative, or None for the generic parameter

get_index(beta_index, alternative)[source]
Returns the index in the list of the Beta parameter with

the given index specific to the given alternative

Parameters:
  • beta_index (int) – index of the Beta in the generic list

  • alternative (str or None) – name of the alternative, or None for the generic parameter

biogeme.catalog.segmentation_catalog.segmentation_catalogs(generic_name, beta_parameters, potential_segmentations, maximum_number)[source]

Generate catalogs for potential segmentations of a parameter

Parameters:
  • generic_name (str) – name used for the definition of the group of catalogs

  • beta_parameters (list[Beta]) – list of parameters to be segmented

  • potential_segmentations (tuple[DiscreteSegmentationTuple, ...]) – tuple of potential segmentations

  • maximum_number (int) – maximum number of segmentations to consider

Return type:

list[Catalog]