jpmml / jpmml-evaluator

Java Evaluator API for PMML
GNU Affero General Public License v3.0
895 stars 255 forks source link

logistic regression fail in 1.1.7 #4

Closed huangracer closed 10 years ago

huangracer commented 10 years ago

In 1.1.7, when we try to consume a logistic regression under RegressionModel, we encountered the below error message.

We also tried linear regression and regression with more than two categories, they are working all fine. We also tried to switch back to 1.1.3, under 1.1.3, the logistic regression works fine also.

Exception in thread "main" org.jpmml.manager.InvalidFeatureException (at or around line 33): RegressionModel at org.jpmml.evaluator.RegressionModelEvaluator.evaluateClassification(RegressionModelEvaluator.java:130) at org.jpmml.evaluator.RegressionModelEvaluator.evaluate(RegressionModelEvaluator.java:71) at org.jpmml.evaluator.MiningModelEvaluator.evaluateSegmentation(MiningModelEvaluator.java:425) at org.jpmml.evaluator.MiningModelEvaluator.evaluateClassification(MiningModelEvaluator.java:211) at org.jpmml.evaluator.MiningModelEvaluator.evaluate(MiningModelEvaluator.java:108) at org.jpmml.evaluator.MiningModelEvaluator.evaluate(MiningModelEvaluator.java:86) at org.jpmml.evaluator.ModelEvaluator.evaluate(ModelEvaluator.java:68) at org.jpmml.evaluator.CsvEvaluationExample.evaluateAll(CsvEvaluationExample.java:226) at org.jpmml.evaluator.CsvEvaluationExample.execute(CsvEvaluationExample.java:97) at org.jpmml.evaluator.Example.execute(Example.java:45) at org.jpmml.evaluator.CsvEvaluationExample.main(CsvEvaluationExample.java:72)

vruusmann commented 10 years ago

Indeed, some new sanity checks were added in JPMML-Evaluator versions 1.1.6 and 1.1.7. Looks like you're having problems with the one that checks that all target DataField elements must specify the list of valid values (using child Value elements).

By any chance, do you have a sample PMML document that you could share with me?

huangracer commented 10 years ago

Hi,

Thanks so much for quick update. I attached the model pmml in case you still need it.

Best, Lei

On Fri, Aug 8, 2014 at 3:09 AM, Villu Ruusmann notifications@github.com wrote:

Closed #4 https://github.com/jpmml/jpmml-evaluator/issues/4 via 1bfb6f2 https://github.com/jpmml/jpmml-evaluator/commit/1bfb6f2b93020c7a9c9f0aa152669212ec5b8b04 .

— Reply to this email directly or view it on GitHub https://github.com/jpmml/jpmml-evaluator/issues/4#event-150663379.

Lei Huang Department of Biostatistics Johns Hopkins University 615 N. Wolfe Street, E3040 Baltimore, MD, 21205, USA Phone: 1 (410) 929 0668 http://www.biostat.jhsph.edu/~lehuang/