Package org.grouplens.lenskit.eval.algorithm

Examples of org.grouplens.lenskit.eval.algorithm.AlgorithmInstanceBuilder


        algorithms.add(algorithm);
        return this;
    }

    public TrainTestEvalTask addAlgorithm(Map<String,Object> attrs, String file) throws IOException, RecommenderConfigurationException {
        algorithms.add(new AlgorithmInstanceBuilder().setProject(getProject())
                                                     .configureFromFile(attrs, new File(file))
                                                     .build());
        return this;
    }
View Full Code Here


    @Test
    public void testAlgorithmAccuracy() throws TaskExecutionException, IOException {
        Properties props =  new Properties();
        props.setProperty(EvalConfig.DATA_DIR_PROPERTY, workDir.newFolder("data").getAbsolutePath());
        SimpleEvaluator evalCommand = new SimpleEvaluator(props);
        AlgorithmInstanceBuilder algo = new AlgorithmInstanceBuilder();
        configureAlgorithm(algo.getConfig());
        evalCommand.addAlgorithm(algo);

        evalCommand.addDataset(new GenericDataSource("ml-100k", dao, PreferenceDomain.fromString("[1,5]/1")), 5, 0.2);

        evalCommand.addMetric(new CoveragePredictMetric())
View Full Code Here

        this.algorithm = algorithm;
        return this;
    }

    public DumpGraphTask setAlgorithm(Map<String,Object> attrs, File file) throws IOException, RecommenderConfigurationException {
        algorithm = new AlgorithmInstanceBuilder().configureFromFile(attrs, file)
                                                         .build();
        return this;
    }
View Full Code Here

                                                         .build();
        return this;
    }

    public DumpGraphTask setAlgorithm(Map<String,Object> attrs, String file) throws IOException, RecommenderConfigurationException {
        algorithm = new AlgorithmInstanceBuilder().configureFromFile(attrs, new File(file))
                                                         .build();
        return this;
    }
View Full Code Here

TOP

Related Classes of org.grouplens.lenskit.eval.algorithm.AlgorithmInstanceBuilder

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.