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

Stream generator for SEA concepts functions. More...

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

List of all members.

Classes

interface  ClassFunction

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 functionOption
IntOption instanceRandomSeedOption
FlagOption balanceClassesOption
IntOption numInstancesConcept
IntOption noisePercentageOption

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
boolean nextClassShouldBeZero

Static Protected Attributes

static ClassFunction[] classificationFunctions

Detailed Description

Stream generator for SEA concepts functions.

Generator described in the paper:
W. Nick Street and YongSeog Kim "A streaming ensemble algorithm (SEA) for large-scale classification", KDD '01: Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining 377-382 2001.

Notes:
The built in functions are based on the paper.

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

Definition at line 52 of file SEAGenerator.java.


Member Function Documentation

long moa.streams.generators.SEAGenerator.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 144 of file SEAGenerator.java.

void moa.streams.generators.SEAGenerator.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 210 of file SEAGenerator.java.

InstancesHeader moa.streams.generators.SEAGenerator.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 149 of file SEAGenerator.java.

Referenced by moa.streams.generators.SEAGenerator.nextInstance().

Here is the caller graph for this function:

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

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.options.AbstractOptionHandler.

Definition at line 56 of file SEAGenerator.java.

boolean moa.streams.generators.SEAGenerator.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 154 of file SEAGenerator.java.

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

Gets whether this stream can restart.

Returns:
true if this stream can restart

Implements moa.streams.InstanceStream.

Definition at line 159 of file SEAGenerator.java.

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

Gets the next instance from this stream.

Returns:
the next instance of this stream

Implements moa.streams.InstanceStream.

Definition at line 164 of file SEAGenerator.java.

Here is the call graph for this function:

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

Definition at line 125 of file SEAGenerator.java.

Here is the call graph for this function:

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

Restarts this stream.

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

Implements moa.streams.InstanceStream.

Definition at line 204 of file SEAGenerator.java.

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Initial value:
 new FlagOption("balanceClasses",
            'b', "Balance the number of instances of each class.")

Definition at line 70 of file SEAGenerator.java.

Referenced by moa.streams.generators.SEAGenerator.nextInstance().

Initial value:
 new IntOption("function", 'f',
            "Classification function used, as defined in the original paper.",
            1, 1, 4)

Definition at line 62 of file SEAGenerator.java.

Referenced by moa.streams.generators.SEAGenerator.nextInstance().

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

Definition at line 66 of file SEAGenerator.java.

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

Initial value:
 new IntOption("noisePercentage",
            'n', "Percentage of noise to add to the data.", 10, 0, 100)

Definition at line 76 of file SEAGenerator.java.

Referenced by moa.streams.generators.SEAGenerator.nextInstance().

Initial value:
 new IntOption("numInstancesConcept", 'n',
            "The number of instances for each concept.", 0, 0, Integer.MAX_VALUE)

Definition at line 73 of file SEAGenerator.java.


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