diff --git a/pmml-lightgbm/src/main/java/org/jpmml/lightgbm/GBDT.java b/pmml-lightgbm/src/main/java/org/jpmml/lightgbm/GBDT.java index 1fa21b6..bc4b4ed 100644 --- a/pmml-lightgbm/src/main/java/org/jpmml/lightgbm/GBDT.java +++ b/pmml-lightgbm/src/main/java/org/jpmml/lightgbm/GBDT.java @@ -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; } @@ -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