Re: PMML version in MLLib

2015-11-08 Thread Fazlan Nazeem
Hi Vincenzo/Owen,

I have sent a pull request[1] with necessary changes to add the pmml
version attribute to the root node. I have also linked the issue under the
PMML improvement umbrella[2] as you suggested.

[1] https://github.com/apache/spark/pull/9558
[2]  https://issues.apache.org/jira/browse/SPARK-8545.

On Sun, Nov 8, 2015 at 2:38 PM, Vincenzo Selvaggio <vselvag...@gmail.com>
wrote:

> Hi,
>
> I confirm the models are exported for PMML version 4.2, in fact you can
> see in the generated xml
> PMML xmlns="http://www.dmg.org/PMML-4_2;
> This is the default version when using
> https://github.com/jpmml/jpmml-model/tree/1.1.X.
>
> I didn't realize the attribute version of the PMML root element was
> required, this can be easily added.
> Please, as Owen suggested, add a PR and link it to
> https://issues.apache.org/jira/browse/SPARK-8545.
>
> Thanks,
> Vincenzo
>
> On Wed, Nov 4, 2015 at 12:14 PM, Fazlan Nazeem <fazl...@wso2.com> wrote:
>
>> Thanks Owen. Will do it
>>
>> On Wed, Nov 4, 2015 at 5:22 PM, Sean Owen <so...@cloudera.com> wrote:
>>
>>> I'm pretty sure that attribute is required. I am not sure what PMML
>>> version the code has been written for but would assume 4.2.1. Feel
>>> free to open a PR to add this version to all the output.
>>>
>>> On Wed, Nov 4, 2015 at 11:42 AM, Fazlan Nazeem <fazl...@wso2.com> wrote:
>>> > [adding dev]
>>> >
>>> > On Wed, Nov 4, 2015 at 2:27 PM, Fazlan Nazeem <fazl...@wso2.com>
>>> wrote:
>>> >>
>>> >> I just went through all specifications, and they expect the version
>>> >> attribute. This should be addressed very soon because if we cannot
>>> use the
>>> >> PMML model without the version attribute, there is no use of
>>> generating one
>>> >> without it.
>>> >>
>>> >> On Wed, Nov 4, 2015 at 2:17 PM, Stefano Baghino
>>> >> <stefano.bagh...@radicalbit.io> wrote:
>>> >>>
>>> >>> I used KNIME, which internally uses the org.dmg.pmml library.
>>> >>>
>>> >>> On Wed, Nov 4, 2015 at 9:45 AM, Fazlan Nazeem <fazl...@wso2.com>
>>> wrote:
>>> >>>>
>>> >>>> Hi Stefano,
>>> >>>>
>>> >>>> Although the intention for my question wasn't as you expected, what
>>> you
>>> >>>> say makes sense. The standard[1] for PMML 4.1 specifies that "For
>>> PMML 4.1
>>> >>>> the attribute version must have the value 4.1". I'm not sure
>>> whether that
>>> >>>> means that other PMML versions do not need that attribute to be set
>>> >>>> explicitly. I hope someone would answer this.
>>> >>>>
>>> >>>> What was the tool you used to load the PMML?
>>> >>>>
>>> >>>> [1] http://dmg.org/pmml/v4-1/GeneralStructure.html
>>> >>>>
>>>
>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> Fazlan Nazeem
>>
>> *Software Engineer*
>>
>> *WSO2 Inc*
>> Mobile : +94772338839
>> <%2B94%20%280%29%20773%20451194>
>> fazl...@wso2.com
>>
>
>


-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

*WSO2 Inc*
Mobile : +94772338839
<%2B94%20%280%29%20773%20451194>
fazl...@wso2.com


Re: PMML version in MLLib

2015-11-04 Thread Fazlan Nazeem
Thanks Owen. Will do it

On Wed, Nov 4, 2015 at 5:22 PM, Sean Owen <so...@cloudera.com> wrote:

