Skip to content

Commit

Permalink
Try to address issue #457
Browse files Browse the repository at this point in the history
  • Loading branch information
prasser committed Feb 9, 2024
1 parent c8c26c9 commit 984f38f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ public static double getEntropyBasedInformationLoss(Transformation<?> transforma
// IL = log(share_1 * share_2 * ... * share_n) / maxIL + 1
//
// For attributes transformed with microaggregation, we set share_i to 1/#distinct-values-in-eq-class and size_i to the #distinct-values-in-dataset


// If there is no information, no information can be lost
if (maxIL == 0 || Double.isNaN(maxIL) || Double.isInfinite(maxIL)) {
return 0d;
}

int[] generalization = transformation.getGeneralization();
double infoLoss = 1d;
entry.read();
Expand Down

0 comments on commit 984f38f

Please sign in to comment.