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

Stream generator for Hyperplane data stream. More...

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

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
IntOption numClassesOption
IntOption numAttsOption
IntOption numDriftAttsOption
FloatOption magChangeOption
IntOption noisePercentageOption
IntOption sigmaPercentageOption
int numberInstance

Protected Member Functions

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

Protected Attributes

InstancesHeader streamHeader
Random instanceRandom
double[] weights
int[] sigma

Detailed Description

Stream generator for Hyperplane data stream.

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

Definition at line 44 of file HyperplaneGenerator.java.


Member Function Documentation

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

void moa.streams.generators.HyperplaneGenerator.generateHeader ( ) [protected]

Definition at line 94 of file HyperplaneGenerator.java.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

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

Here is the caller graph for this function:

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

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.options.AbstractOptionHandler.

Definition at line 48 of file HyperplaneGenerator.java.

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

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

Gets whether this stream can restart.

Returns:
true if this stream can restart

Implements moa.streams.InstanceStream.

Definition at line 126 of file HyperplaneGenerator.java.

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

Gets the next instance from this stream.

Returns:
the next instance of this stream

Implements moa.streams.InstanceStream.

Definition at line 131 of file HyperplaneGenerator.java.

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Restarts this stream.

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

Implements moa.streams.InstanceStream.

Definition at line 171 of file HyperplaneGenerator.java.

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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

Definition at line 54 of file HyperplaneGenerator.java.

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

Initial value:
 new FloatOption("magChange", 't',
            "Magnitude of the change for every example", 0.0, 0.0, 1.0)

Definition at line 67 of file HyperplaneGenerator.java.

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

Definition at line 70 of file HyperplaneGenerator.java.

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

Initial value:
 new IntOption("numClasses", 'c',
            "The number of classes to generate.", 2, 2, Integer.MAX_VALUE)

Definition at line 58 of file HyperplaneGenerator.java.

Referenced by moa.streams.generators.HyperplaneGenerator.generateHeader().

Initial value:
 new IntOption("numDriftAtts", 'k',
            "The number of attributes with drift.", 2, 0, Integer.MAX_VALUE)

Definition at line 64 of file HyperplaneGenerator.java.

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

Initial value:
 new IntOption("sigmaPercentage",
            's', "Percentage of probability that the direction of change is reversed.", 10, 0, 100)

Definition at line 73 of file HyperplaneGenerator.java.


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