Seems like dataType attribute is not a mandetory according to pmml 4.2.1
spec schema [1]. We may have to improve the code to create the attributes
of the output stream, even if the data type is not defined in the pmml.
(like, always cast to string if the data type is unknown/not-defined
etc..). Shall we create a jira for tracking?

[1] http://dmg.org/pmml/pmml-v4-2-1.html

On Fri, Dec 4, 2015 at 3:04 PM, Fazlan Nazeem <[email protected]> wrote:

> Hi Supun,
>
> That was the issue. I added dataType attribute and specified it as
> "double" in the OutputField and was able to fix the issue. This PMML model
> was handed over to us by a customer who used the PMML package in R. I
> wonder why the attribute went missing.
>
> Thank you for the help.
>
>
> On Fri, Dec 4, 2015 at 2:25 PM, Supun Sethunga <[email protected]> wrote:
>
>> Can you try putting a debug point to [1] and see what is null? looks like
>> evaluator.getOutputField(field).getDataType()resolve to null.
>>
>> And in the PMML model:
>>
>>   <Output>
>>    <OutputField name="Predicted_ResponseAccountName" 
>> feature="predictedValue"/>
>>   </Output>
>>
>> Doesn't seems to have a dataType attribute. Probably thats the issue..
>>
>> [1]
>> https://github.com/wso2-gpl/siddhi/blob/master/siddhi-extensions/pmml/src/main/java/org/wso2/siddhi/gpl/extension/pmml/PmmlModelProcessor.java#L145
>>
>>
>> Regards,
>> Supun
>>
>> On Fri, Dec 4, 2015 at 2:12 PM, Fazlan Nazeem <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I am in the process of using a PMML model in CEP to predict using an
>>> event stream. I have written a sample execution plan to do it, but when
>>> validating the plan, a null pointer exception is thrown[1]. (Siddhi PMML
>>> extension is installed)
>>>
>>>
>>> @Import('inputStream:1.0.0')
>>> define stream inputStream (RegionCat string, TitleCat string, RLMaxTitle
>>> string, Act1_rate double, Act2_rate double, Act3_rate double, Act4_rate
>>> double, Act5_rate double, Act6_rate double);
>>>
>>>
>>> @Export('outStream:1.0.0')
>>> define stream outStream (RegionCat string, TitleCat string, RLMaxTitle
>>> string, Act1_rate double, Act2_rate double, Act3_rate double, Act4_rate
>>> double, Act5_rate double, Act6_rate double, ResponseAccountName double);
>>>
>>> from inputStream#pmml:predict('/home/fazlann/Downloads/logistic.pmml')
>>> select *
>>> insert into outStream;
>>>
>>>
>>> Any idea on what's the issue?
>>>
>>>
>>>
>>> [1]http://pastie.org/10605829 <http://pastie.org/10605815>
>>> [2] PMML Model <http://pastie.org/10605821>
>>> --
>>> Thanks & Regards,
>>>
>>> Fazlan Nazeem
>>>
>>> *Software Engineer*
>>>
>>> *WSO2 Inc*
>>> Mobile : +94772338839
>>> <%2B94%20%280%29%20773%20451194>
>>> [email protected]
>>>
>>
>>
>>
>> --
>> *Supun Sethunga*
>> Software Engineer
>> WSO2, Inc.
>> http://wso2.com/
>> lean | enterprise | middleware
>> Mobile : +94 716546324
>>
>
>
>
> --
> Thanks & Regards,
>
> Fazlan Nazeem
>
> *Software Engineer*
>
> *WSO2 Inc*
> Mobile : +94772338839
> <%2B94%20%280%29%20773%20451194>
> [email protected]
>



-- 
*Supun Sethunga*
Software Engineer
WSO2, Inc.
http://wso2.com/
lean | enterprise | middleware
Mobile : +94 716546324
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to