mixle.stats.rankings.representations module¶
Unambiguous value types for the two common permutation representations.
- class ItemOrdering(values)[source]
-
A permutation whose entry at each rank is the item occupying that rank.
- to_rank_vector()[source]
Return the inverse permutation, indexed by item.
- Return type:
RankVector
- class RankVector(values)[source]
-
A permutation whose entry for each item is that item’s rank.
- to_item_ordering()[source]
Return the inverse permutation, indexed by rank.
- Return type:
ItemOrdering
- item_ordering_to_rank_vector(value)[source]
Convert
x[rank] = itemto ownedrank[item] = rankdata.