Package org.grouplens.lenskit.transform.normalize

Examples of org.grouplens.lenskit.transform.normalize.VectorTransformation


        UserHistory<? extends Event> history = dao.getEventsForUser(user, summarizer.eventTypeWanted());
        if (history == null) {
            history = History.forUser(user);
        }
        SparseVector summary = summarizer.summarize(history);
        VectorTransformation transform = normalizer.makeTransformation(user, summary);
        MutableSparseVector normed = summary.mutableCopy();
        transform.apply(normed);

        scores.clear();
        algorithm.scoreItems(model, normed, scores, scorer);

        // untransform the scores
        transform.unapply(scores);
    }
View Full Code Here


            weightChan.set(e,weight);
        }

        // Denormalize and return the results
        SparseVector urv = RatingVectorUserHistorySummarizer.makeRatingVector(history);
        VectorTransformation vo = normalizer.makeTransformation(history.getUserId(), urv);
        vo.unapply(scores);
    }
View Full Code Here

TOP

Related Classes of org.grouplens.lenskit.transform.normalize.VectorTransformation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.