Re: [Dev] [ML] Getting Error on executing sample of Java Client

2015-12-20 Thread Maheshakya Wijewardena
Hi,

In order to run the model usage sample, first you have to create a model
using the Machine Learner using the dataset (pima-indians-diabetes dataset)
and the algorithm (Logistic-Regression) with response variable (Class)
indicated in the sample. Then replace the downloaded-ml-model in
src/main/resources/ folder with the model you have generated. That way you
can use the model built with the ML version you have currently.
We have also updated the model in the resources folder[1].

Best regards.
[1]
https://github.com/wso2/carbon-ml/tree/master/samples/model-usage/src/main/resources

On Sun, Dec 20, 2015 at 11:09 AM, NIFRAS ISMAIL 
wrote:

> Hi,
>
> I have use wso2 ML 1.0.1 to create the model. Now i need to build a java
> client to read the model in my project.
>
> I have try to execute java client sample which is provided by carbon-ml
> git repo of wso2.
> https://github.com/wso2/carbon-ml/tree/master/samples/model-usage
>
> The project is build successfully using mvn clean install
>
> while on exection it gives this error . I am using ideaJ to execute the 
> MLModelUsageSample
> class.
>
> Exception in thread "main" java.io.InvalidClassException:
> org.wso2.carbon.ml.core.spark.models.MLClassificationModel; local class
> incompatible: stream classdesc serialVersionUID = -5405685346474685046,
> local class serialVersionUID = -4575625595152525041
> at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
> at MLModelUsageSample.deserializeMLModel(MLModelUsageSample.java:70)
> at MLModelUsageSample.main(MLModelUsageSample.java:48)
>
>
> Regards.
> *M. Nifras Ismail*
> [image: LinkedIn] 
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Pruthuvi Maheshakya Wijewardena

mahesha...@wso2.com
+94711228855
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ML] Getting Error on executing sample of Java Client

2015-12-19 Thread Nirmal Fernando
Thanks for reporting. Let us check.

On Sun, Dec 20, 2015 at 11:09 AM, NIFRAS ISMAIL 
wrote:

> Hi,
>
> I have use wso2 ML 1.0.1 to create the model. Now i need to build a java
> client to read the model in my project.
>
> I have try to execute java client sample which is provided by carbon-ml
> git repo of wso2.
> https://github.com/wso2/carbon-ml/tree/master/samples/model-usage
>
> The project is build successfully using mvn clean install
>
> while on exection it gives this error . I am using ideaJ to execute the 
> MLModelUsageSample
> class.
>
> Exception in thread "main" java.io.InvalidClassException:
> org.wso2.carbon.ml.core.spark.models.MLClassificationModel; local class
> incompatible: stream classdesc serialVersionUID = -5405685346474685046,
> local class serialVersionUID = -4575625595152525041
> at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
> at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
> at MLModelUsageSample.deserializeMLModel(MLModelUsageSample.java:70)
> at MLModelUsageSample.main(MLModelUsageSample.java:48)
>
>
> Regards.
> *M. Nifras Ismail*
> [image: LinkedIn] 
>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [ML] Getting Error on executing sample of Java Client

2015-12-19 Thread NIFRAS ISMAIL
Hi,

I have use wso2 ML 1.0.1 to create the model. Now i need to build a java
client to read the model in my project.

I have try to execute java client sample which is provided by carbon-ml git
repo of wso2.
https://github.com/wso2/carbon-ml/tree/master/samples/model-usage

The project is build successfully using mvn clean install

while on exection it gives this error . I am using ideaJ to execute
the MLModelUsageSample
class.

Exception in thread "main" java.io.InvalidClassException:
org.wso2.carbon.ml.core.spark.models.MLClassificationModel; local class
incompatible: stream classdesc serialVersionUID = -5405685346474685046,
local class serialVersionUID = -4575625595152525041
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at MLModelUsageSample.deserializeMLModel(MLModelUsageSample.java:70)
at MLModelUsageSample.main(MLModelUsageSample.java:48)


Regards.
*M. Nifras Ismail*
[image: LinkedIn] 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev