Distortion — Map of Objects

Skip to main content
`Ctrl`+`K`

# Distortion

calculate_distortion(experiment: Experiment, election_ids: list[str] | None = None, max_distance_percentage: float = 1.0, normalize: bool = True, diameter: tuple = ('ID', 'UN')) → dict

  Calculates the distortion of the distances between the points in the experiment.

calculate_distortion_naive(experiment: Experiment, election_ids: list[str] | None = None, max_distance_percentage: float = 1.0, normalize: bool = True, diameter: tuple = ('ID', 'UN')) → dict

  Calculates the distortion of the distances between the points in the experiment using a naive approach.