Skip to content

Commit

Permalink
Improved support for binary and categorical features
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Feb 13, 2024
1 parent cceeb4f commit f95cae2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pmml-lightgbm/src/main/java/org/jpmml/lightgbm/GBDT.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public Feature apply(Feature feature){
BinaryFeature binaryFeature = (BinaryFeature)feature;

Boolean binary = isBinary(index);
if(binary != null && binary.booleanValue()){
if(binary == null || binary.booleanValue()){
return binaryFeature;
}

Expand All @@ -357,7 +357,7 @@ public Feature apply(Feature feature){
CategoricalFeature categoricalFeature = (CategoricalFeature)feature;

Boolean categorical = isCategorical(index);
if(categorical != null && categorical.booleanValue()){
if(categorical == null || categorical.booleanValue()){
return categoricalFeature;
}
} else
Expand Down

0 comments on commit f95cae2

Please sign in to comment.