From f781cf4f2e72b4f0ed069d7337b05aa0e5be9697 Mon Sep 17 00:00:00 2001 From: Villu Ruusmann Date: Tue, 5 Nov 2024 22:09:24 +0200 Subject: [PATCH] Renamed constants --- .../java/org/jpmml/rexp/evaluator/RExpFunctionRegistry.java | 2 +- .../src/main/java/org/jpmml/rexp/evaluator/RExpFunctions.java | 2 +- .../src/main/java/org/jpmml/rexp/evaluator/functions/PPois.java | 2 +- pmml-rexp/src/main/java/org/jpmml/rexp/HurdleConverter.java | 2 +- .../test/java/org/jpmml/rexp/testing/HurdleConverterTest.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/RExpFunctionRegistry.java b/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/RExpFunctionRegistry.java index 3a16043..707a10d 100644 --- a/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/RExpFunctionRegistry.java +++ b/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/RExpFunctionRegistry.java @@ -62,7 +62,7 @@ private void propagate(Predicate predicate){ static { ImmutableMap.Builder builder = new ImmutableMap.Builder<>(); - builder.put(RExpFunctions.PPOIS, new PPois()); + builder.put(RExpFunctions.STATS_PPOIS, new PPois()); rexpFunctions = builder.build(); } diff --git a/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/RExpFunctions.java b/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/RExpFunctions.java index 1aca9a9..882076d 100644 --- a/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/RExpFunctions.java +++ b/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/RExpFunctions.java @@ -20,5 +20,5 @@ public interface RExpFunctions { - String PPOIS = "stats::ppois"; + String STATS_PPOIS = "stats::ppois"; } \ No newline at end of file diff --git a/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/functions/PPois.java b/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/functions/PPois.java index fd44fce..f00a6ad 100644 --- a/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/functions/PPois.java +++ b/pmml-rexp-evaluator/src/main/java/org/jpmml/rexp/evaluator/functions/PPois.java @@ -31,7 +31,7 @@ public class PPois extends AbstractFunction { public PPois(){ - super(RExpFunctions.PPOIS, Arrays.asList("x", "lambda")); + super(RExpFunctions.STATS_PPOIS, Arrays.asList("x", "lambda")); } @Override diff --git a/pmml-rexp/src/main/java/org/jpmml/rexp/HurdleConverter.java b/pmml-rexp/src/main/java/org/jpmml/rexp/HurdleConverter.java index 3cc4766..75960d4 100644 --- a/pmml-rexp/src/main/java/org/jpmml/rexp/HurdleConverter.java +++ b/pmml-rexp/src/main/java/org/jpmml/rexp/HurdleConverter.java @@ -85,7 +85,7 @@ public PMML encodePMML(RExpEncoder encoder){ Expression adjExpression = ExpressionUtil.createApply(PMMLFunctions.EXP, ExpressionUtil.createApply(PMMLFunctions.SUBTRACT, ExpressionUtil.createApply(PMMLFunctions.LN, new FieldRef(zeroPredictField)), - ExpressionUtil.createApply(RExpFunctions.PPOIS, ExpressionUtil.createConstant(0), new FieldRef(countPredictField)) + ExpressionUtil.createApply(RExpFunctions.STATS_PPOIS, ExpressionUtil.createConstant(0), new FieldRef(countPredictField)) ) ); diff --git a/pmml-rexp/src/test/java/org/jpmml/rexp/testing/HurdleConverterTest.java b/pmml-rexp/src/test/java/org/jpmml/rexp/testing/HurdleConverterTest.java index e7ae086..8658c86 100644 --- a/pmml-rexp/src/test/java/org/jpmml/rexp/testing/HurdleConverterTest.java +++ b/pmml-rexp/src/test/java/org/jpmml/rexp/testing/HurdleConverterTest.java @@ -28,7 +28,7 @@ public class HurdleConverterTest extends RExpEncoderBatchTest { @BeforeClass static public void setup(){ - RExpFunctionRegistry.propagate(RExpFunctions.PPOIS); + RExpFunctionRegistry.propagate(RExpFunctions.STATS_PPOIS); } @Test