categories
This module gathers structure used to define categories.
- class BoundedCategoryProfile(lower=None, upper=None)
Bases:
objectThis class represents a category defined by profiles as its limits.
- Parameters
lower (Union[Values[OrdinalScale], None]) – lower profile
upper (Union[Values[OrdinalScale], None]) – upper profile
- Raises
ValueError – if upper doesn’t dominate lower
- classmethod profiles_partition(profiles, lowest=True, upmost=True)
Build a list of bounded category profiles.
- Parameters
profiles (PerformanceTable[OrdinalScale]) –
lowest (bool) – if
Trueadd a category profile with last profile as its upper bound (and no lower bound)upmost (bool) – if
Trueadd a category profile with first profile as its lower bound (and no upper bound)
- Raises
ValueError – if any profile doesn’t dominate its predecessor
- Returns
list of bounded category profiles in ascending domination order
- Return type
List[BoundedCategoryProfile]
- class CentralCategoryProfile(center)
Bases:
objectThis class represents a category defined by a central profile.
- Parameters
center (Values[OrdinalScale]) –