> I'm pretty sure that attribute is required. I am not sure what PMML
> version the code has been written for but would assume 4.2.1. Feel
> free to open a PR to add this version to all the output.
>
> On Wed, Nov 4, 2015 at 11:42 AM, Fazlan Nazeem <fazl...@wso2.com> wrote:
> > [adding dev]
> >
> > On Wed, Nov 4, 2015 at 2:27 PM, Fazlan Nazeem <fazl...@wso2.com> wrote:
> >>
> >> I just went through all specifications, and they expect the version
> >> attribute. This should be addressed very soon because if we cannot use
> the
> >> PMML model without the version attribute, there is no use of generating
> one
> >> without it.
> >>
> >> On Wed, Nov 4, 2015 at 2:17 PM, Stefano Baghino
> >> <stefano.bagh...@radicalbit.io> wrote:
> >>>
> >>> I used KNIME, which internally uses the org.dmg.pmml library.
> >>>
> >>> On Wed, Nov 4, 2015 at 9:45 AM, Fazlan Nazeem <fazl...@wso2.com>
> wrote:
> >>>>
> >>>> Hi Stefano,
> >>>>
> >>>> Although the intention for my question wasn't as you expected, what
> you
> >>>> say makes sense. The standard[1] for PMML 4.1 specifies that "For
> PMML 4.1
> >>>> the attribute version must have the value 4.1". I'm not sure whether
> that
> >>>> means that other PMML versions do not need that attribute to be set
> >>>> explicitly. I hope someone would answer this.
> >>>>
> >>>> What was the tool you used to load the PMML?
> >>>>
> >>>> [1] http://dmg.org/pmml/v4-1/GeneralStructure.html
> >>>>
>



-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

*WSO2 Inc*
Mobile : +94772338839
<%2B94%20%280%29%20773%20451194>
fazl...@wso2.com


Re: PMML version in MLLib

2015-11-04 Thread Fazlan Nazeem
[adding dev]

On Wed, Nov 4, 2015 at 2:27 PM, Fazlan Nazeem <fazl...@wso2.com> wrote:

> I just went through all specifications, and they expect the version
> attribute. This should be addressed very soon because if we cannot use the
> PMML model without the version attribute, there is no use of generating one
> without it.
>
> On Wed, Nov 4, 2015 at 2:17 PM, Stefano Baghino <
> stefano.bagh...@radicalbit.io> wrote:
>
>> I used KNIME, which internally uses the org.dmg.pmml library.
>>
>> On Wed, Nov 4, 2015 at 9:45 AM, Fazlan Nazeem <fazl...@wso2.com> wrote:
>>
>>> Hi Stefano,
>>>
>>> Although the intention for my question wasn't as you expected, what you
>>> say makes sense. The standard[1] for PMML 4.1 specifies that "*For PMML
>>> 4.1 the attribute version must have the value 4.1". *I'm not sure
>>> whether that means that other PMML versions do not need that attribute to
>>> be set explicitly. I hope someone would answer this.
>>>
>>> What was the tool you used to load the PMML?
>>>
>>> [1] http://dmg.org/pmml/v4-1/GeneralStructure.html
>>>
>>> On Wed, Nov 4, 2015 at 1:56 PM, Stefano Baghino <
>>> stefano.bagh...@radicalbit.io> wrote:
>>>
>>>> Hi Fazian,
>>>> I actually had a problem with an invalid PMML produced by Spark 1.5.1
>>>> due to the missing "version" attribute in the "PMML" tag. Is this your case
>>>> too? I've briefly checked the PMML standard and that attribute is required,
>>>> so this may be an issue that should be addressed. I'll happily look further
>>>> into it, maybe there's already an open issue on this matter.
>>>> I quickly checked the code to find the PMML version and the actual
>>>> value looks unclear to me (for those reading, I'm
>>>> looking org.apache.spark.mllib.pmml.export.PMMLModelExport.scala).
>>>>
>>>> On Wed, Nov 4, 2015 at 6:39 AM, Fazlan Nazeem <fazl...@wso2.com> wrote:
>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> Can I know which version of PMML is used in MLLIb's PMML export
>>>>> functionality for Spark 1.4.1 and Spark 1.5.1?
>>>>> I couldn't find this information within the documentation. If present
>>>>> in documentation please provide me the source.
>>>>>
>>>>>
>>>>> Thanks & Regards,
>>>>>
>>>>> Fazlan Nazeem
>>>>>
>>>>> *Software Engineer*
>>>>>
>>>>> *WSO2 Inc*
>>>>> Mobile : +94772338839
>>>>> <%2B94%20%280%29%20773%20451194>
>>>>> fazl...@wso2.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> BR,
>>>> Stefano Baghino
>>>>
>>>> Software Engineer @ Radicalbit
>>>>
>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>>
>>> Fazlan Nazeem
>>>
>>> *Software Engineer*
>>>
>>> *WSO2 Inc*
>>> Mobile : +94772338839
>>> <%2B94%20%280%29%20773%20451194>
>>> fazl...@wso2.com
>>>
>>
>>
>>
>> --
>> BR,
>> Stefano Baghino
>>
>> Software Engineer @ Radicalbit
>>
>
>
>
> --
> Thanks & Regards,
>
> Fazlan Nazeem
>
> *Software Engineer*
>
> *WSO2 Inc*
> Mobile : +94772338839
> <%2B94%20%280%29%20773%20451194>
> fazl...@wso2.com
>



