Examples of keysByValue()


Examples of org.grouplens.lenskit.vectors.SparseVector.keysByValue()

        if (predictions == null) {
            return null;
        }

        SparseVector ratings = user.getTestRatings();
        LongList ideal = ratings.keysByValue(true);
        LongList actual = predictions.keysByValue(true);
        double idealGain = computeDCG(ideal, ratings);
        double gain = computeDCG(actual, ratings);
        double score = gain / idealGain;
        context.add(score);
View Full Code Here

Examples of org.grouplens.lenskit.vectors.SparseVector.keysByValue()

        if (predictions == null) {
            return null;
        }

        SparseVector ratings = user.getTestRatings();
        LongList ideal = ratings.keysByValue(true);
        LongList actual = predictions.keysByValue(true);
        double idealUtility = computeHLU(ideal, ratings);
        double actualUtility = computeHLU(actual, ratings);
        double u = actualUtility / idealUtility;
View Full Code Here

Examples of org.grouplens.lenskit.vectors.SparseVector.keysByValue()

        if (recommendations == null) {
            return null;
        }

        SparseVector ratings = user.getTestRatings();
        LongList ideal = ratings.keysByValue(true);
        if (ideal.size() > listSize) {
            ideal = ideal.subList(0, listSize);
        }
        double idealGain = computeDCG(ideal, ratings);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.