/** * Constructs a new AggregateableEvaluation object * * @param data the Instances to use * @throws Exception if a problem occurs */ public AggregateableEvaluation(Instances data) throws Exception { super(data); m_delegate = new weka.classifiers.evaluation.AggregateableEvaluation(data); }
/** * 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); System.err.println(agg.toSummaryString()); System.err.println("\n" + agg.toClassDetailsString()); } catch (Exception ex) { ex.printStackTrace();
/** * Constructs a new AggregateableEvaluation object * * @param data the Instances to use * @param costMatrix the cost matrix to use * @throws Exception if a problem occurs */ public AggregateableEvaluation(Instances data, CostMatrix costMatrix) throws Exception { super(data, costMatrix); m_delegate = new weka.classifiers.evaluation.AggregateableEvaluation(data, costMatrix); }
/** * 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); } }
/** * Constructs a new AggregateableEvaluation object * * @param data the Instances to use * @throws Exception if a problem occurs */ public AggregateableEvaluation(Instances data) throws Exception { super(data); m_delegate = new weka.classifiers.evaluation.AggregateableEvaluation(data); }
/** * Constructs a new AggregateableEvaluation object * * @param data the Instances to use * @param costMatrix the cost matrix to use * @throws Exception if a problem occurs */ public AggregateableEvaluation(Instances data, CostMatrix costMatrix) throws Exception { super(data, costMatrix); m_delegate = new weka.classifiers.evaluation.AggregateableEvaluation(data, costMatrix); }
/** * Constructs a new AggregateableEvaluation object based on an Evaluation * object * * @param eval the Evaluation object to use */ public AggregateableEvaluation(Evaluation eval) throws Exception { super(eval.getHeader()); m_delegate = new weka.classifiers.evaluation.AggregateableEvaluation( eval.m_delegate); }
/** * Constructs a new AggregateableEvaluation object based on an Evaluation * object * * @param eval the Evaluation object to use */ public AggregateableEvaluation(Evaluation eval) throws Exception { super(eval.getHeader()); m_delegate = new weka.classifiers.evaluation.AggregateableEvaluation( eval.m_delegate); }