类 LMT

java.lang.Object
weka.classifiers.Classifier
weka.classifiers.trees.LMT
所有已实现的接口:
Serializable, Cloneable, AdditionalMeasureProducer, CapabilitiesHandler, Drawable, OptionHandler, RevisionHandler, TechnicalInformationHandler

Classifier for building 'logistic model trees', which are classification trees with logistic regression functions at the leaves. The algorithm can deal with binary and multi-class target variables, numeric and nominal attributes and missing values.

For more information see:

Niels Landwehr, Mark Hall, Eibe Frank (2005). Logistic Model Trees. Machine Learning. 95(1-2):161-205.

Marc Sumner, Eibe Frank, Mark Hall: Speeding up Logistic Model Tree Induction. In: 9th European Conference on Principles and Practice of Knowledge Discovery in Databases, 675-683, 2005.

BibTeX:

 @article{Landwehr2005,
    author = {Niels Landwehr and Mark Hall and Eibe Frank},
    journal = {Machine Learning},
    number = {1-2},
    pages = {161-205},
    title = {Logistic Model Trees},
    volume = {95},
    year = {2005}
 }
 
 @inproceedings{Sumner2005,
    author = {Marc Sumner and Eibe Frank and Mark Hall},
    booktitle = {9th European Conference on Principles and Practice of Knowledge Discovery in Databases},
    pages = {675-683},
    publisher = {Springer},
    title = {Speeding up Logistic Model Tree Induction},
    year = {2005}
 }
 

Valid options are:

 -B
  Binary splits (convert nominal attributes to binary ones)
 -R
  Split on residuals instead of class values
 -C
  Use cross-validation for boosting at all nodes (i.e., disable heuristic)
 -P
  Use error on probabilities instead of misclassification error for stopping criterion of LogitBoost.
 -I <numIterations>
  Set fixed number of iterations for LogitBoost (instead of using cross-validation)
 -M <numInstances>
  Set minimum number of instances at which a node can be split (default 15)
 -W <beta>
  Set beta for weight trimming for LogitBoost. Set to 0 (default) for no weight trimming.
 -A
  The AIC is used to choose the best iteration.
