org.dllearner.algorithms.refinement2
Class MultiHeuristic

java.lang.Object
  extended by org.dllearner.algorithms.refinement2.MultiHeuristic
All Implemented Interfaces:
Comparator<ExampleBasedNode>, ExampleBasedHeuristic

public class MultiHeuristic
extends Object
implements ExampleBasedHeuristic

This heuristic combines the following criteria to assign a double score value to a node:

The heuristic has two parameters: The value of a node is calculated as follows:

value = accuracy + gain bonus factor * accuracy gain - expansion penalty factor * horizontal expansion - node children penalty factor * number of children of node

accuracy = (TP + TN)/(P + N)

TP = number of true positives (= covered positives)
TN = number of true negatives (= nr of negatives examples - covered negatives)
P = number of positive examples
N = number of negative examples

Author:
Jens Lehmann

Constructor Summary
MultiHeuristic(int nrOfPositiveExamples, int nrOfNegativeExamples)
          Deprecated. 
MultiHeuristic(int nrOfPositiveExamples, int nrOfNegativeExamples, ROLComponent2Configurator configurator)
           
 
Method Summary
 int compare(ExampleBasedNode node1, ExampleBasedNode node2)
           
 double getNodeScore(ExampleBasedNode node)
           
static double getNodeScore(ExampleBasedNode node, int nrOfPositiveExamples, int nrOfNegativeExamples, ROLComponent2Configurator configurator)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

MultiHeuristic

@Deprecated
public MultiHeuristic(int nrOfPositiveExamples,
                                 int nrOfNegativeExamples)
Deprecated. 


MultiHeuristic

public MultiHeuristic(int nrOfPositiveExamples,
                      int nrOfNegativeExamples,
                      ROLComponent2Configurator configurator)
Method Detail

compare

public int compare(ExampleBasedNode node1,
                   ExampleBasedNode node2)
Specified by:
compare in interface Comparator<ExampleBasedNode>

getNodeScore

public double getNodeScore(ExampleBasedNode node)

getNodeScore

public static double getNodeScore(ExampleBasedNode node,
                                  int nrOfPositiveExamples,
                                  int nrOfNegativeExamples,
                                  ROLComponent2Configurator configurator)


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2008 Jens Lehmann