Package org.grouplens.lenskit.transform.threshold

Examples of org.grouplens.lenskit.transform.threshold.RealThreshold


    public void testTruncate() {
        long[] keys = {1, 2, 3, 4};
        double[] values = {1.0, 2.0, 3.0, 4.0};
        MutableSparseVector v = MutableSparseVector.wrap(keys, values);

        VectorTruncator truncator = new ThresholdTruncator(new RealThreshold(3.5));
        truncator.truncate(v);

        int numSeen = 0;
        for (VectorEntry e : v.view(VectorEntry.State.SET)) {
            assertThat(e.getKey(), equalTo(4L));
View Full Code Here

TOP

Related Classes of org.grouplens.lenskit.transform.threshold.RealThreshold

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.