I'm building a POC in C# using the Syncfusion PMML Execution Engine 17.3.0.21 in .Net core, trying to get predicted results from exported PMML based on models generated in both R and Python.
Question: Does the PMML and/or the Syncfusion Engine standard allow for null
values to be supplied for a given PMML DataField? I have a datafield like this:
<DataField name="myAttribute" optype="continous" dataType="double"/>
In my code I have a IDictionary<string, object>
that contains an element with "myAttribute"
and a value of null
but always get a NullReferenceException
when calling the engine.
at Syncfusion.PMML.Helper.GetActualInputsList(Dictionary`2 fieldValuePair, MiningSchema miningSchema, LocalTransformations localTransformation, TransformationDictionary transformationDictionary, PMMLModel pmmlModel)
at Syncfusion.PMML.MiningModelEvaluator.GetResult(Object obj, IModelOptions modelOptions)
at ml.pmml.PmmlEngine.Execute(IDictionary`2 parameters) in C:\source\ml.pmml\PmmlEngine.cs:line 27
at ml.console.Program.Main(String[] args) in C:\source\ml.console\Program.cs:line 86
The engine works fine when all values are provided.
Greetings from Syncfusion.
We have confirmed that the reported issue is defect and logged defect report for this issue.
Syncfusion PMML execution engine does not allow null, na and “”(empty string) for computation. Expected result would be throwing a error message for providing proper value if your data has null or empty value. The fix for the same will be included in our upcoming weekly NuGet release and it is expected to be available on 12 Nov, 2019.
For any further queries, please create a new incident (under your account) from our support website to provide solution quickly. Please find the support website link from below. https://www.syncfusion.com/support/directtrac/incidents/newincident
Note: I work for Syncfusion