Example usage for org.apache.mahout.cf.taste.impl.recommender.svd PersistenceStrategy maybePersist

List of usage examples for org.apache.mahout.cf.taste.impl.recommender.svd PersistenceStrategy maybePersist

Introduction

In this page you can find the example usage for org.apache.mahout.cf.taste.impl.recommender.svd PersistenceStrategy maybePersist.

Prototype

void maybePersist(Factorization factorization) throws IOException;

Source Link

Document

Write a factorization to a persistent store unless it already contains an identical factorization.

Usage

From source file:org.plista.kornakapi.core.config.RecommenderConfig.java

License:Apache License

protected void createEmptyFactorization(PersistenceStrategy strategy) throws IOException {
    strategy.maybePersist(new Factorization(new FastByIDMap<Integer>(0), new FastByIDMap<Integer>(0),
            new double[0][0], new double[0][0]));
}

From source file:org.plista.kornakapi.web.servlets.BaseServlet.java

License:Apache License

private void createEmptyFactorization(PersistenceStrategy strategy) throws IOException {
    strategy.maybePersist(new Factorization(new FastByIDMap<Integer>(0), new FastByIDMap<Integer>(0),
            new double[0][0], new double[0][0]));
}