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 <[email protected]> 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] <http://lk.linkedin.com/pub/nifras-ismail/54/343/94b> > > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Pruthuvi Maheshakya Wijewardena [email protected] +94711228855
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
