From 2eb2a69c17362042e51ee6bf2f4beb2b2ae3c83c Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Sun, 12 May 2019 14:30:16 +0200 Subject: [PATCH] rename 'percentile' plots to 'cumulative distribution' --- ...va => CumulativeDistributionCustomAggregator.java} | 4 ++-- ...regate.java => CumulativeDistributionHandler.java} | 8 ++++---- .../org/lucares/pdbui/PlotSettingsTransformer.java | 6 +++--- .../main/java/org/lucares/pdbui/domain/Aggregate.java | 11 ++++++++++- pdb-ui/src/main/resources/resources/js/ui.js | 4 ++-- 5 files changed, 21 insertions(+), 12 deletions(-) rename pdb-plotting/src/main/java/org/lucares/pdb/plot/api/{PercentileCustomAggregator.java => CumulativeDistributionCustomAggregator.java} (88%) rename pdb-plotting/src/main/java/org/lucares/pdb/plot/api/{PercentileAggregate.java => CumulativeDistributionHandler.java} (81%) diff --git a/pdb-plotting/src/main/java/org/lucares/pdb/plot/api/PercentileCustomAggregator.java b/pdb-plotting/src/main/java/org/lucares/pdb/plot/api/CumulativeDistributionCustomAggregator.java similarity index 88% rename from pdb-plotting/src/main/java/org/lucares/pdb/plot/api/PercentileCustomAggregator.java rename to pdb-plotting/src/main/java/org/lucares/pdb/plot/api/CumulativeDistributionCustomAggregator.java index cf210e2..8e5b0b4 100644 --- a/pdb-plotting/src/main/java/org/lucares/pdb/plot/api/PercentileCustomAggregator.java +++ b/pdb-plotting/src/main/java/org/lucares/pdb/plot/api/CumulativeDistributionCustomAggregator.java @@ -11,7 +11,7 @@ import java.nio.file.Path; import org.lucares.collections.LongList; -public class PercentileCustomAggregator implements CustomAggregator { +public class CumulativeDistributionCustomAggregator implements CustomAggregator { private final static int POINTS = 500; @@ -19,7 +19,7 @@ public class PercentileCustomAggregator implements CustomAggregator { private final Path tmpDir; - public PercentileCustomAggregator(final Path tmpDir) { + public CumulativeDistributionCustomAggregator(final Path tmpDir) { this.tmpDir = tmpDir; } diff --git a/pdb-plotting/src/main/java/org/lucares/pdb/plot/api/PercentileAggregate.java b/pdb-plotting/src/main/java/org/lucares/pdb/plot/api/CumulativeDistributionHandler.java similarity index 81% rename from pdb-plotting/src/main/java/org/lucares/pdb/plot/api/PercentileAggregate.java rename to pdb-plotting/src/main/java/org/lucares/pdb/plot/api/CumulativeDistributionHandler.java index 00d0f54..9d7b9bb 100644 --- a/pdb-plotting/src/main/java/org/lucares/pdb/plot/api/PercentileAggregate.java +++ b/pdb-plotting/src/main/java/org/lucares/pdb/plot/api/CumulativeDistributionHandler.java @@ -5,22 +5,22 @@ import java.util.Collection; import org.lucares.recommind.logs.DataSeries; -public class PercentileAggregate implements AggregateHandler { +public class CumulativeDistributionHandler implements AggregateHandler { @Override public CustomAggregator createCustomAggregator(final Path tmpDir, final long fromEpochMilli, final long toEpochMilli) { - return new PercentileCustomAggregator(tmpDir); + return new CumulativeDistributionCustomAggregator(tmpDir); } - public PercentileAggregate() { + public CumulativeDistributionHandler() { } @Override public void addGnuplotDefinitions(final StringBuilder result, final String separator, final Collection dataSeries) { - appendln(result, "set x2label \"Percentile\""); + appendln(result, "set x2label \"Cumulative Distribution\""); appendln(result, "set format x2 \"%.0f%%\""); appendln(result, "set x2tics 5"); appendln(result, "set x2range [\"0\":\"100\"]"); diff --git a/pdb-ui/src/main/java/org/lucares/pdbui/PlotSettingsTransformer.java b/pdb-ui/src/main/java/org/lucares/pdbui/PlotSettingsTransformer.java index 20fb1eb..77ebf23 100644 --- a/pdb-ui/src/main/java/org/lucares/pdbui/PlotSettingsTransformer.java +++ b/pdb-ui/src/main/java/org/lucares/pdbui/PlotSettingsTransformer.java @@ -3,7 +3,7 @@ package org.lucares.pdbui; import org.lucares.pdb.plot.api.AggregateHandler; import org.lucares.pdb.plot.api.NullAggregate; import org.lucares.pdb.plot.api.ParallelRequestsAggregate; -import org.lucares.pdb.plot.api.PercentileAggregate; +import org.lucares.pdb.plot.api.CumulativeDistributionHandler; import org.lucares.pdb.plot.api.PlotSettings; import org.lucares.pdb.plot.api.TimeRangeUnitInternal; import org.lucares.pdbui.domain.Aggregate; @@ -57,8 +57,8 @@ class PlotSettingsTransformer { switch (aggregate) { case NONE: return new NullAggregate(); - case PERCENTILES: - return new PercentileAggregate(); + case CUM_DISTRIBUTION: + return new CumulativeDistributionHandler(); case PARALLEL: return new ParallelRequestsAggregate(); } diff --git a/pdb-ui/src/main/java/org/lucares/pdbui/domain/Aggregate.java b/pdb-ui/src/main/java/org/lucares/pdbui/domain/Aggregate.java index d07e9a4..952b501 100644 --- a/pdb-ui/src/main/java/org/lucares/pdbui/domain/Aggregate.java +++ b/pdb-ui/src/main/java/org/lucares/pdbui/domain/Aggregate.java @@ -1,5 +1,14 @@ package org.lucares.pdbui.domain; public enum Aggregate { - NONE, PERCENTILES, PARALLEL + NONE, + + /** + * Empirical cumulative distribution functions + * + * @see https://serialmentor.com/dataviz/ecdf-qq.html + */ + CUM_DISTRIBUTION, + + PARALLEL } diff --git a/pdb-ui/src/main/resources/resources/js/ui.js b/pdb-ui/src/main/resources/resources/js/ui.js index b1af4af..5aef973 100644 --- a/pdb-ui/src/main/resources/resources/js/ui.js +++ b/pdb-ui/src/main/resources/resources/js/ui.js @@ -777,10 +777,10 @@ Vue.component('search-bar', {
- +