Configurable
, java.io.Serializable
, CapabilitiesHandler
, MOAObject
, OptionHandler
, ExampleStream<Example<Instance>>
, InstanceStream
public class AgrawalGenerator extends AbstractOptionHandler implements InstanceStream, CapabilitiesHandler
Modifier and Type | Class | Description |
---|---|---|
protected static interface |
AgrawalGenerator.ClassFunction |
Modifier and Type | Field | Description |
---|---|---|
FlagOption |
balanceClassesOption |
|
protected static AgrawalGenerator.ClassFunction[] |
classificationFunctions |
|
IntOption |
functionOption |
|
protected java.util.Random |
instanceRandom |
|
IntOption |
instanceRandomSeedOption |
|
protected boolean |
nextClassShouldBeZero |
|
FloatOption |
peturbFractionOption |
|
protected InstancesHeader |
streamHeader |
config
Constructor | Description |
---|---|
AgrawalGenerator() |
Modifier and Type | Method | Description |
---|---|---|
ImmutableCapabilities |
defineImmutableCapabilities() |
Defines the set of capabilities the object has.
|
long |
estimatedRemainingInstances() |
Gets the estimated number of remaining instances in this stream
|
void |
getDescription(java.lang.StringBuilder sb,
int indent) |
Returns a string representation of this object.
|
InstancesHeader |
getHeader() |
Gets the header of this stream.
|
java.lang.String |
getPurposeString() |
Dictionary with option texts and objects
|
boolean |
hasMoreInstances() |
Gets whether this stream has more instances to output.
|
boolean |
isRestartable() |
Gets whether this stream can restart.
|
InstanceExample |
nextInstance() |
Gets the next example from this stream.
|
protected double |
perturbValue(double val,
double min,
double max) |
|
protected double |
perturbValue(double val,
double range,
double min,
double max) |
|
protected void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository) |
This method describes the implementation of how to prepare this object for use.
|
void |
restart() |
Restarts this stream.
|
copy, measureByteSize, measureByteSize, toString
copy, getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
getCapabilities
copy, measureByteSize
public IntOption functionOption
public IntOption instanceRandomSeedOption
public FloatOption peturbFractionOption
public FlagOption balanceClassesOption
protected static AgrawalGenerator.ClassFunction[] classificationFunctions
protected InstancesHeader streamHeader
protected java.util.Random instanceRandom
protected boolean nextClassShouldBeZero
public java.lang.String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractOptionHandler
protected void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class AbstractOptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to usepublic long estimatedRemainingInstances()
ExampleStream
estimatedRemainingInstances
in interface ExampleStream<Example<Instance>>
public InstancesHeader getHeader()
ExampleStream
getHeader
in interface ExampleStream<Example<Instance>>
public boolean hasMoreInstances()
ExampleStream
hasMoreInstances
in interface ExampleStream<Example<Instance>>
public boolean isRestartable()
ExampleStream
isRestartable
in interface ExampleStream<Example<Instance>>
public InstanceExample nextInstance()
ExampleStream
nextInstance
in interface ExampleStream<Example<Instance>>
protected double perturbValue(double val, double min, double max)
protected double perturbValue(double val, double range, double min, double max)
public void restart()
ExampleStream
restart
in interface ExampleStream<Example<Instance>>
public void getDescription(java.lang.StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic ImmutableCapabilities defineImmutableCapabilities()
CapabilitiesHandler
defineImmutableCapabilities
in interface CapabilitiesHandler
defineImmutableCapabilities
in interface ExampleStream<Example<Instance>>
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.