public class RandomTreeGenerator extends AbstractOptionHandler implements InstanceStream
| Modifier and Type | Class and Description |
|---|---|
protected static class |
RandomTreeGenerator.Node |
| Modifier and Type | Field and Description |
|---|---|
IntOption |
firstLeafLevelOption |
protected Random |
instanceRandom |
IntOption |
instanceRandomSeedOption |
FloatOption |
leafFractionOption |
IntOption |
maxTreeDepthOption |
IntOption |
numClassesOption |
IntOption |
numNominalsOption |
IntOption |
numNumericsOption |
IntOption |
numValsPerNominalOption |
protected InstancesHeader |
streamHeader |
IntOption |
treeRandomSeedOption |
protected RandomTreeGenerator.Node |
treeRoot |
classOptionNamesToPreparedObjects, options| Constructor and Description |
|---|
RandomTreeGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
classifyInstance(RandomTreeGenerator.Node node,
double[] attVals) |
long |
estimatedRemainingInstances()
Gets the estimated number of remaining instances in this stream
|
protected void |
generateHeader() |
protected void |
generateRandomTree() |
protected RandomTreeGenerator.Node |
generateRandomTreeNode(int currentDepth,
ArrayList<Integer> nominalAttCandidates,
double[] minNumericVals,
double[] maxNumericVals,
Random treeRand) |
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.
|
weka.core.Instance |
nextInstance()
Gets the next instance from this stream.
|
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, prepareForUsecopy, measureByteSize, measureByteSize, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopy, measureByteSizepublic IntOption treeRandomSeedOption
public IntOption instanceRandomSeedOption
public IntOption numClassesOption
public IntOption numNominalsOption
public IntOption numNumericsOption
public IntOption numValsPerNominalOption
public IntOption maxTreeDepthOption
public IntOption firstLeafLevelOption
public FloatOption leafFractionOption
protected RandomTreeGenerator.Node treeRoot
protected InstancesHeader streamHeader
protected Random instanceRandom
public String getPurposeString()
OptionHandlergetPurposeString in interface OptionHandlergetPurposeString in class AbstractOptionHandlerpublic void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandlerprepareForUseImpl
and not prepareForUse since
prepareForUse calls prepareForUseImpl.prepareForUseImpl in class AbstractOptionHandlermonitor - the TaskMonitor to userepository - the ObjectRepository to usepublic long estimatedRemainingInstances()
InstanceStreamestimatedRemainingInstances in interface InstanceStreampublic boolean isRestartable()
InstanceStreamisRestartable in interface InstanceStreampublic void restart()
InstanceStreamrestart in interface InstanceStreampublic InstancesHeader getHeader()
InstanceStreamgetHeader in interface InstanceStreampublic boolean hasMoreInstances()
InstanceStreamhasMoreInstances in interface InstanceStreampublic weka.core.Instance nextInstance()
InstanceStreamnextInstance in interface InstanceStreamprotected int classifyInstance(RandomTreeGenerator.Node node, double[] attVals)
protected void generateHeader()
protected void generateRandomTree()
protected RandomTreeGenerator.Node generateRandomTreeNode(int currentDepth, ArrayList<Integer> nominalAttCandidates, double[] minNumericVals, double[] maxNumericVals, Random treeRand)
public void getDescription(StringBuilder sb, int indent)
MOAObjectAbstractMOAObject.toString
to give a string representation of the object.getDescription in interface MOAObjectsb - the stringbuilder to add the descriptionindent - the number of characters to indentCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.