|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.example.table.AbstractExampleTable
com.rapidminer.example.table.MemoryExampleTable
public class MemoryExampleTable
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. In this case the data is hold in the main memory during the process.
| Constructor Summary | |
|---|---|
MemoryExampleTable(java.util.List<Attribute> attributes)
Creates a new instance of MemoryExampleTable. |
|
MemoryExampleTable(java.util.List<Attribute> attributes,
DataRowFactory factory,
int size)
Creates a new instance of MemoryExampleTable. |
|
MemoryExampleTable(java.util.List<Attribute> attributes,
DataRowReader i)
Creates an empty memory example table and fills it with the data rows read from i. |
|
MemoryExampleTable(java.util.List<Attribute> attributes,
DataRowReader i,
boolean permutate)
Creates an empty memory example table and fills it with the data rows read from i. |
|
| Method Summary | |
|---|---|
int |
addAttribute(Attribute attribute)
Adds a new attribute to this example table by invoking the super method. |
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. |
void |
addDataRow(DataRow dataRow)
Convenience method allowing the adding of data rows without a data row reader. |
void |
clear()
Clears the table. |
static MemoryExampleTable |
createCompleteCopy(ExampleTable oldTable)
|
DataRow |
getDataRow(int index)
Returns the data row with the given index. |
DataRowReader |
getDataRowReader()
Returns a new data row reader. |
void |
readExamples(DataRowReader i)
Reads the examples into memory in the order they are delivered by the given reader. |
void |
readExamples(DataRowReader i,
boolean permutate)
Reads the examples into memory and permutates the order. |
void |
readExamples(DataRowReader i,
boolean permutate,
java.util.Random random)
Reads the examples into memory and permutates the order. |
boolean |
removeDataRow(DataRow dataRow)
Convenience method for removing data rows. |
DataRow |
removeDataRow(int index)
Convenience method for removing data rows. |
int |
size()
Returns the size of this example table, i.e. the number of data rows. |
| Methods inherited from class com.rapidminer.example.table.AbstractExampleTable |
|---|
createExampleSet, createExampleSet, createExampleSet, createExampleSet, createExampleSet, createExampleSet, findAttribute, getAttribute, getAttributeCount, getAttributes, getNumberOfAttributes, removeAttribute, removeAttribute, toDataString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryExampleTable(java.util.List<Attribute> attributes)
attributes - List of Attribute containing the attributes of the
columns. None of these must be null.
public MemoryExampleTable(java.util.List<Attribute> attributes,
DataRowFactory factory,
int size)
attributes - List of Attribute containing the attributes of the
columns. None of these must be null.size - initial size of this example table. All values will be
Double.NaN.
public MemoryExampleTable(java.util.List<Attribute> attributes,
DataRowReader i)
public MemoryExampleTable(java.util.List<Attribute> attributes,
DataRowReader i,
boolean permutate)
| Method Detail |
|---|
public void readExamples(DataRowReader i)
public void readExamples(DataRowReader i,
boolean permutate)
public void readExamples(DataRowReader i,
boolean permutate,
java.util.Random random)
public DataRowReader getDataRowReader()
public DataRow getDataRow(int index)
public int size()
public void addDataRow(DataRow dataRow)
public boolean removeDataRow(DataRow dataRow)
public DataRow removeDataRow(int index)
public void clear()
public void addAttributes(java.util.Collection<Attribute> newAttributes)
Attributes in newAttributes to the end
of the list of attributes, creating new data columns if necessary. This
method is much faster than calling repeatedly addAttribute, because this would
cause the data rows to be enlarged and hence copied many times.
addAttributes in interface ExampleTableaddAttributes in class AbstractExampleTablepublic int addAttribute(Attribute attribute)
addAttribute in interface ExampleTableaddAttribute in class AbstractExampleTablepublic static MemoryExampleTable createCompleteCopy(ExampleTable oldTable)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||