Skip to content

Commit

Permalink
Renamed constants
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Nov 6, 2024
1 parent 8e839d3 commit f781cf4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private void propagate(Predicate<String> predicate){
static {
ImmutableMap.Builder<String, Function> builder = new ImmutableMap.Builder<>();

builder.put(RExpFunctions.PPOIS, new PPois());
builder.put(RExpFunctions.STATS_PPOIS, new PPois());

rexpFunctions = builder.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

public interface RExpFunctions {

String PPOIS = "stats::ppois";
String STATS_PPOIS = "stats::ppois";
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class HurdleConverterTest extends RExpEncoderBatchTest {
@BeforeClass
static
public void setup(){
RExpFunctionRegistry.propagate(RExpFunctions.PPOIS);
RExpFunctionRegistry.propagate(RExpFunctions.STATS_PPOIS);
}

@Test
Expand Down

0 comments on commit f781cf4

Please sign in to comment.