com.rapidminer.example.set
Class ConditionedExampleSet

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by com.rapidminer.operator.ResultObjectAdapter
          extended by com.rapidminer.example.set.AbstractExampleSet
              extended by com.rapidminer.example.set.ConditionedExampleSet
All Implemented Interfaces:
ExampleSet, IOObject, ResultObject, Saveable, LoggingHandler, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Example>

public class ConditionedExampleSet
extends AbstractExampleSet

Hides Examples that do not fulfill a given Condition.

Author:
Ingo Mierswa
See Also:
Serialized Form

Field Summary
static int CONDITION_ALL
           
static int CONDITION_ATTRIBUTE_VALUE_FILTER
           
static int CONDITION_CORRECT_PREDICTIONS
           
static int CONDITION_MISSING_ATTRIBUTES
           
static int CONDITION_MISSING_LABELS
           
static int CONDITION_NO_MISSING_ATTRIBUTES
           
static int CONDITION_NO_MISSING_LABELS
           
static int CONDITION_WRONG_PREDICTIONS
           
static java.lang.String[] KNOWN_CONDITION_NAMES
          Array of short names for the known conditions.
 
Constructor Summary
ConditionedExampleSet(ConditionedExampleSet exampleSet)
          Clone constructor.
ConditionedExampleSet(ExampleSet parent, Condition condition)
          Creates a new example which used only examples fulfilling the given condition.
ConditionedExampleSet(ExampleSet parent, Condition condition, boolean inverted)
          Creates a new example which used only examples fulfilling the given condition.
 
Method Summary
static Condition createCondition(java.lang.String name, ExampleSet exampleSet, java.lang.String parameterString)
          Checks if the given name is the short name of a known condition and creates it.
 boolean equals(java.lang.Object o)
          Returns true, if all attributes including labels and other special attributes are equal.
 Attributes getAttributes()
          Returns the data structure holding all attributes.
 Example getExample(int index)
          Returns the i-th example fulfilling the condition.
 ExampleTable getExampleTable()
          Returns the underlying example table.
 int hashCode()
          Returns the hash code of all attributes.
 java.util.Iterator<Example> iterator()
          Returns a MappedExampleReader.
 int size()
          Counts the number of examples which fulfills the condition.
 
Methods inherited from class com.rapidminer.example.set.AbstractExampleSet
clone, copy, createDataTable, getActions, getExampleFromId, getExampleIndicesFromId, getExtension, getFileDescription, getName, getResultIcon, getStatistics, getStatistics, getVisualizationComponent, getVisualizationComponent, recalculateAllAttributeStatistics, recalculateAttributeStatistics, remapIds, toString, writeAttributeFile, writeDataFile, writeSparseAttributeFile, writeSparseDataFile
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, isSavable, log, logError, logNote, logWarning, save, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
getLog, getSource, initWriting, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.ResultObject
toResultString
 
Methods inherited from interface com.rapidminer.operator.IOObject
getLog, getSource, setLoggingHandler, setSource, write
 

Field Detail

KNOWN_CONDITION_NAMES

public static final java.lang.String[] KNOWN_CONDITION_NAMES
Array of short names for the known conditions.


CONDITION_ALL

public static final int CONDITION_ALL
See Also:
Constant Field Values

CONDITION_CORRECT_PREDICTIONS

public static final int CONDITION_CORRECT_PREDICTIONS
See Also:
Constant Field Values

CONDITION_WRONG_PREDICTIONS

public static final int CONDITION_WRONG_PREDICTIONS
See Also:
Constant Field Values

CONDITION_NO_MISSING_ATTRIBUTES

public static final int CONDITION_NO_MISSING_ATTRIBUTES
See Also:
Constant Field Values

CONDITION_MISSING_ATTRIBUTES

public static final int CONDITION_MISSING_ATTRIBUTES
See Also:
Constant Field Values

CONDITION_NO_MISSING_LABELS

public static final int CONDITION_NO_MISSING_LABELS
See Also:
Constant Field Values

CONDITION_MISSING_LABELS

public static final int CONDITION_MISSING_LABELS
See Also:
Constant Field Values

CONDITION_ATTRIBUTE_VALUE_FILTER

public static final int CONDITION_ATTRIBUTE_VALUE_FILTER
See Also:
Constant Field Values
Constructor Detail

ConditionedExampleSet

public ConditionedExampleSet(ExampleSet parent,
                             Condition condition)
Creates a new example which used only examples fulfilling the given condition.


ConditionedExampleSet

public ConditionedExampleSet(ExampleSet parent,
                             Condition condition,
                             boolean inverted)
Creates a new example which used only examples fulfilling the given condition.


ConditionedExampleSet

public ConditionedExampleSet(ConditionedExampleSet exampleSet)
Clone constructor.

Method Detail

equals

public boolean equals(java.lang.Object o)
Description copied from class: AbstractExampleSet
Returns true, if all attributes including labels and other special attributes are equal.

Specified by:
equals in interface ExampleSet
Overrides:
equals in class AbstractExampleSet

hashCode

public int hashCode()
Description copied from class: AbstractExampleSet
Returns the hash code of all attributes.

Specified by:
hashCode in interface ExampleSet
Overrides:
hashCode in class AbstractExampleSet

iterator

public java.util.Iterator<Example> iterator()
Returns a MappedExampleReader.


getExample

public Example getExample(int index)
Returns the i-th example fulfilling the condition.


size

public int size()
Counts the number of examples which fulfills the condition.


getAttributes

public Attributes getAttributes()
Description copied from interface: ExampleSet
Returns the data structure holding all attributes.


getExampleTable

public ExampleTable getExampleTable()
Description copied from interface: ExampleSet
Returns the underlying example table. Most operators should operate on the example set and manipulate example to change table data instead of using the table directly.


createCondition

public static Condition createCondition(java.lang.String name,
                                        ExampleSet exampleSet,
                                        java.lang.String parameterString)
                                 throws ConditionCreationException
Checks if the given name is the short name of a known condition and creates it. If the name is not known, this method creates a new instance of className which must be an implementation of Condition by calling its two argument constructor passing it the example set and the parameter string

Throws:
ConditionCreationException


Copyright © 2001-2009 by Rapid-I