So, I'm building an algorithm and i need to perform only the crossfold task, and not the entire evaluator. This is my code:
File file = new File("lenskitreadyDatabase.csv");
EventFormat eventFormat = new CustomFormatter();
DataSource dataSource = new GenericDataSource("split", new TextEventDAO(file, eventFormat));
CrossfoldTask task = new CrossfoldTask("cross10");
task
.setHoldout(5)
.setSource(dataSource)
.setPartitions(FIRST_CROSSFOLD)
.setProject(new EvalProject(new Properties()));
List<TTDataSet> l = task.perform();
l.stream().forEach(v -> {
System.out.println(v.getName());
System.out.println(v.getTestData().getEventDAO().streamEvents().hasNext());
});
Lenskit is creating all my train-test files, but they are all empty. I've used the forEach method to check if the error was on writing the files to disk, but apparently it isn't, because this is the logs that i'm getting with those System.out.printLn()
:
cross10.0
false
cross10.1
false
cross10.2
false
cross10.3
false
cross10.4
false
cross10.5
false
cross10.6
false
cross10.7
false
cross10.8
false
cross10.9
false
I haven't found much information about running only the crossfold task and not the entire evaluator, so if you could shed a light on, it would be amazing. thanks