inFairness.postprocessing.data_ds module#

class inFairness.postprocessing.data_ds.PostProcessingDataStore(distance_x)[source]#

Bases: object

Data strucuture to hold the data used for post-processing

Parameters:

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

add_datapoints(X: Tensor, Y: Tensor)[source]#

Add new datapoints to the existing datapoints

Parameters:
  • X (torch.Tensor) – New data points to add to the input data X should have the same dimensions as previous data along all dimensions except the first (batch) dimension

  • Y (torch.Tensor) – New data points to add to the output data Y should have the same dimensions as previous data along all dimensions except the first (batch) dimension

add_datapoints_X(X: Tensor)[source]#

Add datapoints to the input datapoints X

Parameters:

X (torch.Tensor) – New data points to add to the input data X should have the same dimensions as previous data along all dimensions except the first (batch) dimension

add_datapoints_Y(Y: Tensor)[source]#

Add datapoints to the output datapoints Y

Parameters:

Y (torch.Tensor) – New data points to add to the output data Y should have the same dimensions as previous data along all dimensions except the first (batch) dimension

property distance_matrix#

(N, N)

Type:

Distances between N data points. Shape

reset()[source]#

Reset the data structure holding the data points for post-processing. Invoking this operation removes all datapoints and resets the state back to the initial state.