public class Head extends ConditionSet
Rule. It may consist of several conditions that should be
taken into account for making a prediction if the rule's body covers an example.
This class provides a ConfusionMatrix for each Condition that is contained by a
head (accessible via or {@link #getConfusionMatrix(int)}).
The confusion matrices can be used to store the true positives, false positives, true negatives,
and false negatives that are predicted by the head.
| Constructor and Description |
|---|
Head()
Creates an empty head.
|
Head(Condition... conditions)
Creates a new head that consists of several conditions.
|
Head(@NotNull java.lang.Iterable<? extends Condition> conditions)
Creates a new head that consists of several conditions.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull ConfusionMatrix |
getConfusionMatrix(@NotNull Attribute attribute) |
@NotNull ConfusionMatrix |
getConfusionMatrix(int attributeIndex) |
boolean |
remove(java.lang.Object o) |
java.lang.String |
toString() |
add, addAll, clear, contains, containsAll, equals, get, get, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArraypublic Head()
public Head(@NotNull
Condition... conditions)
conditions - An array that contains the conditions, the head should consist ofpublic Head(@NotNull
@NotNull java.lang.Iterable<? extends Condition> conditions)
conditions - An Iterable that allows to iterate the conditions, the head should
consist of@NotNull public @NotNull ConfusionMatrix getConfusionMatrix(@NotNull @NotNull Attribute attribute)
@NotNull public @NotNull ConfusionMatrix getConfusionMatrix(int attributeIndex)
public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<Condition>remove in interface java.util.Set<Condition>remove in class ConditionSetpublic java.lang.String toString()
toString in class java.lang.Object