net.sf.myra.antree
Class ErrorBasedMetric

java.lang.Object
  extended by net.sf.myra.antree.ErrorBasedMetric

public class ErrorBasedMetric
extends java.lang.Object

Version:
$Revision: 2329 $ $Date:: 2011-08-02 09:57:44#$
Author:
Fernando Esteban Barril Otero

Field Summary
static java.lang.String CONFIDENCE_LEVEL
          The property key under which the reduced-error pruner confidence level is stored.
 
Constructor Summary
ErrorBasedMetric()
          Default constructor.
 
Method Summary
 double error(Node node, Statistics statistics)
          Returns the predicted error of the subtree represented by the specified node.
static ErrorBasedMetric getInstance()
          Returns the singleton instance.
 double rawError(Node node, Statistics statistics)
          Returns the (raw) error of the subtree represented by the specified node.
 double ucf(double error, double total)
          Returns the estimate error rate value based on the upper confidence level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIDENCE_LEVEL

public static final java.lang.String CONFIDENCE_LEVEL
The property key under which the reduced-error pruner confidence level is stored.

See Also:
Constant Field Values
Constructor Detail

ErrorBasedMetric

public ErrorBasedMetric()
Default constructor.

Method Detail

error

public double error(Node node,
                    Statistics statistics)
Returns the predicted error of the subtree represented by the specified node.

Parameters:
node - the node reference.
statistics - the statistics of the node.
Returns:
the predicted error of the subtree represented by the specified node.

rawError

public double rawError(Node node,
                       Statistics statistics)
Returns the (raw) error of the subtree represented by the specified node.

Parameters:
node - the node reference.
statistics - the statistics of the node.
Returns:
the (raw) error of the subtree represented by the specified node.

ucf

public double ucf(double error,
                  double total)
Returns the estimate error rate value based on the upper confidence level. This implementation is based on C4.5 algorithm.

Parameters:
error - the number of misclassified instances.
total - the total number of instances.
Returns:
the estimate error rate value.

getInstance

public static ErrorBasedMetric getInstance()
Returns the singleton instance.

Returns:
the singleton instance.


Copyright © 2013. All Rights Reserved.