|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.learner.rules.Rule
public class Rule
This class combines several SplitConditions to one rule by conjunctions. For example: "if condition1 and condition2 ... and conditionN then labelname = labelValue" It provides a test method, to test if examples belong to the labelValue of this rule. The rule is build incrementally, SplitConditions may be added by addTerm
| Constructor Summary | |
|---|---|
Rule()
|
|
Rule(java.lang.String labelName)
|
|
Rule(java.lang.String labelName,
java.util.Collection<SplitCondition> terms)
|
|
Rule(java.lang.String labelName,
SplitCondition term)
|
|
| Method Summary | |
|---|---|
void |
addTerm(SplitCondition condition)
This method adds a condition to the conjunction in the rule's head |
java.lang.Object |
clone()
Performs only a shallow clone on the conditions (which are not mutable). |
boolean |
coversExample(Example example)
|
double[] |
getConfidences()
|
ExampleSet |
getCovered(ExampleSet exampleSet)
|
int[] |
getFrequencies()
|
java.lang.String |
getLabel()
|
java.util.List<SplitCondition> |
getTerms()
|
boolean |
isPure(ExampleSet exampleSet,
double pureness)
|
ExampleSet |
removeCovered(ExampleSet exampleSet)
|
void |
removeLastTerm()
|
void |
setFrequencies(int[] frequencies)
|
void |
setLabel(java.lang.String labelName)
|
void |
setTerms(java.util.LinkedList<SplitCondition> terms)
|
java.lang.String |
toString()
This method returns a String representation of this rule. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Rule()
public Rule(java.lang.String labelName)
public Rule(java.lang.String labelName,
SplitCondition term)
public Rule(java.lang.String labelName,
java.util.Collection<SplitCondition> terms)
| Method Detail |
|---|
public java.lang.Object clone()
clone in class java.lang.Objectpublic void setLabel(java.lang.String labelName)
public boolean coversExample(Example example)
public void setFrequencies(int[] frequencies)
public int[] getFrequencies()
public double[] getConfidences()
public java.lang.String toString()
toString in class java.lang.Objectpublic void addTerm(SplitCondition condition)
condition - This condition is addedpublic void removeLastTerm()
public java.util.List<SplitCondition> getTerms()
public void setTerms(java.util.LinkedList<SplitCondition> terms)
public java.lang.String getLabel()
public ExampleSet getCovered(ExampleSet exampleSet)
public ExampleSet removeCovered(ExampleSet exampleSet)
public boolean isPure(ExampleSet exampleSet,
double pureness)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||