-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

*WSO2 Inc*
Mobile : +94772338839
<%2B94%20%280%29%20773%20451194>
fazl...@wso2.com


Re: PMML version in MLLib

2015-11-04 Thread Fazlan Nazeem
Hi Stefano,

Although the intention for my question wasn't as you expected, what you say
makes sense. The standard[1] for PMML 4.1 specifies that "*For PMML 4.1 the
attribute version must have the value 4.1". *I'm not sure whether that
means that other PMML versions do not need that attribute to be set
explicitly. I hope someone would answer this.

What was the tool you used to load the PMML?

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

On Wed, Nov 4, 2015 at 1:56 PM, Stefano Baghino <
stefano.bagh...@radicalbit.io> wrote:

> Hi Fazian,
> I actually had a problem with an invalid PMML produced by Spark 1.5.1 due
> to the missing "version" attribute in the "PMML" tag. Is this your case
> too? I've briefly checked the PMML standard and that attribute is required,
> so this may be an issue that should be addressed. I'll happily look further
> into it, maybe there's already an open issue on this matter.
> I quickly checked the code to find the PMML version and the actual value
> looks unclear to me (for those reading, I'm
> looking org.apache.spark.mllib.pmml.export.PMMLModelExport.scala).
>
> On Wed, Nov 4, 2015 at 6:39 AM, Fazlan Nazeem <fazl...@wso2.com> wrote:
>
>>
>> Hi,
>>
>> Can I know which version of PMML is used in MLLIb's PMML export
>> functionality for Spark 1.4.1 and Spark 1.5.1?
>> I couldn't find this information within the documentation. If present in
>> documentation please provide me the source.
>>
>>
>> Thanks & Regards,
>>
>> Fazlan Nazeem
>>
>> *Software Engineer*
>>
>> *WSO2 Inc*
>> Mobile : +94772338839
>> <%2B94%20%280%29%20773%20451194>
>> fazl...@wso2.com
>>
>
>
>
> --
> BR,
> Stefano Baghino
>
> Software Engineer @ Radicalbit
>



-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

*WSO2 Inc*
Mobile : +94772338839
<%2B94%20%280%29%20773%20451194>
fazl...@wso2.com


Re: PMML version in MLLib

2015-11-04 Thread Fazlan Nazeem
I just went through all specifications, and they expect the version
attribute. This should be addressed very soon because if we cannot use the
PMML model without the version attribute, there is no use of generating one
without it.

