public class ArffLoader extends Object
Modifier and Type | Field and Description |
---|---|
protected List<Attribute> |
auxAttributes |
protected InstanceInformation |
instanceInformation
The instance information.
|
protected Range |
range |
protected InstancesHeader |
streamHeader |
protected StreamTokenizer |
streamTokenizer
The stream tokenizer.
|
Constructor and Description |
---|
ArffLoader(Reader reader)
Instantiates a new arff loader.
|
ArffLoader(Reader reader,
int size,
int classAttribute)
Instantiates a new arff loader.
|
ArffLoader(Reader reader,
Range range)
Instantiates a new arff loader.
|
Modifier and Type | Method and Description |
---|---|
InstanceInformation |
getStructure()
Gets the structure.
|
protected Instance |
newDenseInstance(int numberAttributes) |
protected Instance |
newSparseInstance(double d) |
protected Instance |
newSparseInstance(double d,
double[] res) |
Instance |
readInstance()
Reads instance.
|
Instance |
readInstanceDense()
Reads a dense instance from the file.
|
protected void |
setValue(Instance instance,
int numAttribute,
double value,
boolean isNumber) |
protected InstanceInformation instanceInformation
protected InstancesHeader streamHeader
protected StreamTokenizer streamTokenizer
protected Range range
public ArffLoader(Reader reader, int size, int classAttribute)
reader
- the readersize
- the sizeclassAttribute
- the class attributepublic ArffLoader(Reader reader)
reader
- the readerrange
- size
- the sizeclassAttribute
- the class attributepublic InstanceInformation getStructure()
public Instance readInstance()
public Instance readInstanceDense()
protected void setValue(Instance instance, int numAttribute, double value, boolean isNumber)
protected Instance newSparseInstance(double d, double[] res)
protected Instance newSparseInstance(double d)
protected Instance newDenseInstance(int numberAttributes)
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.