/** * Adds the statistics encapsulated in the supplied Evaluation object into * this one. Does not perform any checks for compatibility between the * supplied Evaluation object and this one. * * @param evaluation the evaluation object to aggregate */ public void aggregate(Evaluation evaluation) { ((weka.classifiers.evaluation.AggregateableEvaluation) m_delegate) .aggregate(evaluation.m_delegate); } }
/** * Adds the statistics encapsulated in the supplied Evaluation object into * this one. Does not perform any checks for compatibility between the * supplied Evaluation object and this one. * * @param evaluation the evaluation object to aggregate */ public void aggregate(Evaluation evaluation) { ((weka.classifiers.evaluation.AggregateableEvaluation) m_delegate) .aggregate(evaluation.m_delegate); } }
/** * Aggregate a list of Evaluation objects. * * @param evals the list of Evaluation objects to aggregate * @return a single eval Evaluation * @throws Exception if a problem occurs */ public Evaluation aggregate(List<Evaluation> evals) throws Exception { if (evals.size() == 0) { throw new Exception("Nothing to aggregate!"); } AggregateableEvaluation aggEval = new AggregateableEvaluation(evals.get(0)); for (Evaluation e : evals) { aggEval.aggregate(e); } aggEval.finalizeAggregation(); return aggEval; }
agg = new weka.classifiers.evaluation.AggregateableEvaluation(eval); agg.aggregate(eval);