Package org.grouplens.lenskit.eval.data

Examples of org.grouplens.lenskit.eval.data.CSVDataSource


    }

    private File trainingFile(TTDataSet data) throws IOException {
        try {
            GenericTTDataSet gds = (GenericTTDataSet) data;
            CSVDataSource csv = (CSVDataSource) gds.getTrainingData();
            if (",".equals(csv.getDelimiter())) {
                File file = csv.getFile();
                logger.debug("using training file {}", file);
                return file;
            }
        } catch (ClassCastException e) {
            /* No-op - this is fine, we will make a file. */
 
View Full Code Here


        @Nullable
        @Override
        public File apply(@Nullable DataSource input) {
            assert input != null;
            if (input instanceof CSVDataSource) {
                CSVDataSource csv = (CSVDataSource) input;
                File file = csv.getFile();
                String name = file.getName();
                return new File(file.getParentFile(), name + ".pack");
            } else {
                File dir = new File(getProject().getConfig().getDataDir());
                dir = new File(dir, "packed");
View Full Code Here

TOP

Related Classes of org.grouplens.lenskit.eval.data.CSVDataSource

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.