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

Stream generator that adds concept drift to examples in a stream. More...

Inheritance diagram for moa.streams.ConceptDriftStream:
Collaboration diagram for moa.streams.ConceptDriftStream:

List of all members.

Public Member Functions

String getPurposeString ()
 Gets the purpose of this object.
void prepareForUseImpl (TaskMonitor monitor, ObjectRepository repository)
 This method describes the implementation of how to prepare this object for use.
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

ClassOption streamOption
ClassOption driftstreamOption
FloatOption alphaOption
IntOption positionOption
IntOption widthOption
IntOption randomSeedOption

Protected Attributes

InstanceStream inputStream
InstanceStream driftStream
Random random
int numberInstanceStream

Detailed Description

Stream generator that adds concept drift to examples in a stream.



Example:

ConceptDriftStream -s (generators.AgrawalGenerator -f 7)
-d (generators.AgrawalGenerator -f 2) -w 1000000 -p 900000


s : Stream
d : Concept drift Stream
p : Central position of concept drift change
w : Width of concept drift change

Author:
Albert Bifet (abifet at cs dot waikato dot ac dot nz)
Version:
Revision:
7

Definition at line 49 of file ConceptDriftStream.java.


Member Function Documentation

long moa.streams.ConceptDriftStream.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 101 of file ConceptDriftStream.java.

Here is the call graph for this function:

void moa.streams.ConceptDriftStream.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.

Definition at line 141 of file ConceptDriftStream.java.

InstancesHeader moa.streams.ConceptDriftStream.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 106 of file ConceptDriftStream.java.

Here is the call graph for this function:

String moa.streams.ConceptDriftStream.getPurposeString ( )

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.options.AbstractOptionHandler.

Definition at line 53 of file ConceptDriftStream.java.

boolean moa.streams.ConceptDriftStream.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 111 of file ConceptDriftStream.java.

Here is the call graph for this function:

boolean moa.streams.ConceptDriftStream.isRestartable ( )

Gets whether this stream can restart.

Returns:
true if this stream can restart

Implements moa.streams.InstanceStream.

Definition at line 116 of file ConceptDriftStream.java.

Here is the call graph for this function:

Instance moa.streams.ConceptDriftStream.nextInstance ( )

Gets the next instance from this stream.

Returns:
the next instance of this stream

Implements moa.streams.InstanceStream.

Definition at line 121 of file ConceptDriftStream.java.

Here is the call graph for this function:

void moa.streams.ConceptDriftStream.prepareForUseImpl ( TaskMonitor  monitor,
ObjectRepository  repository 
) [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.

Definition at line 88 of file ConceptDriftStream.java.

Here is the call graph for this function:

void moa.streams.ConceptDriftStream.restart ( )

Restarts this stream.

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

Implements moa.streams.InstanceStream.

Definition at line 134 of file ConceptDriftStream.java.

Here is the call graph for this function:


Member Data Documentation

Initial value:
 new FloatOption("alpha",
            'a', "Angle alpha of change grade.", 0.0, 0.0, 90.0)

Definition at line 67 of file ConceptDriftStream.java.

Referenced by moa.streams.ConceptDriftStream.prepareForUseImpl().

Initial value:
 new ClassOption("driftstream", 'd',
            "Concept drift Stream.", InstanceStream.class,
            "generators.RandomTreeGenerator")

Definition at line 63 of file ConceptDriftStream.java.

Referenced by moa.streams.ConceptDriftStream.prepareForUseImpl().

Initial value:
 new IntOption("position",
            'p', "Central position of concept drift change.", 0)

Definition at line 70 of file ConceptDriftStream.java.

Referenced by moa.streams.ConceptDriftStream.nextInstance().

Initial value:
 new IntOption("randomSeed", 'r',
            "Seed for random noise.", 1)

Definition at line 76 of file ConceptDriftStream.java.

Referenced by moa.streams.ConceptDriftStream.prepareForUseImpl().

Initial value:
 new ClassOption("stream", 's',
            "Stream to add concept drift.", InstanceStream.class,
            "generators.RandomTreeGenerator")

Definition at line 59 of file ConceptDriftStream.java.

Referenced by moa.streams.ConceptDriftStream.prepareForUseImpl().

Initial value:
 new IntOption("width",
            'w', "Width of concept drift change.", 1000)

Definition at line 73 of file ConceptDriftStream.java.

Referenced by moa.streams.ConceptDriftStream.nextInstance(), and moa.streams.ConceptDriftStream.prepareForUseImpl().


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