inFairness.postprocessing.distance_ds module#

class inFairness.postprocessing.distance_ds.DistanceStructure(distance_x)[source]#

Bases: object

Data structure to store and track the distance matrix between data points

Parameters:

distance_x (inFairness.distances.Distance) – Distance metric in the input space

build_distance_matrix(data_X)[source]#

Build the distance matrix between input data samples data_X

Parameters:

data_X (torch.Tensor) – Data points between which the distance matrix is to be computed

reset()[source]#

Reset the state of the data structure back to its initial state