|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.example.AbstractExampleTable
edu.udo.cs.yale.example.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 experiment.
| Field Summary | |
|---|---|
private int |
columns
Number of columns. |
private java.util.List<DataRow> |
dataList
List of DataRows. |
private static int |
INCREMENT
Number of columns to add when new columns are allocated. |
| Constructor Summary | |
|---|---|
MemoryExampleTable(java.util.List<Attribute> attributes)
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. |
|
MemoryExampleTable(java.util.List<Attribute> attributes,
int size)
Creates a new instance of MemoryExampleTable. |
|
| Method Summary | |
|---|---|
int |
addAttribute(Attribute attribute)
Adds a new attribute to this example table by invoking the super method. |
void |
addDataRow(DataRow dataRow)
Convenience method allowing the adding of data rows without a data row reader. |
DataRowReader |
getDataReader()
Returns a new data row reader. |
DataRow |
getDataRow(int index)
Returns the data row with the given index. |
int |
getSize()
Returns the size of this example table, i.e. the number of data rows. |
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. |
| Methods inherited from class edu.udo.cs.yale.example.AbstractExampleTable |
|---|
addAttributes, createCompleteExampleSet, createCompleteExampleSet, createCompleteExampleSet, createExampleSet, findAttribute, getAttribute, getAttribute, getAttributeCount, getAttributes, getBlockEndIndex, getHighestBlockNr, getNextFreeBlockNr, getNumberOfAttributes, removeAttribute, removeAttribute, toDataString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.util.List<DataRow> dataList
DataRows.
private int columns
private static final int INCREMENT
| 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,
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 getDataReader()
getDataReader in interface ExampleTablegetDataReader in class AbstractExampleTablepublic DataRow getDataRow(int index)
getDataRow in interface ExampleTablegetDataRow in class AbstractExampleTablepublic int getSize()
getSize in interface ExampleTablegetSize in class AbstractExampleTablepublic void addDataRow(DataRow dataRow)
public int addAttribute(Attribute attribute)
addAttribute in interface ExampleTableaddAttribute in class AbstractExampleTable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||