weka.classifiers.trees
Class RandomModelTrees

java.lang.Object
  extended by weka.classifiers.AbstractClassifier
      extended by weka.classifiers.RandomizableClassifier
          extended by weka.classifiers.trees.RandomModelTrees
All Implemented Interfaces:
Serializable, Cloneable, weka.classifiers.Classifier, weka.core.CapabilitiesHandler, weka.core.OptionHandler, weka.core.Randomizable, weka.core.RevisionHandler, weka.core.WeightedInstancesHandler

public class RandomModelTrees
extends weka.classifiers.RandomizableClassifier
implements weka.core.OptionHandler, weka.core.WeightedInstancesHandler

Version:
$Revision: 4521 $
Author:
Bernhard Pfahringer (bernhard@cs.waikato.ac.nz)
See Also:
Serialized Form

Field Summary
protected  weka.core.Instances m_data
           
protected  int m_max
           
protected  weka.classifiers.trees.Node[] m_node
           
protected  int m_numIterations
          The number of iterations.
protected  int m_numTrials
           
protected  double m_ridge
           
 
Fields inherited from class weka.classifiers.RandomizableClassifier
m_Seed
 
Fields inherited from class weka.classifiers.AbstractClassifier
m_Debug
 
Constructor Summary
RandomModelTrees()
           
 
Method Summary
 void buildClassifier(weka.core.Instances data)
           
 double classifyInstance(weka.core.Instance instance)
          Calculates the class membership probabilities for the given test instance.
 weka.core.Capabilities getCapabilities()
          Returns default capabilities of the classifier.
 Comparator<weka.core.Instance>[] getComparators(int k)
           
 int getMax()
           
 int getNumIterations()
          Gets the number of iterations.
 String[] getOptions()
          Gets the current settings of the Classifier.
 String getRevision()
           
 double getRidge()
           
 int getTrials()
           
 String globalInfo()
          Returns a string describing classifier.
 Enumeration listOptions()
          Returns an enumeration describing the available options.
static void main(String[] argv)
          Main method for testing this class.
 String maxTipText()
          Returns the tip text for this property.
 String numIterationsTipText()
          Returns the tip text for this property.
 String ridgeTipText()
          Returns the tip text for this property.
 void setMax(int n)
           
 void setNumIterations(int numIterations)
          Sets the number of iterations.
 void setOptions(String[] options)
          Parses a given list of options.
 void setRidge(double c)
           
 void setTrials(int n)
           
 String toString()
           
 String toStringOLD()
          Returns description of the bagged classifier.
 String trialsTipText()
          Returns the tip text for this property.
 
Methods inherited from class weka.classifiers.RandomizableClassifier
getSeed, seedTipText, setSeed
 
Methods inherited from class weka.classifiers.AbstractClassifier
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_node

protected weka.classifiers.trees.Node[] m_node

m_numIterations

protected int m_numIterations
The number of iterations.


m_max

protected int m_max

m_data

protected weka.core.Instances m_data

m_numTrials

protected int m_numTrials

m_ridge

protected double m_ridge
Constructor Detail

RandomModelTrees

public RandomModelTrees()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing classifier.

Returns:
a description suitable for displaying in the explorer/experimenter gui

listOptions

public Enumeration listOptions()
Returns an enumeration describing the available options.

Specified by:
listOptions in interface weka.core.OptionHandler
Overrides:
listOptions in class weka.classifiers.RandomizableClassifier
Returns:
an enumeration of all the available options.

setOptions

public void setOptions(String[] options)
                throws Exception
Parses a given list of options.

Specified by:
setOptions in interface weka.core.OptionHandler
Overrides:
setOptions in class weka.classifiers.RandomizableClassifier
Parameters:
options - the list of options as an array of strings
Throws:
Exception - if an option is not supported

getOptions

public String[] getOptions()
Gets the current settings of the Classifier.

Specified by:
getOptions in interface weka.core.OptionHandler
Overrides:
getOptions in class weka.classifiers.RandomizableClassifier
Returns:
an array of strings suitable for passing to setOptions

getTrials

public int getTrials()

setTrials

public void setTrials(int n)

trialsTipText

public String trialsTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

getRidge

public double getRidge()

setRidge

public void setRidge(double c)

ridgeTipText

public String ridgeTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

setNumIterations

public void setNumIterations(int numIterations)
Sets the number of iterations.


getNumIterations

public int getNumIterations()
Gets the number of iterations.

Returns:
the maximum number of iterations

numIterationsTipText

public String numIterationsTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

getMax

public int getMax()

setMax

public void setMax(int n)

maxTipText

public String maxTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

getCapabilities

public weka.core.Capabilities getCapabilities()
Returns default capabilities of the classifier.

Specified by:
getCapabilities in interface weka.classifiers.Classifier
Specified by:
getCapabilities in interface weka.core.CapabilitiesHandler
Overrides:
getCapabilities in class weka.classifiers.AbstractClassifier
Returns:
the capabilities of this classifier

buildClassifier

public void buildClassifier(weka.core.Instances data)
                     throws Exception
Specified by:
buildClassifier in interface weka.classifiers.Classifier
Parameters:
data - the training data to be used for generating the
Throws:
Exception - if the classifier could not be built successfully

getComparators

public Comparator<weka.core.Instance>[] getComparators(int k)

classifyInstance

public double classifyInstance(weka.core.Instance instance)
                        throws Exception
Calculates the class membership probabilities for the given test instance.

Specified by:
classifyInstance in interface weka.classifiers.Classifier
Overrides:
classifyInstance in class weka.classifiers.AbstractClassifier
Parameters:
instance - the instance to be classified
Returns:
preedicted class probability distribution
Throws:
Exception - if distribution can't be computed successfully

toStringOLD

public String toStringOLD()
Returns description of the bagged classifier.

Returns:
description of the bagged classifier as a string

toString

public String toString()
Overrides:
toString in class Object

getRevision

public String getRevision()
Specified by:
getRevision in interface weka.core.RevisionHandler
Overrides:
getRevision in class weka.classifiers.AbstractClassifier

main

public static void main(String[] argv)
Main method for testing this class.

Parameters:
argv - the options


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.