|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.example.table.AbstractExampleTable
public abstract class AbstractExampleTable
This class is the core data supplier for example sets. Several example sets can use the same data and access the attribute values by reference.
| Constructor Summary | |
|---|---|
AbstractExampleTable(java.util.List<Attribute> attributes)
Creates a new ExampleTable. |
|
| Method Summary | |
|---|---|
int |
addAttribute(Attribute a)
Adds the attribute to the list of attributes assigning it a free column index. |
void |
addAttributes(java.util.Collection<Attribute> newAttributes)
Adds all Attributes in newAttributes to the end
of the list of attributes, creating new data columns if necessary. |
ExampleSet |
createExampleSet()
Returns a new example set with all attributes switched on. |
ExampleSet |
createExampleSet(Attribute labelAttribute)
Returns a new example set with all attributes switched on. |
ExampleSet |
createExampleSet(Attribute labelAttribute,
Attribute weightAttribute,
Attribute idAttribute)
Returns a new example set with all attributes switched on. |
ExampleSet |
createExampleSet(AttributeSet attributeSet)
Returns a new example set with all attributes of the ExampleTable
and with the special roles defined by the given attribute set. |
ExampleSet |
createExampleSet(java.util.Iterator<AttributeRole> newSpecialAttributes)
Returns a new example set with all attributes switched on. |
ExampleSet |
createExampleSet(java.util.Map<Attribute,java.lang.String> specialAttributes)
Returns a new example set with all attributes switched on. |
Attribute |
findAttribute(java.lang.String name)
Returns the attribute with the given name. |
Attribute |
getAttribute(int i)
Returns the attribute of the column number i. |
int |
getAttributeCount()
Returns the number of non null attributes. |
Attribute[] |
getAttributes()
Returns a new array containing all Attributes. |
int |
getNumberOfAttributes()
Returns the number of attributes. |
void |
removeAttribute(Attribute attribute)
Equivalent to calling removeAttribute(attribute.getTableIndex()). |
void |
removeAttribute(int index)
Sets the attribute with the given index to null. |
java.lang.String |
toDataString()
Dumps the complete data as string. |
java.lang.String |
toString()
Returns a string representation of this example table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rapidminer.example.table.ExampleTable |
|---|
getDataRow, getDataRowReader, size |
| Constructor Detail |
|---|
public AbstractExampleTable(java.util.List<Attribute> attributes)
attributes - List of Attribute. The indices of the attibutes are
set to values reflecting their position in the list.| Method Detail |
|---|
public Attribute[] getAttributes()
Attributes.
getAttributes in interface ExampleTablepublic Attribute getAttribute(int i)
getAttribute in interface ExampleTable
public Attribute findAttribute(java.lang.String name)
throws OperatorException
findAttribute in interface ExampleTableOperatorExceptionpublic void addAttributes(java.util.Collection<Attribute> newAttributes)
Attributes in newAttributes to the end
of the list of attributes, creating new data columns if necessary.
addAttributes in interface ExampleTablepublic int addAttribute(Attribute a)
addAttribute in interface ExampleTablepublic void removeAttribute(Attribute attribute)
removeAttribute(attribute.getTableIndex()).
removeAttribute in interface ExampleTablepublic void removeAttribute(int index)
removeAttribute in interface ExampleTablepublic int getNumberOfAttributes()
Attributes by calling
getAttribute(int) must keep in mind, that some of
these attributes may be null.
getNumberOfAttributes in interface ExampleTablepublic int getAttributeCount()
getAttributeCount in interface ExampleTableExampleTable.getNumberOfAttributes().public ExampleSet createExampleSet(Attribute labelAttribute)
createExampleSet in interface ExampleTable
public ExampleSet createExampleSet(Attribute labelAttribute,
Attribute weightAttribute,
Attribute idAttribute)
createExampleSet in interface ExampleTablepublic ExampleSet createExampleSet(java.util.Iterator<AttributeRole> newSpecialAttributes)
createExampleSet in interface ExampleTablepublic ExampleSet createExampleSet(AttributeSet attributeSet)
ExampleTable
and with the special roles defined by the given attribute set.
createExampleSet in interface ExampleTablepublic ExampleSet createExampleSet()
createExampleSet in interface ExampleTablepublic ExampleSet createExampleSet(java.util.Map<Attribute,java.lang.String> specialAttributes)
createExampleSet in interface ExampleTablepublic java.lang.String toString()
ExampleTable
toString in interface ExampleTabletoString in class java.lang.Objectpublic java.lang.String toDataString()
ExampleTable
toDataString in interface ExampleTable
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||