public class MetaMultilabelGenerator extends AbstractOptionHandler implements InstanceStream
Modifier and Type | Field and Description |
---|---|
ClassOption |
binaryGeneratorOption |
protected double[][] |
Conditional |
FloatOption |
labelCardinalityOption |
FloatOption |
labelCardinalityRatioOption |
FloatOption |
labelCardinalityVarOption |
FloatOption |
labelDependencyChangeRatioOption |
protected int |
m_A |
protected InstanceStream |
m_BinaryGenerator |
protected int |
m_L |
protected Random |
m_MetaRandom |
protected MultilabelInstancesHeader |
m_MultilabelInstancesHeader |
protected HashSet[] |
m_TopCombinations |
IntOption |
metaRandomSeedOption |
protected Instances |
multilabelStreamTemplate |
IntOption |
numLabelsOption |
protected double[] |
priors |
protected double[] |
priors_norm |
IntOption |
skewOption |
config
Constructor and Description |
---|
MetaMultilabelGenerator() |
Modifier and Type | Method and Description |
---|---|
long |
estimatedRemainingInstances()
Gets the estimated number of remaining instances in this stream
|
protected double[][] |
generateConditional(double[] P,
boolean[][] M)
GenerateConditional.
|
protected MultilabelInstancesHeader |
generateMultilabelHeader(Instances si)
GenerateMultilabelHeader.
|
void |
getDescription(StringBuilder sb,
int indent)
Returns a string representation of this object.
|
InstancesHeader |
getHeader()
Gets the header of this stream.
|
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.
|
static void |
main(String[] args) |
protected boolean[][] |
modifyDependencyMatrix(boolean[][] M,
double u,
Random r)
ModifyDependencyMatrix.
|
protected double[] |
modifyPriorVector(double[] P,
double u,
Random r,
boolean skew)
ModifyPriorVector.
|
InstanceExample |
nextInstance()
GenerateML.
|
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, getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copy, measureByteSize
public ClassOption binaryGeneratorOption
public IntOption metaRandomSeedOption
public IntOption numLabelsOption
public IntOption skewOption
public FloatOption labelCardinalityOption
public FloatOption labelCardinalityVarOption
public FloatOption labelCardinalityRatioOption
public FloatOption labelDependencyChangeRatioOption
protected MultilabelInstancesHeader m_MultilabelInstancesHeader
protected InstanceStream m_BinaryGenerator
protected Instances multilabelStreamTemplate
protected Random m_MetaRandom
protected int m_L
protected int m_A
protected double[] priors
protected double[] priors_norm
protected double[][] Conditional
protected HashSet[] m_TopCombinations
public 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 void restart()
ExampleStream
restart
in interface ExampleStream<Example<Instance>>
protected MultilabelInstancesHeader generateMultilabelHeader(Instances si)
si
- single-label Instancespublic InstanceExample nextInstance()
nextInstance
in interface ExampleStream<Example<Instance>>
protected double[] modifyPriorVector(double[] P, double u, Random r, boolean skew)
P[]
- the prior distributionu
- the probability of changing P[j]r
- for random numbersskew
- NOTE not currently usedprotected boolean[][] modifyDependencyMatrix(boolean[][] M, double u, Random r)
M[][]
- a boolean matrixu
- the probability of changing the relationship M[j][k]r
- for random numbersprotected double[][] generateConditional(double[] P, boolean[][] M)
P
- prior distributionM
- dependency matrix (where 1 == dependency)public InstancesHeader getHeader()
ExampleStream
getHeader
in interface ExampleStream<Example<Instance>>
public String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractOptionHandler
public long estimatedRemainingInstances()
ExampleStream
estimatedRemainingInstances
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 void getDescription(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 static void main(String[] args)
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.