However, I'm still not clear about how to use H2O with Java.What I could figure out from the above threads was that I should call the REST API via Java to run the algorithms. Is there a proper example which explains how to use the REST API?
Yes, thank you very much for pointing me to this thread. I will have a look. However, I stumbled upon the java tests given here h2o-3/h2o-algos/src/test/java/hex/deeplearning/DeepLearningMNIST.java (github) And using the tests given there, I was able to run a deep learning model on MNIST dataset. I have attached the log file created in the IDE herewith. Seems it is working really well. Is this a legitimate way of doing it, rather than calling the REST API directly?
Yes, thank you very much for pointing me to this thread. I will have a look. However, I stumbled upon the java tests given here h2o-3/h2o-algos/src/test/java/hex/deeplearning/DeepLearningMNIST.java (github) And using the tests given there, I was able to run a deep learning model on MNIST dataset. I have attached the log file created in the IDE herewith. Seems it is working really well. Is this a legitimate way of doing it, rather than calling the REST API directly?Yes, this is definitely a legitimate way to do it.
Yes, this is definitely a legitimate way to do it.
--
You received this message because you are subscribed to the Google Groups "H2O Open Source Scalable Machine Learning - h2ostream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2ostream+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public ModelExportV3 exportModel(int version, ModelExportV3 mexport) {
Model model = getFromDKV("model_id", mexport.model_id.key());
List<Key> keysToExport = new LinkedList<>();
keysToExport.add(model._key);
keysToExport.addAll(model.getPublishedKeys());
try {
new ObjectTreeBinarySerializer().save(keysToExport, FileUtils.getURI(mexport.dir));
} catch (IOException e) {
throw new H2OIllegalArgumentException("dir", "exportModel", e);
}
return mexport;
}
...
// Fire up the H2O Cluster H2O.main(args); // Register REST API register(relativeResourcePath); H2O.finalizeRegistration();
...
can anyone tel me how can i now use importmodel and exportmodel methods so that i can save and load these models??
Thanks
what i am currently doing is this.
I have trained a k-means model and then saved that model using serialization, but on deserialization i got "invalidclassexception, no valid contructor" error. I then tried using objectbinaryserialization to save model but when io loaded that model then all i got was the model key. i mean that loaded thing was not able to call "score" function of k-means.
Now is there any way? how can i load a model which can be used to score ??
Regards
but this "val model: KMeansModel = DKV.get(modelKey)" didnt work.
Anyways thanks for helping. I actually plan to save and load all h2o models using sparklingwater so i hope you'll be able to help me in future again.