Example usage for weka.classifiers.evaluation CostCurve CostCurve

List of usage examples for weka.classifiers.evaluation CostCurve CostCurve

Introduction

In this page you can find the example usage for weka.classifiers.evaluation CostCurve CostCurve.

Prototype

CostCurve

Source Link

Usage

From source file:adams.data.conversion.WekaEvaluationToCostCurve.java

License:Open Source License

/**
 * Performs the actual conversion.// ww w.  j av a 2  s.co m
 *
 * @return      the converted data
 * @throws Exception   if something goes wrong with the conversion
 */
@Override
protected Object doConvert() throws Exception {
    Evaluation eval;
    CostCurve curve;
    Instances cost;

    eval = (Evaluation) m_Input;
    m_ClassLabelIndex.setMax(eval.getHeader().classAttribute().numValues());
    curve = new CostCurve();
    cost = curve.getCurve(eval.predictions(), m_ClassLabelIndex.getIntIndex());

    return cost;
}