de.fhdarmstadt.fbi.dtree.evaluator
Class EvaluationResult

java.lang.Object
  extended byde.fhdarmstadt.fbi.dtree.evaluator.EvaluationResult

public class EvaluationResult
extends java.lang.Object

The EvaluationResult contains all results from an evaluation of a decision tree node.

The result contains a collection of positive and negative test data instances. The positive instances matched the pattern contained in the node, while the negative did not fit into that pattern.

When evaluating a tree, the negative matches of this result will usally be used to feed the negativeNode.

See Also:
Evaluator.evaluate(DTreeNode, DataSource)

Constructor Summary
EvaluationResult(TestData[] positiveMatches, TestData[] negativeMatches, DTreeNode sourceNode)
          Creates a new evaluation result instance.
 
Method Summary
 int getNegativeMatchCount()
          Returns the number of negative matches.
 TestData[] getNegativeMatches()
          Returns the collection of negative matches.
 Classification getNegativeMatchesClassification()
          Returns the classification for the negative matches, either Classification.POSITIVE or Classification.NEGATIVE if all elements share the same classification or else Classification.UNKNOWN.
 int getPositiveMatchCount()
          Returns the number of positive matches.
 TestData[] getPositiveMatches()
          Returns the collection of positive matches.
 Classification getPositiveMatchesClassification()
          Returns the classification for the positive matches, either Classification.POSITIVE or Classification.NEGATIVE if all elements share the same classification or else Classification.UNKNOWN.
 DTreeNode getSourceNode()
          Returns the decision tree node used to build this result.
 int size()
          Returns the total number of negative and positive matches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluationResult

public EvaluationResult(TestData[] positiveMatches,
                        TestData[] negativeMatches,
                        DTreeNode sourceNode)
Creates a new evaluation result instance. The arrays given are not copied (for performance reasons); they should not be modified after this result has been created.

Parameters:
negativeMatches - the list of negative matches
positiveMatches - the list of positive matches
sourceNode - the source node used to build the result or null, if the result is a cummulated result.
Method Detail

getNegativeMatches

public TestData[] getNegativeMatches()
Returns the collection of negative matches. The returned array is a reference to the internal array (for performance reasons) and should not be modifed.

Returns:
the negative matches.

getPositiveMatches

public TestData[] getPositiveMatches()
Returns the collection of positive matches. The returned array is a reference to the internal array (for performance reasons) and should not be modifed.

Returns:
the positive matches.

getNegativeMatchCount

public int getNegativeMatchCount()
Returns the number of negative matches.

Returns:
the number of negative matches.

getPositiveMatchCount

public int getPositiveMatchCount()
Returns the number of positive matches.

Returns:
the number of positive matches.

size

public int size()
Returns the total number of negative and positive matches.

Returns:
the total number of test data elements in this result object.

getSourceNode

public DTreeNode getSourceNode()
Returns the decision tree node used to build this result.

Returns:
the source node, or null, of this is a cummulated result.

getNegativeMatchesClassification

public Classification getNegativeMatchesClassification()
Returns the classification for the negative matches, either Classification.POSITIVE or Classification.NEGATIVE if all elements share the same classification or else Classification.UNKNOWN.

Returns:
the classification for the negative matches.

getPositiveMatchesClassification

public Classification getPositiveMatchesClassification()
Returns the classification for the positive matches, either Classification.POSITIVE or Classification.NEGATIVE if all elements share the same classification or else Classification.UNKNOWN.

Returns:
the classification for the positive matches.