Closed wf-r closed 1 year ago
@wf-r Those three values [np.NaN], ["NA"], ["X"]
should be treated as invalid values, so for the model_1
, the NaN result returned as expected because invalidValueTreatment="returnInvalid"
, you can input None to test the missing value.
For the model_2
, there is a bug in the internal pmml4s library, we have fixed it now, please reinstall the latest pypmml from git by pip install --upgrade git+https://github.com/autodeployai/pypmml.git
. Since the invalidValueTreatment="asMissing"
, so the result of those invalid values should be the same as the input ["MISSING"]
, for example:
>>> model_1.predict(df)
predicted_SCORE
0 0.574443
1 0.689974
2 NaN
3 NaN
4 NaN
>>> model_2.predict(df)
predicted_SCORE
0 0.574443
1 0.689974
2 0.689974
3 0.689974
4 0.689974
@wf-r Please, let me know if still have a problem
Thanks, issue is fixed (and thanks for the explanation concerning None to be the missing value).
Hi,
sorry to bother you (again :)):
I think
missingValueReplacement
of the mining schema is not working as expected (see https://dmg.org/pmml/v4-3/MiningSchema.html):Example (on Python 3.8.6, PyPMML 0.9.17:
Best Wolfgang