public class MultiHeuristic extends Object implements ExampleBasedHeuristic, Component
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
Constructor and Description |
---|
MultiHeuristic() |
MultiHeuristic(int nrOfPositiveExamples,
int nrOfNegativeExamples)
Deprecated.
|
MultiHeuristic(int nrOfPositiveExamples,
int nrOfNegativeExamples,
double negativeWeight,
double startNodeBonus,
double expansionPenaltyFactor,
int negationPenalty) |
Modifier and Type | Method and Description |
---|---|
int |
compare(ExampleBasedNode node1,
ExampleBasedNode node2) |
double |
getExpansionPenaltyFactor() |
double |
getGainBonusFactor() |
int |
getNegationPenalty() |
double |
getNegativeWeight() |
double |
getNodeChildPenalty() |
double |
getNodeScore(ExampleBasedNode node) |
static double |
getNodeScore(ExampleBasedNode node,
int nrOfPositiveExamples,
int nrOfNegativeExamples,
double negativeWeight,
double startNodeBonus,
double expansionPenaltyFactor,
int negationPenalty) |
int |
getNrOfExamples() |
int |
getNrOfNegativeExamples() |
double |
getStartNodeBonus() |
void |
init()
Method to be called after the component has been configured.
|
void |
setExpansionPenaltyFactor(double expansionPenaltyFactor) |
void |
setGainBonusFactor(double gainBonusFactor) |
void |
setNegationPenalty(int negationPenalty) |
void |
setNegativeWeight(double negativeWeight) |
void |
setNodeChildPenalty(double nodeChildPenalty) |
void |
setNrOfExamples(int nrOfExamples) |
void |
setNrOfNegativeExamples(int nrOfNegativeExamples) |
void |
setStartNodeBonus(double startNodeBonus) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
@Deprecated public MultiHeuristic(int nrOfPositiveExamples, int nrOfNegativeExamples)
public MultiHeuristic(int nrOfPositiveExamples, int nrOfNegativeExamples, double negativeWeight, double startNodeBonus, double expansionPenaltyFactor, int negationPenalty)
public MultiHeuristic()
public void init() throws ComponentInitException
Component
init
in interface Component
ComponentInitException
- This exception is thrown if any
exceptions occur within the initialisation process of this
component. As component developer, you are encouraged to
re-throw occurring exception as ComponentInitException and
giving an error message as well as the actually exception by
using the constructor ComponentInitException(String, Throwable)
.public int compare(ExampleBasedNode node1, ExampleBasedNode node2)
compare
in interface Comparator<ExampleBasedNode>
public double getNodeScore(ExampleBasedNode node)
getNodeScore
in interface Heuristic<ExampleBasedNode>
public static double getNodeScore(ExampleBasedNode node, int nrOfPositiveExamples, int nrOfNegativeExamples, double negativeWeight, double startNodeBonus, double expansionPenaltyFactor, int negationPenalty)
public double getExpansionPenaltyFactor()
public void setExpansionPenaltyFactor(double expansionPenaltyFactor)
public int getNrOfNegativeExamples()
public void setNrOfNegativeExamples(int nrOfNegativeExamples)
public int getNrOfExamples()
public void setNrOfExamples(int nrOfExamples)
public double getGainBonusFactor()
public void setGainBonusFactor(double gainBonusFactor)
public double getNodeChildPenalty()
public void setNodeChildPenalty(double nodeChildPenalty)
public double getStartNodeBonus()
public void setStartNodeBonus(double startNodeBonus)
public double getNegativeWeight()
public void setNegativeWeight(double negativeWeight)
public int getNegationPenalty()
public void setNegationPenalty(int negationPenalty)
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann