You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Fazlan Nazeem <fa...@wso2.com> on 2015/10/15 11:25:43 UTC

PMML export for LinearRegressionModel

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>
fazlann@wso2.com

Re: PMML export for LinearRegressionModel

Posted by Fazlan Nazeem <fa...@wso2.com>.
Hi Joseph,

That's great. Also It would be great if spark extends the PMML support to
models which are not PMML supported right now.
e.g

   - Decision Tree
   - Random Forest
   - Naive Bayes


On Sun, Oct 18, 2015 at 2:55 AM, Joseph Bradley <jo...@databricks.com>
wrote:

> Thanks for bringing this up!  We need to add PMML export methods to the
> spark.ml API.  I just made a JIRA for tracking that:
> https://issues.apache.org/jira/browse/SPARK-11171
>
> Joseph
>
> On Thu, Oct 15, 2015 at 2:58 AM, Fazlan Nazeem <fa...@wso2.com> wrote:
>
>> Ok It turns out I was using the wrong LinearRegressionModel which was in  package
>> org.apache.spark.ml.regression;.
>>
>>
>>
>> On Thu, Oct 15, 2015 at 3:23 PM, Fazlan Nazeem <fa...@wso2.com> wrote:
>>
>>> This is the API doc for LinearRegressionModel. It does not implement
>>> PMMLExportable
>>>
>>> https://spark.apache.org/docs/latest/api/java/index.html
>>>
>>> On Thu, Oct 15, 2015 at 3:11 PM, canan chen <cc...@gmail.com> wrote:
>>>
>>>> The method toPMML is in trait PMMLExportable
>>>>
>>>> *LinearRegressionModel has this trait, you should be able to call *
>>>> *LinearRegressionModel#toPMML*
>>>>
>>>> On Thu, Oct 15, 2015 at 5:25 PM, Fazlan Nazeem <fa...@wso2.com>
>>>> wrote:
>>>>
>>>>> 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>
>>>>> fazlann@wso2.com
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>>
>>> Fazlan Nazeem
>>>
>>> *Software Engineer*
>>>
>>> *WSO2 Inc*
>>> Mobile : +94772338839
>>> <%2B94%20%280%29%20773%20451194>
>>> fazlann@wso2.com
>>>
>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> Fazlan Nazeem
>>
>> *Software Engineer*
>>
>> *WSO2 Inc*
>> Mobile : +94772338839
>> <%2B94%20%280%29%20773%20451194>
>> fazlann@wso2.com
>>
>
>


-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

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

Re: PMML export for LinearRegressionModel

Posted by Joseph Bradley <jo...@databricks.com>.
Thanks for bringing this up!  We need to add PMML export methods to the
spark.ml API.  I just made a JIRA for tracking that:
https://issues.apache.org/jira/browse/SPARK-11171

Joseph

On Thu, Oct 15, 2015 at 2:58 AM, Fazlan Nazeem <fa...@wso2.com> wrote:

> Ok It turns out I was using the wrong LinearRegressionModel which was in  package
> org.apache.spark.ml.regression;.
>
>
>
> On Thu, Oct 15, 2015 at 3:23 PM, Fazlan Nazeem <fa...@wso2.com> wrote:
>
>> This is the API doc for LinearRegressionModel. It does not implement
>> PMMLExportable
>>
>> https://spark.apache.org/docs/latest/api/java/index.html
>>
>> On Thu, Oct 15, 2015 at 3:11 PM, canan chen <cc...@gmail.com> wrote:
>>
>>> The method toPMML is in trait PMMLExportable
>>>
>>> *LinearRegressionModel has this trait, you should be able to call *
>>> *LinearRegressionModel#toPMML*
>>>
>>> On Thu, Oct 15, 2015 at 5:25 PM, Fazlan Nazeem <fa...@wso2.com> wrote:
>>>
>>>> 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>
>>>> fazlann@wso2.com
>>>>
>>>
>>>
>>
>>
>> --
>> Thanks & Regards,
>>
>> Fazlan Nazeem
>>
>> *Software Engineer*
>>
>> *WSO2 Inc*
>> Mobile : +94772338839
>> <%2B94%20%280%29%20773%20451194>
>> fazlann@wso2.com
>>
>
>
>
> --
> Thanks & Regards,
>
> Fazlan Nazeem
>
> *Software Engineer*
>
> *WSO2 Inc*
> Mobile : +94772338839
> <%2B94%20%280%29%20773%20451194>
> fazlann@wso2.com
>

Re: PMML export for LinearRegressionModel

Posted by Fazlan Nazeem <fa...@wso2.com>.
Ok It turns out I was using the wrong LinearRegressionModel which was
in  package
org.apache.spark.ml.regression;.



On Thu, Oct 15, 2015 at 3:23 PM, Fazlan Nazeem <fa...@wso2.com> wrote:

> This is the API doc for LinearRegressionModel. It does not implement
> PMMLExportable
>
> https://spark.apache.org/docs/latest/api/java/index.html
>
> On Thu, Oct 15, 2015 at 3:11 PM, canan chen <cc...@gmail.com> wrote:
>
>> The method toPMML is in trait PMMLExportable
>>
>> *LinearRegressionModel has this trait, you should be able to call *
>> *LinearRegressionModel#toPMML*
>>
>> On Thu, Oct 15, 2015 at 5:25 PM, Fazlan Nazeem <fa...@wso2.com> wrote:
>>
>>> 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>
>>> fazlann@wso2.com
>>>
>>
>>
>
>
> --
> Thanks & Regards,
>
> Fazlan Nazeem
>
> *Software Engineer*
>
> *WSO2 Inc*
> Mobile : +94772338839
> <%2B94%20%280%29%20773%20451194>
> fazlann@wso2.com
>



-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

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

Re: PMML export for LinearRegressionModel

Posted by Fazlan Nazeem <fa...@wso2.com>.
This is the API doc for LinearRegressionModel. It does not implement
PMMLExportable

https://spark.apache.org/docs/latest/api/java/index.html

On Thu, Oct 15, 2015 at 3:11 PM, canan chen <cc...@gmail.com> wrote:

> The method toPMML is in trait PMMLExportable
>
> *LinearRegressionModel has this trait, you should be able to call *
> *LinearRegressionModel#toPMML*
>
> On Thu, Oct 15, 2015 at 5:25 PM, Fazlan Nazeem <fa...@wso2.com> wrote:
>
>> 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>
>> fazlann@wso2.com
>>
>
>


-- 
Thanks & Regards,

Fazlan Nazeem

*Software Engineer*

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

Re: PMML export for LinearRegressionModel

Posted by canan chen <cc...@gmail.com>.
The method toPMML is in trait PMMLExportable

*LinearRegressionModel has this trait, you should be able to call *
*LinearRegressionModel#toPMML*

On Thu, Oct 15, 2015 at 5:25 PM, Fazlan Nazeem <fa...@wso2.com> wrote:

> 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>
> fazlann@wso2.com
>