MOA 12.03
Real Time Analytics for Data Streams
moa.streams.generators.WaveformGenerator Class Reference

Stream generator for the problem of predicting one of three waveform types. More...

Inheritance diagram for moa.streams.generators.WaveformGenerator:
Collaboration diagram for moa.streams.generators.WaveformGenerator:

List of all members.

Public Member Functions

String getPurposeString ()
 Gets the purpose of this object.
long estimatedRemainingInstances ()
 Gets the estimated number of remaining instances in this stream.
InstancesHeader getHeader ()
 Gets the header of this stream.
boolean hasMoreInstances ()
 Gets whether this stream has more instances to output.
boolean isRestartable ()
 Gets whether this stream can restart.
Instance nextInstance ()
 Gets the next instance from this stream.
void restart ()
 Restarts this stream.
void getDescription (StringBuilder sb, int indent)
 Returns a string representation of this object.

Public Attributes

IntOption instanceRandomSeedOption
FlagOption addNoiseOption

Static Public Attributes

static final int NUM_CLASSES = 3
static final int NUM_BASE_ATTRIBUTES = 21
static final int TOTAL_ATTRIBUTES_INCLUDING_NOISE = 40

Protected Member Functions

void prepareForUseImpl (TaskMonitor monitor, ObjectRepository repository)
 This method describes the implementation of how to prepare this object for use.

Protected Attributes

InstancesHeader streamHeader
Random instanceRandom

Static Protected Attributes

static final int hFunctions [][]

Detailed Description

Stream generator for the problem of predicting one of three waveform types.

Author:
Richard Kirkby (rkirkby@cs.waikato.ac.nz)
Version:
Revision:
7

Definition at line 44 of file WaveformGenerator.java.


Member Function Documentation

long moa.streams.generators.WaveformGenerator.estimatedRemainingInstances ( )

Gets the estimated number of remaining instances in this stream.

Returns:
the estimated number of instances to get from this stream

Implements moa.streams.InstanceStream.

Definition at line 98 of file WaveformGenerator.java.

void moa.streams.generators.WaveformGenerator.getDescription ( StringBuilder  sb,
int  indent 
)

Returns a string representation of this object.

Used in AbstractMOAObject.toString to give a string representation of the object.

Parameters:
sbthe stringbuilder to add the description
indentthe number of characters to indent

Implements moa.MOAObject.

Reimplemented in moa.streams.generators.WaveformGeneratorDrift.

Definition at line 161 of file WaveformGenerator.java.

InstancesHeader moa.streams.generators.WaveformGenerator.getHeader ( )

Gets the header of this stream.

This is useful to know attributes and classes. InstancesHeader is an extension of weka.Instances.

Returns:
the header of this stream

Implements moa.streams.InstanceStream.

Definition at line 103 of file WaveformGenerator.java.

Referenced by moa.streams.generators.WaveformGeneratorDrift.nextInstance(), and moa.streams.generators.WaveformGenerator.nextInstance().

Here is the caller graph for this function:

String moa.streams.generators.WaveformGenerator.getPurposeString ( )

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.options.AbstractOptionHandler.

Reimplemented in moa.streams.generators.WaveformGeneratorDrift.

Definition at line 48 of file WaveformGenerator.java.

boolean moa.streams.generators.WaveformGenerator.hasMoreInstances ( )

Gets whether this stream has more instances to output.

This is useful when reading streams from files.

Returns:
true if this stream has more instances to output

Implements moa.streams.InstanceStream.

Definition at line 108 of file WaveformGenerator.java.

boolean moa.streams.generators.WaveformGenerator.isRestartable ( )

Gets whether this stream can restart.

Returns:
true if this stream can restart

Implements moa.streams.InstanceStream.

Definition at line 113 of file WaveformGenerator.java.

Instance moa.streams.generators.WaveformGenerator.nextInstance ( )

Gets the next instance from this stream.

Returns:
the next instance of this stream

Implements moa.streams.InstanceStream.

Reimplemented in moa.streams.generators.WaveformGeneratorDrift.

Definition at line 118 of file WaveformGenerator.java.

Here is the call graph for this function:

void moa.streams.generators.WaveformGenerator.prepareForUseImpl ( TaskMonitor  monitor,
ObjectRepository  repository 
) [protected, virtual]

This method describes the implementation of how to prepare this object for use.

All classes that extends this class have to implement prepareForUseImpl and not prepareForUse since prepareForUse calls prepareForUseImpl.

Parameters:
monitorthe TaskMonitor to use
repositorythe ObjectRepository to use

Implements moa.options.AbstractOptionHandler.

Reimplemented in moa.streams.generators.WaveformGeneratorDrift.

Definition at line 77 of file WaveformGenerator.java.

Here is the call graph for this function:

void moa.streams.generators.WaveformGenerator.restart ( )

Restarts this stream.

It must be similar to starting a new stream from scratch.

Implements moa.streams.InstanceStream.

Definition at line 156 of file WaveformGenerator.java.

Referenced by moa.streams.generators.WaveformGenerator.prepareForUseImpl().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

final int moa.streams.generators.WaveformGenerator.hFunctions[][] [static, protected]
Initial value:
 {
        {0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0},
        {0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0}}

Definition at line 60 of file WaveformGenerator.java.

Referenced by moa.streams.generators.WaveformGeneratorDrift.nextInstance(), and moa.streams.generators.WaveformGenerator.nextInstance().

Initial value:
 new IntOption(
            "instanceRandomSeed", 'i',
            "Seed for random generation of instances.", 1)

Definition at line 65 of file WaveformGenerator.java.

Referenced by moa.streams.generators.WaveformGenerator.restart().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations