autodeployai / pmml4s

PMML scoring library for Scala
https://www.pmml4s.org/
Apache License 2.0
62 stars 10 forks source link

Issues during evaluation #3

Closed apoorv22 closed 4 years ago

apoorv22 commented 4 years ago

@scorebot Hi during using the Model object to get details and evaluate , I came across following issues

  1. Unable to distinguish b/w PMML float and double type. Both are casted to same enum.
  2. Using the methods isNumeric , isCategorical or any of its sort throws this error:
    Exception in thread "main" java.lang.StackOverflowError
    at org.pmml4s.common.DataTypeLike.isNumeric(DataType.scala:299)
    at org.pmml4s.common.DataTypeLike.isNumeric$(DataType.scala:299)
    at org.pmml4s.common.DataType.isNumeric(DataType.scala:24)
    at org.pmml4s.common.DataTypeLike.isNumeric(DataType.scala:299)
    at org.pmml4s.common.DataTypeLike.isNumeric$(DataType.scala:299)
    at org.pmml4s.common.DataType.isNumeric(DataType.scala:24)
    at org.pmml4s.common.DataTypeLike.isNumeric(DataType.scala:299)
    at org.pmml4s.common.DataTypeLike.isNumeric$(DataType.scala:299)
    at org.pmml4s.common.DataType.isNumeric(DataType.scala:24)
    at org.pmml4s.common.DataTypeLike.isNumeric(DataType.scala:299)
    at org.pmml4s.common.DataTypeLike.isNumeric$(DataType.scala:299)
    at org.pmml4s.common.DataType.isNumeric(DataType.scala:24)
    at org.pmml4s.common.DataTypeLike.isNumeric(DataType.scala:299)
    at org.pmml4s.common.DataTypeLike.isNumeric$(DataType.scala:299)
  3. Target field predictions are not output from predict function.

Would appreciate your help in understanding this.Thanks

scorebot commented 4 years ago

@apoorv22

  1. Yes. Currently, both float and double are treated as the real type and internal computations always use double. I will enhance this part to distinguish them.
  2. It's a bug, I have fixed it.
  3. The results of predict function are decided by the output fields of PMML. If there are no output fields, PMML4S will output some default fields that always include the prediction. Please, check your PMML if it contains output fields.
scorebot commented 4 years ago

@apoorv22 For issue 1, the enhancement is done. Please try again, let me know if you have any issue.

scorebot commented 4 years ago

@apoorv22 I close this issue now. if you have other problems, please feel free to open new issues.