Commit cbcf072a authored by Jakub's avatar Jakub
Browse files

HOTFIX: check for empty datasets

parent c8f91cc5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ public class ExperimentRunner {
        logger.debug("Running experiment: (" + container.name() + ", " + algo.toString() + ")");
        long time = 0;
        TransactionFile result = new TransactionFile(new ArrayList<>());
        if(container.dataset().getTransactions().isEmpty()) throw new NoResultException("Empty Dataset.");
        int threshold = cache.containsKey(container.name())? cache.get(container.name())+1 : Helper.getFrequency(container.dataset()).values().stream().max(Integer::compareTo).get();

        while(result.getTransactions().stream().filter((x->x.getData().size()>1)).collect(Collectors.toList()).isEmpty() && threshold > 0) {