Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 190

Serialization of KMeans Model

$
0
0

Hi
After success with SVM in batch mode, I'm now looking at KMeans. In SVM I could get the model out with something like this:

services::SharedPtr<svm::training::Result> trainingResults = algorithm.getResult();
auto model = trainingResults->get(classifier::training::model);

I could then serialize/deserialize the model and do predictions by setting the model back into the algorithm.

Kmeans seems to be different, I can get the results from
services::SharedPtr<kmeans::Result> trainingResults = algorithm.getResult();

Then get the centroids but I can't see how to do predictions from the centroids?
Do you have to load them up into the kMeans algorithm with your new data and kick it off with a special value of iterations for example?
How can I persist the model? Do I just persist the centroids numeric table?

Many thanks


Viewing all articles
Browse latest Browse all 190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>