inFairness.postprocessing.base_postprocessing module#
- class inFairness.postprocessing.base_postprocessing.BasePostProcessing(distance_x, is_output_probas)[source]#
Bases:
object
Base class for Post-Processing methods
- Parameters:
distance_x (inFairness.distances.Distance) – Distance matrix in the input space
is_output_probas (bool) – True if the data_Y (model output) are probabilities implying that this is a classification setting, and False if the data_Y are in euclidean space implying that this is a regression setting.
- add_datapoints(X: Tensor, y: Tensor)[source]#
Add datapoints to the post-processing method
- Parameters:
X (torch.Tensor) – New input datapoints
y (torch.Tensor) – New output datapoints
- property data#
Input and Output data used for post-processing
- Returns:
data – A tuple of (X, Y) data points
- Return type:
Tuple(torch.Tensor, torch.Tensor)
- property distance_matrix#
Distance matrix
- Returns:
distance_matrix – Matrix of distances of shape (N, N) where N is the number of data samples
- Return type: