Package org.grouplens.lenskit.vectors

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


                Ratings.make(42, 22, 3));
        UserHistory<Event> history = History.forUser(42, events);
        assertThat(history, hasSize(3));
        SparseVector v = history.memoize(RatingVectorUserHistorySummarizer.SummaryFunction.INSTANCE);
        assertThat(v.size(), equalTo(3));
        assertThat(v.mean(), equalTo(3.0));
        assertThat(history.memoize(RatingVectorUserHistorySummarizer.SummaryFunction.INSTANCE),
                   sameInstance(v));
    }

    @Test
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.