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 weka.core.Instances |
multilabelStreamTemplate |
IntOption |
numLabelsOption |
protected double[] |
priors |
protected double[] |
priors_norm |
IntOption |
skewOption |
classOptionNamesToPreparedObjects, options
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(weka.core.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()
Gets the purpose of this object
|
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.
|
weka.core.Instance |
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, discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, 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 weka.core.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()
InstanceStream
restart
in interface InstanceStream
protected MultilabelInstancesHeader generateMultilabelHeader(weka.core.Instances si)
si
- single-label Instancespublic weka.core.Instance nextInstance()
nextInstance
in interface InstanceStream
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()
InstanceStream
getHeader
in interface InstanceStream
public String getPurposeString()
OptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractOptionHandler
public long estimatedRemainingInstances()
InstanceStream
estimatedRemainingInstances
in interface InstanceStream
public boolean hasMoreInstances()
InstanceStream
hasMoreInstances
in interface InstanceStream
public boolean isRestartable()
InstanceStream
isRestartable
in interface InstanceStream
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 © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.