Configurable
, java.io.Serializable
, CapabilitiesHandler
, MOAObject
, OptionHandler
, ExampleStream<Example<Instance>>
, InstanceStream
public class SimpleCSVStream extends ClusteringStream
Modifier and Type | Field | Description |
---|---|---|
FlagOption |
classIndexOption |
|
FileOption |
csvFileOption |
|
protected Instances |
dataset |
|
protected InputStreamProgressMonitor |
fileProgressMonitor |
|
protected java.io.BufferedReader |
fileReader |
|
protected boolean |
hitEndOfFile |
|
protected InstanceExample |
lastInstanceRead |
|
protected int |
numAttributes |
|
protected int |
numInstancesRead |
|
protected int |
numTokens |
|
StringOption |
splitCharOption |
config
decayHorizonOption, decayThresholdOption, evaluationFrequencyOption, numAttsOption
Constructor | Description |
---|---|
SimpleCSVStream() |
Creates a simple ClusteringStream for csv files.
|
Modifier and Type | Method | Description |
---|---|---|
long |
estimatedRemainingInstances() |
Gets the estimated number of remaining instances in this stream
|
void |
getDescription(java.lang.StringBuilder sb,
int indent) |
Returns a string representation of this object.
|
InstancesHeader |
getHeader() |
Gets the header of this stream.
|
java.lang.String |
getPurposeString() |
Dictionary with option texts and objects
|
boolean |
hasMoreInstances() |
Gets whether this stream has more instances to output.
|
boolean |
isRestartable() |
Gets whether this stream can restart.
|
InstanceExample |
nextInstance() |
Gets the next example from this stream.
|
void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository) |
This method describes the implementation of how to prepare this object for use.
|
void |
restart() |
Restarts this stream.
|
copy, measureByteSize, measureByteSize, toString
copy, getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
getCapabilities
getDecayHorizon, getDecayThreshold, getEvaluationFrequency
defineImmutableCapabilities
copy, measureByteSize
public FileOption csvFileOption
public StringOption splitCharOption
public FlagOption classIndexOption
protected Instances dataset
protected java.io.BufferedReader fileReader
protected boolean hitEndOfFile
protected InstanceExample lastInstanceRead
protected int numInstancesRead
protected int numTokens
protected int numAttributes
protected InputStreamProgressMonitor fileProgressMonitor
public SimpleCSVStream()
public java.lang.String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractOptionHandler
public void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class AbstractOptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to usepublic InstancesHeader getHeader()
ExampleStream
public long estimatedRemainingInstances()
ExampleStream
public boolean hasMoreInstances()
ExampleStream
public InstanceExample nextInstance()
ExampleStream
public boolean isRestartable()
ExampleStream
public void restart()
ExampleStream
public void getDescription(java.lang.StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.