版本:
$Revision: 5535 $
作者:
Niels Landwehr, Marc Sumner
另请参阅:
  • 构造器详细资料

    • LMT

      public LMT()
      Creates an instance of LMT with standard options
  • 方法详细资料

    • getCapabilities

      public Capabilities getCapabilities()
      Returns default capabilities of the classifier.
      指定者:
      getCapabilities 在接口中 CapabilitiesHandler
      覆盖:
      getCapabilities 在类中 Classifier
      返回:
      the capabilities of this classifier
      另请参阅:
    • buildClassifier

      public void buildClassifier(Instances data) throws Exception
      Builds the classifier.
      指定者:
      buildClassifier 在类中 Classifier
      参数:
      data - the data to train with
      抛出:
      Exception - if classifier can't be built successfully
    • distributionForInstance

      public double[] distributionForInstance(Instance instance) throws Exception
      Returns class probabilities for an instance.
      覆盖:
      distributionForInstance 在类中 Classifier
      参数:
      instance - the instance to compute the distribution for
      返回:
      the class probabilities
      抛出:
      Exception - if distribution can't be computed successfully
    • classifyInstance

      public double classifyInstance(Instance instance) throws Exception
      Classifies an instance.
      覆盖:
      classifyInstance 在类中 Classifier
      参数:
      instance - the instance to classify
      返回:
      the classification
      抛出:
      Exception - if instance can't be classified successfully
    • toString

      public String toString()
      Returns a description of the classifier.
      覆盖:
      toString 在类中 Object
      返回:
      a string representation of the classifier
    • listOptions

      public Enumeration listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      覆盖:
      listOptions 在类中 Classifier
      返回:
      an enumeration of all the available options.
    • setOptions

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

      Valid options are:

       -B
        Binary splits (convert nominal attributes to binary ones)
       -R
        Split on residuals instead of class values
       -C
        Use cross-validation for boosting at all nodes (i.e., disable heuristic)
       -P
        Use error on probabilities instead of misclassification error for stopping criterion of LogitBoost.
       -I <numIterations>
        Set fixed number of iterations for LogitBoost (instead of using cross-validation)
       -M <numInstances>
        Set minimum number of instances at which a node can be split (default 15)
       -W <beta>
        Set beta for weight trimming for LogitBoost. Set to 0 (default) for no weight trimming.
       -A
        The AIC is used to choose the best iteration.
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 Classifier
      参数:
      options - the list of options as an array of strings
      抛出:
      Exception - if an option is not supported
    • getOptions

      public String[] getOptions()
      Gets the current settings of the Classifier.
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 Classifier
      返回:
      an array of strings suitable for passing to setOptions
    • getWeightTrimBeta

      public double getWeightTrimBeta()
      Get the value of weightTrimBeta.
    • getUseAIC

      public boolean getUseAIC()
      Get the value of useAIC.
      返回:
      Value of useAIC.
    • setWeightTrimBeta

      public void setWeightTrimBeta(double n)
      Set the value of weightTrimBeta.
    • setUseAIC

      public void setUseAIC(boolean c)
      Set the value of useAIC.
      参数:
      c - Value to assign to useAIC.
    • getConvertNominal

      public boolean getConvertNominal()
      Get the value of convertNominal.
      返回:
      Value of convertNominal.
    • getSplitOnResiduals

      public boolean getSplitOnResiduals()
      Get the value of splitOnResiduals.
      返回:
      Value of splitOnResiduals.
    • getFastRegression

      public boolean getFastRegression()
      Get the value of fastRegression.
      返回:
      Value of fastRegression.
    • getErrorOnProbabilities

      public boolean getErrorOnProbabilities()
      Get the value of errorOnProbabilities.
      返回:
      Value of errorOnProbabilities.
    • getNumBoostingIterations

      public int getNumBoostingIterations()
      Get the value of numBoostingIterations.
      返回:
      Value of numBoostingIterations.
    • getMinNumInstances

      public int getMinNumInstances()
      Get the value of minNumInstances.
      返回:
      Value of minNumInstances.
    • setConvertNominal

      public void setConvertNominal(boolean c)
      Set the value of convertNominal.
      参数:
      c - Value to assign to convertNominal.
    • setSplitOnResiduals

      public void setSplitOnResiduals(boolean c)
      Set the value of splitOnResiduals.
      参数:
      c - Value to assign to splitOnResiduals.
    • setFastRegression

      public void setFastRegression(boolean c)
      Set the value of fastRegression.
      参数:
      c - Value to assign to fastRegression.
    • setErrorOnProbabilities

      public void setErrorOnProbabilities(boolean c)
      Set the value of errorOnProbabilities.
      参数:
      c - Value to assign to errorOnProbabilities.
    • setNumBoostingIterations

      public void setNumBoostingIterations(int c)
      Set the value of numBoostingIterations.
      参数:
      c - Value to assign to numBoostingIterations.
    • setMinNumInstances

      public void setMinNumInstances(int c)
      Set the value of minNumInstances.
      参数:
      c - Value to assign to minNumInstances.
    • graphType

      public int graphType()
      Returns the type of graph this classifier represents.
      指定者:
      graphType 在接口中 Drawable
      返回:
      Drawable.TREE
    • graph

      public String graph() throws Exception
      Returns graph describing the tree.
      指定者:
      graph 在接口中 Drawable
      返回:
      the graph describing the tree
      抛出:
      Exception - if graph can't be computed
    • measureTreeSize

      public int measureTreeSize()
      Returns the size of the tree
      返回:
      the size of the tree
    • measureNumLeaves

      public int measureNumLeaves()
      Returns the number of leaves in the tree
      返回:
      the number of leaves in the tree
    • enumerateMeasures

      public Enumeration enumerateMeasures()
      Returns an enumeration of the additional measure names
      指定者:
      enumerateMeasures 在接口中 AdditionalMeasureProducer
      返回:
      an enumeration of the measure names
    • getMeasure

      public double getMeasure(String additionalMeasureName)
      Returns the value of the named measure
      指定者:
      getMeasure 在接口中 AdditionalMeasureProducer
      参数:
      additionalMeasureName - the name of the measure to query for its value
      返回:
      the value of the named measure
      抛出:
      IllegalArgumentException - if the named measure is not supported
    • globalInfo

      public String globalInfo()
      Returns a string describing classifier
      返回:
      a description suitable for displaying in the explorer/experimenter gui
    • getTechnicalInformation

      public TechnicalInformation getTechnicalInformation()
      Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
      指定者:
      getTechnicalInformation 在接口中 TechnicalInformationHandler
      返回:
      the technical information about this class
    • convertNominalTipText

      public String convertNominalTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • splitOnResidualsTipText

      public String splitOnResidualsTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • fastRegressionTipText

      public String fastRegressionTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • errorOnProbabilitiesTipText

      public String errorOnProbabilitiesTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • numBoostingIterationsTipText

      public String numBoostingIterationsTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • minNumInstancesTipText

      public String minNumInstancesTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • weightTrimBetaTipText

      public String weightTrimBetaTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • useAICTipText

      public String useAICTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 Classifier
      返回:
      the revision
    • main

      public static void main(String[] argv)
      Main method for testing this class
      参数:
      argv - the commandline options