@Test public void testScoreWithGoodDataset() { Map<Integer, double[]> data = new HashMap<>(); for (int i = 0; i < 1000; i++) data.put(i, new double[] {i > 500 ? 1.0 : 0.0, i}); DecisionTreeClassificationTrainer trainer = new DecisionTreeClassificationTrainer(1, 0); DebugCrossValidation<DecisionTreeNode, Double, Integer, double[]> scoreCalculator = new DebugCrossValidation<>(); Vectorizer<Integer, double[], Integer, Double> vectorizer = new DoubleArrayVectorizer<Integer>().labeled(Vectorizer.LabelCoordinate.FIRST); int folds = 4; scoreCalculator .withUpstreamMap(data) .withAmountOfParts(1) .withTrainer(trainer) .withMetric(new Accuracy<>()) .withPreprocessor(vectorizer) .withAmountOfFolds(folds) .isRunningOnPipeline(false); verifyScores(folds, scoreCalculator.scoreByFolds()); }
@Override public double[] scoreByFolds() { double[] locScores; locScores = isRunningOnPipeline ? scorePipelineOnIgnite() : scoreOnIgnite(); return locScores; }
CrossValidation extends AbstractCrossValidation<M, L, K, V> { @Override public double[] scoreByFolds() { double[] locScores; locScores = isRunningOnPipeline ? scorePipelineOnIgnite() : scoreOnIgnite(); return locScores; } }
CrossValidation extends AbstractCrossValidation<M, L, K, V> { @Override public double[] scoreByFolds() { double[] locScores; locScores = isRunningOnPipeline ? scorePipelineOnIgnite() : scoreOnIgnite(); return locScores; }  }
CrossValidation extends AbstractCrossValidation<M, L, K, V> { @Override public double[] scoreByFolds() { double[] locScores; locScores = isRunningOnPipeline ? scorePipelineOnIgnite() : scoreOnIgnite(); return locScores; }  @Override double[] scoreByFolds(); CrossValidation<M, L, K, V> withIgnite(Ignite ignite); CrossValidation<M, L, K, V> withUpstreamCache(IgniteCache<K, V> upstreamCache); }
CrossValidation extends AbstractCrossValidation<M, L, K, V> { @Override public double[] scoreByFolds() { double[] locScores; locScores = isRunningOnPipeline ? scorePipelineOnIgnite() : scoreOnIgnite(); return locScores; }  @Override double[] scoreByFolds(); CrossValidation<M, L, K, V> withIgnite(Ignite ignite); CrossValidation<M, L, K, V> withUpstreamCache(IgniteCache<K, V> upstreamCache);  }