Skip to content
Snippets Groups Projects
Commit 71fd1033 authored by Bernhard Johannes Berger's avatar Bernhard Johannes Berger
Browse files

Fixed bug in density estimation.

parent 8fd131f0
No related branches found
No related tags found
No related merge requests found
Pipeline #240858 passed
......@@ -137,7 +137,7 @@ public abstract class DensityBasedFitness extends FitnessDecorator {
final double probability = sourceData[i].probability(((Number)candidate.get(i)).doubleValue());
final double offset = 1 / ((Number)ranges.get(surrogate.getInputSpecification().get(i))).doubleValue();
result *= Math.min(1.0, probability + offset);
result *= Math.max(1.0, probability + offset);
}
return result;
......@@ -150,6 +150,6 @@ public abstract class DensityBasedFitness extends FitnessDecorator {
final double probability = targetData.probability(predicted);
final double offset = 1 / ((Number)ranges.get(surrogate.getOutputSpecification().get(0))).doubleValue();
return Math.min(1.0, probability + offset);
return Math.max(1.0, probability + offset);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment