Skip to content

Commit

Permalink
Updated JPMML-Converter dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Jul 5, 2020
1 parent bdb529b commit cdf363d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
<dependency>
<groupId>org.jpmml</groupId>
<artifactId>jpmml-converter</artifactId>
<version>1.4.1</version>
<version>1.4.2</version>
</dependency>

<dependency>
<groupId>org.jpmml</groupId>
<artifactId>jpmml-xgboost</artifactId>
<version>1.4.0</version>
<version>1.4.2</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jpmml/rexp/BinaryTreeConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ private Node encodeNode(Predicate predicate, RGenericVector tree, Schema schema)
List<?> values = categoricalFeature.getValues();
List<Integer> splitValues = (List<Integer>)splitpoint.getValues();

leftPredicate = createSimpleSetPredicate(categoricalFeature, selectValues(values, splitValues, true));
rightPredicate = createSimpleSetPredicate(categoricalFeature, selectValues(values, splitValues, false));
leftPredicate = createPredicate(categoricalFeature, selectValues(values, splitValues, true));
rightPredicate = createPredicate(categoricalFeature, selectValues(values, splitValues, false));
} else

{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jpmml/rexp/GBMConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ private Node encodeNode(Predicate predicate, int i, RGenericVector tree, RGeneri
leftCategoryManager = leftCategoryManager.fork(name, leftValues);
rightCategoryManager = rightCategoryManager.fork(name, rightValues);

leftPredicate = createSimpleSetPredicate(categoricalFeature, leftValues);
rightPredicate = createSimpleSetPredicate(categoricalFeature, rightValues);
leftPredicate = createPredicate(categoricalFeature, leftValues);
rightPredicate = createPredicate(categoricalFeature, rightValues);
} else

{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jpmml/rexp/PartyConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ private Node encodeNode(Predicate predicate, RGenericVector partyNode, RVector<?
Predicate childPredicate;

if(right.asScalar()){
childPredicate = createSimpleSetPredicate(categoricalFeature, selectValues(values, index, i + 1));
childPredicate = createPredicate(categoricalFeature, selectValues(values, index, i + 1));
} else

{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jpmml/rexp/RPartConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ private List<Predicate> encodePredicates(Feature feature, int splitOffset, RNumb

List<?> values = categoricalFeature.getValues();

leftPredicate = createSimpleSetPredicate(categoricalFeature, selectValues(values, csplitRow, 1));
rightPredicate = createSimpleSetPredicate(categoricalFeature, selectValues(values, csplitRow, 3));
leftPredicate = createPredicate(categoricalFeature, selectValues(values, csplitRow, 1));
rightPredicate = createPredicate(categoricalFeature, selectValues(values, csplitRow, 3));
}

return Arrays.asList(leftPredicate, rightPredicate);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jpmml/rexp/RandomForestConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ private <P extends Number> Node encodeNode(Predicate predicate, int i, ScoreEnco
leftCategoryManager = categoryManager.fork(name, leftValues);
rightCategoryManager = categoryManager.fork(name, rightValues);

leftPredicate = createSimpleSetPredicate(categoricalFeature, leftValues);
rightPredicate = createSimpleSetPredicate(categoricalFeature, rightValues);
leftPredicate = createPredicate(categoricalFeature, leftValues);
rightPredicate = createPredicate(categoricalFeature, rightValues);
} else

{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jpmml/rexp/RangerConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ private Node encodeNode(Predicate predicate, int index, ScoreEncoder scoreEncode
leftCategoryManager = leftCategoryManager.fork(name, leftValues);
rightCategoryManager = rightCategoryManager.fork(name, rightValues);

leftPredicate = createSimpleSetPredicate(categoricalFeature, leftValues);
rightPredicate = createSimpleSetPredicate(categoricalFeature, rightValues);
leftPredicate = createPredicate(categoricalFeature, leftValues);
rightPredicate = createPredicate(categoricalFeature, rightValues);
} else

{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jpmml/rexp/TreeModelConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public TreeModelConverter(R object){
super(object);
}

public Predicate createSimpleSetPredicate(Feature feature, List<?> values){
public Predicate createPredicate(Feature feature, List<?> values){
PredicateManager predicateManager = getPredicateManager();

return predicateManager.createSimpleSetPredicate(feature, values);
return predicateManager.createPredicate(feature, values);
}

public Predicate createSimplePredicate(Feature feature, SimplePredicate.Operator operator, Object value){
Expand Down

0 comments on commit cdf363d

Please sign in to comment.