mulan.evaluation
Class Evaluator

java.lang.Object
  extended by mulan.evaluation.Evaluator

public class Evaluator
extends Object

Evaluator - responsible for generating evaluation data

Version:
2011.09.06
Author:
rofr, Grigorios Tsoumakas

Constructor Summary
Evaluator()
           
 
Method Summary
 MultipleEvaluation crossValidate(MultiLabelLearner learner, MultiLabelInstances data, int someFolds)
          Evaluates a MultiLabelLearner via cross-validation on given data set with defined number of folds and seed.
 MultipleEvaluation crossValidate(MultiLabelLearner learner, MultiLabelInstances data, List<Measure> measures, int someFolds)
          Evaluates a MultiLabelLearner via cross-validation on given data set using given evaluation measures with defined number of folds and seed.
 Evaluation evaluate(MultiLabelLearner learner, MultiLabelInstances data)
          Evaluates a MultiLabelLearner on given test data set.
 Evaluation evaluate(MultiLabelLearner learner, MultiLabelInstances data, List<Measure> measures)
          Evaluates a MultiLabelLearner on given test data set using specified evaluation measures
 void setSeed(int aSeed)
          Sets the seed for reproduction of cross-validation results
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Evaluator

public Evaluator()
Method Detail

setSeed

public void setSeed(int aSeed)
Sets the seed for reproduction of cross-validation results

Parameters:
aSeed - seed for reproduction of cross-validation results

evaluate

public Evaluation evaluate(MultiLabelLearner learner,
                           MultiLabelInstances data,
                           List<Measure> measures)
                    throws IllegalArgumentException,
                           Exception
Evaluates a MultiLabelLearner on given test data set using specified evaluation measures

Parameters:
learner - the learner to be evaluated via cross-validation
data - the data set for cross-validation
measures - the evaluation measures to compute
Returns:
an Evaluation object
Throws:
IllegalArgumentException - if an input parameter is null
Exception

evaluate

public Evaluation evaluate(MultiLabelLearner learner,
                           MultiLabelInstances data)
                    throws IllegalArgumentException,
                           Exception
Evaluates a MultiLabelLearner on given test data set.

Parameters:
learner - the learner to be evaluated
data - the data set for evaluation
Returns:
the evaluation result
Throws:
IllegalArgumentException - if either of input parameters is null.
Exception

crossValidate

public MultipleEvaluation crossValidate(MultiLabelLearner learner,
                                        MultiLabelInstances data,
                                        int someFolds)
Evaluates a MultiLabelLearner via cross-validation on given data set with defined number of folds and seed.

Parameters:
learner - the learner to be evaluated via cross-validation
data - the multi-label data set for cross-validation
someFolds -
Returns:
a MultipleEvaluation object holding the results

crossValidate

public MultipleEvaluation crossValidate(MultiLabelLearner learner,
                                        MultiLabelInstances data,
                                        List<Measure> measures,
                                        int someFolds)
Evaluates a MultiLabelLearner via cross-validation on given data set using given evaluation measures with defined number of folds and seed.

Parameters:
learner - the learner to be evaluated via cross-validation
data - the multi-label data set for cross-validation
measures - the evaluation measures to compute
someFolds -
Returns:
a MultipleEvaluation object holding the results