On Wed, Nov 4, 2015 at 2:17 PM, Stefano Baghino <
stefano.bagh...@radicalbit.io> wrote:

> I used KNIME, which internally uses the org.dmg.pmml library.
>
> On Wed, Nov 4, 2015 at 9:45 AM, Fazlan Nazeem <fazl...@wso2.com> wrote:
>
>> Hi Stefano,
>>
>> Although the intention for my question wasn't as you expected, what you
>> say makes sense. The standard[1] for PMML 4.1 specifies that "*For PMML
>> 4.1 the attribute version must have the value 4.1". *I'm not sure
>> whether that means that other PMML versions do not need that attribute to
>> be set explicitly. I hope someone would answer this.
>>
>> What was the tool you used to load the PMML?
>>
>> [1] http://dmg.org/pmml/v4-1/GeneralStructure.html
>>
>> On Wed, Nov 4, 2015 at 1:56 PM, Stefano Baghino <
>> stefano.bagh...@radicalbit.io> wrote:
>>
>>> Hi Fazian,
>>> I actually had a problem with an invalid PMML produced by Spark 1.5.1
>>> due to the missing "version" attribute in the "PMML" tag. Is this your case
>>> too? I've briefly checked the PMML standard and that attribute is required,
>>> so this may be an issue that should be addressed. I'll happily look further
>>> into it, maybe there's already an open issue on this matter.
>>> I quickly checked the code to find the PMML version and the actual value
>>> looks unclear to me (for those reading, I'm
>>> looking org.apache.spark.mllib.pmml.export.PMMLModelExport.scala).
>>>
>>> On Wed, Nov 4, 2015 at 6:39 AM, Fazlan Nazeem <fazl...@wso2.com> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> Can I know which version of PMML is used in MLLIb's PMML export
>>>> functionality for Spark 1.4.1 and Spark 1.5.1?
>>>> I couldn't find this information within the documentation. If present
>>>> in documentation please provide me the source.
>>>>
>>>>
>>>> Thanks & Regards,
>>>>
>>>> Fazlan Nazeem
>>>>
>>>> *Software Engineer*
>>>>
>>>> *WSO2 Inc*
>>>> Mobile : +94772338839
>>>> <%2B94%20%280%29%20773%20451194>
>>>> fazl...@wso2.com
>>>>
>>>
>>>
>>>
>>> --
>>> BR,
>>> Stefano Baghino
>>>
>>> Software Engineer @ Radicalbit
>>>
>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> Fazlan Nazeem
>>
>> *Software Engineer*
>>
>> *WSO2 Inc*
>> Mobile : +94772338839
>> <%2B94%20%280%29%20773%20451194>
>> fazl...@wso2.com
>>
>
>
>
> --
> BR,
> Stefano Baghino
>
> Software Engineer @ Radicalbit
>



-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

*WSO2 Inc*
Mobile : +94772338839
<%2B94%20%280%29%20773%20451194>
fazl...@wso2.com


PMML version in MLLib

2015-11-03 Thread Fazlan Nazeem
Hi,

Can I know which version of PMML is used in MLLIb's PMML export
functionality for Spark 1.4.1 and Spark 1.5.1?
I couldn't find this information within the documentation. If present in
documentation please provide me the source.


Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

*WSO2 Inc*
Mobile : +94772338839
<%2B94%20%280%29%20773%20451194>
fazl...@wso2.com


PMML export for LinearRegressionModel

2015-10-15 Thread Fazlan Nazeem
Hi

I am trying to export a LinearRegressionModel in PMML format. According to
the following resource[1] PMML export is supported for
LinearRegressionModel.

[1] https://spark.apache.org/docs/latest/mllib-pmml-model-export.html

But there is *no* *toPMML* method in *LinearRegressionModel* class although
LogisticRegressionModel, ReidgeRegressionModel,SVMModel etc has toPMML
method.

Can someone explain what is the issue here?


Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

*WSO2 Inc*
Mobile : +94772338839
<%2B94%20%280%29%20773%20451194>
fazl...@wso2.com