jpmml / jpmml-lightgbm

Java library and command-line application for converting LightGBM models to PMML
GNU Affero General Public License v3.0
174 stars 58 forks source link

conversion incorrect when category value contains comma #37

Closed TGalaxy closed 4 years ago

TGalaxy commented 4 years ago

I have some variable with category

"AMD ARUBA (DRM 2.50.0 / 4.15.0-91-generic, LLVM 9.0.0)"

However during pmml conversion it becomes

  <DataField name="setup" optype="categorical" dataType="string">
      <Value value="&quot;AMD ARUBA (DRM 2.50.0 / 4.15.0-91-generic"/>
      <Value value="LLVM 9.0.0)&quot;"/>

It seems this comes from line 628 of https://github.com/jpmml/jpmml-lightgbm/blob/3e64f29a93f51126a5a590d27be987515c780f4c/src/main/java/org/jpmml/lightgbm/GBDT.java

Could you kindly fix it?