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

Stream generator for multilabel data. More...

Inheritance diagram for moa.streams.generators.multilabel.MetaMultilabelGenerator:
Collaboration diagram for moa.streams.generators.multilabel.MetaMultilabelGenerator:

List of all members.

Public Member Functions

void prepareForUseImpl (TaskMonitor monitor, ObjectRepository repository)
 This method describes the implementation of how to prepare this object for use.
void restart ()
 Restarts this stream.
Instance nextInstance ()
 GenerateML.
InstancesHeader getHeader ()
 Gets the header of this stream.
String getPurposeString ()
 Gets the purpose of this object.
long estimatedRemainingInstances ()
 Gets the estimated number of remaining instances in this stream.
boolean hasMoreInstances ()
 Gets whether this stream has more instances to output.
boolean isRestartable ()
 Gets whether this stream can restart.
void getDescription (StringBuilder sb, int indent)
 Returns a string representation of this object.

Public Attributes

ClassOption binaryGeneratorOption
IntOption metaRandomSeedOption
IntOption numLabelsOption
IntOption skewOption
FloatOption labelCardinalityOption

Protected Member Functions

MultilabelInstancesHeader generateMultilabelHeader (Instances si)
 GenerateMultilabelHeader.
double[][] fillMatrix (double skew[], double Z, Random r)
 genMatrix.
double randFromRange (double min, double max)
double P (int i)
double P (int i, int j)
double max (double A, double B)
double min (double A, double B)

Static Protected Member Functions

static double genE (int i, double L)

Protected Attributes

MultilabelInstancesHeader m_MultilabelInstancesHeader = null
InstanceStream m_BinaryGenerator = null
Instances multilabelStreamTemplate = null
Random m_MetaRandom = null
int m_N = 0
double m_Z = 0.0
double skew [] = null
double matrix [][] = null
ArrayList m_FeatureEffects [] = null

Package Attributes

int m_A = 0
double skew_n [] = null
LinkedList< Instance > queue [] = null
 GetNextWithBinary.

Detailed Description

Stream generator for multilabel data.

Author:
Jesse Read ([email protected])
Version:
Revision:
7

Definition at line 47 of file MetaMultilabelGenerator.java.


Member Function Documentation

long moa.streams.generators.multilabel.MetaMultilabelGenerator.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 464 of file MetaMultilabelGenerator.java.

double [][] moa.streams.generators.multilabel.MetaMultilabelGenerator.fillMatrix ( double  skew[],
double  Z,
Random  r 
) [protected]

genMatrix.

P(i) = matrix[i][i] P(i|j) = matrix[i][j]

Parameters:
mthe matrix with skew stored along the diagonal
zgoal label cardinality
rrandom seed

Definition at line 335 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.restart().

Here is the call graph for this function:

Here is the caller graph for this function:

static double moa.streams.generators.multilabel.MetaMultilabelGenerator.genE ( int  i,
double  L 
) [static, protected]

Definition at line 323 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.randFromRange().

Here is the caller graph for this function:

MultilabelInstancesHeader moa.streams.generators.multilabel.MetaMultilabelGenerator.generateMultilabelHeader ( Instances  si) [protected]

GenerateMultilabelHeader.

Definition at line 149 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.restart().

Here is the call graph for this function:

Here is the caller graph for this function:

void moa.streams.generators.multilabel.MetaMultilabelGenerator.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 479 of file MetaMultilabelGenerator.java.

InstancesHeader moa.streams.generators.multilabel.MetaMultilabelGenerator.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 454 of file MetaMultilabelGenerator.java.

String moa.streams.generators.multilabel.MetaMultilabelGenerator.getPurposeString ( )

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.options.AbstractOptionHandler.

Definition at line 459 of file MetaMultilabelGenerator.java.

boolean moa.streams.generators.multilabel.MetaMultilabelGenerator.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 469 of file MetaMultilabelGenerator.java.

boolean moa.streams.generators.multilabel.MetaMultilabelGenerator.isRestartable ( )

Gets whether this stream can restart.

Returns:
true if this stream can restart

Implements moa.streams.InstanceStream.

Definition at line 474 of file MetaMultilabelGenerator.java.

double moa.streams.generators.multilabel.MetaMultilabelGenerator.max ( double  A,
double  B 
) [protected]

Definition at line 380 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.fillMatrix().

Here is the caller graph for this function:

double moa.streams.generators.multilabel.MetaMultilabelGenerator.min ( double  A,
double  B 
) [protected]
Instance moa.streams.generators.multilabel.MetaMultilabelGenerator.nextInstance ( )

GenerateML.

Generates a multi-label example.

Implements moa.streams.InstanceStream.

Definition at line 241 of file MetaMultilabelGenerator.java.

double moa.streams.generators.multilabel.MetaMultilabelGenerator.P ( int  i) [protected]

Definition at line 370 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.fillMatrix().

Here is the caller graph for this function:

double moa.streams.generators.multilabel.MetaMultilabelGenerator.P ( int  i,
int  j 
) [protected]

Definition at line 375 of file MetaMultilabelGenerator.java.

void moa.streams.generators.multilabel.MetaMultilabelGenerator.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 85 of file MetaMultilabelGenerator.java.

Here is the call graph for this function:

double moa.streams.generators.multilabel.MetaMultilabelGenerator.randFromRange ( double  min,
double  max 
) [protected]

Definition at line 365 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.fillMatrix().

Here is the call graph for this function:

Here is the caller graph for this function:

void moa.streams.generators.multilabel.MetaMultilabelGenerator.restart ( )

Restarts this stream.

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

Implements moa.streams.InstanceStream.

Definition at line 90 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.prepareForUseImpl().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Initial value:
 new ClassOption(
            "binaryGenerator", 's', "Binary Generator (use this option to specify the number of attributes, but specify two classes only).", InstanceStream.class, "generators.RandomTreeGenerator")

Definition at line 51 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.restart().

Initial value:
 new FloatOption(
            "labelCardinality", 'z', "Target label cardinality of resulting set", 1.5, 0.0, Integer.MAX_VALUE)

Definition at line 63 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.generateMultilabelHeader(), and moa.streams.generators.multilabel.MetaMultilabelGenerator.restart().

Initial value:
 new IntOption(
            "numLabels", 'c', "Number of labels.", 1)

Definition at line 57 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.restart().

LinkedList<Instance> moa.streams.generators.multilabel.MetaMultilabelGenerator.queue[] = null [package]

GetNextWithBinary.

Get the next instance with binary class i

Parameters:
ithe class to generate (0,1)

Definition at line 194 of file MetaMultilabelGenerator.java.

Referenced by moa.streams.generators.multilabel.MetaMultilabelGenerator.restart().

Initial value:
 new IntOption(
            "skew", 'k', "Skewed label distribution: 1 (default) = yes; 0 = no (relatively uniform).", 1, 0, 1)

Definition at line 60 of file MetaMultilabelGenerator.java.


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