|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.example.table.AbstractDataRowReader
com.rapidminer.example.table.SparseFormatDataRowReader
public class SparseFormatDataRowReader
Reads the data rows in sparse format. The format is specified in the class
comment of SparseFormatExampleSource.
Attributes may be passed to the reader in its constructor. If they
are ommitted, they are generated on the fly. In either case, indices are
assigned to the attributes. If an AbstractExampleTable is generated using
instances of this class, the constructor of AbstractExampleTable will
reassign these indexes.
| Field Summary | |
|---|---|
static java.lang.String[] |
FORMAT_NAMES
Names of the formats. |
static int |
FORMAT_NO_LABEL
Label is missing. |
static int |
FORMAT_PREFIX
Label has a prefix specified in the prefix map. |
static int |
FORMAT_SEPARATE_FILE
Label is in separate file. |
static int |
FORMAT_XY
Label succeeds attributes. |
static int |
FORMAT_YX
Label preceeds attributes. |
| Constructor Summary | |
|---|---|
SparseFormatDataRowReader(DataRowFactory factory,
int format,
java.util.Map<java.lang.String,java.lang.String> prefixMap,
AttributeSet attributeSet,
java.io.Reader attributeReader,
java.io.Reader labelReader,
int sampleSize)
Creates a new data row reader for sparse format. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Checks if futher examples exist. |
DataRow |
next()
Returns the next Example. |
| Methods inherited from class com.rapidminer.example.table.AbstractDataRowReader |
|---|
getFactory, remove |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String[] FORMAT_NAMES
public static final int FORMAT_XY
public static final int FORMAT_YX
public static final int FORMAT_PREFIX
public static final int FORMAT_SEPARATE_FILE
public static final int FORMAT_NO_LABEL
| Constructor Detail |
|---|
public SparseFormatDataRowReader(DataRowFactory factory,
int format,
java.util.Map<java.lang.String,java.lang.String> prefixMap,
AttributeSet attributeSet,
java.io.Reader attributeReader,
java.io.Reader labelReader,
int sampleSize)
factory - Factory used to create DataRow instances.format - One Out of FORMAT_XY, FORMAT_YX, FORMAT_PREFIX, and
FORMAT_SEPARATE_FILE.prefixMap - Maps prefixes to special attribute names (e.g. "l"
to "label").attributeSet - Set of regular and special attributes.attributeReader - Reader for the datalabelReader - Reader for the labels. Only necessary if format is
FORMAT_SEPARATE_FILE.sampleSize - sample size, may be -1 for no limit.| Method Detail |
|---|
public boolean hasNext()
public DataRow next()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||