All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.j48.ClassifierSplitModel

java.lang.Object
   |
   +----weka.classifiers.j48.ClassifierSplitModel

public abstract class ClassifierSplitModel
extends Object
implements Cloneable, Serializable
Abstract class for classification models that can be used recursively to split the data.

Version:
$Revision: 1.3 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)

Constructor Index

 o ClassifierSplitModel()

Method Index

 o buildClassifier(Instances)
Builds the classifier split model for the given set of instances.
 o checkModel()
Checks if generated model is valid.
 o classifyInstance(Instance)
Classifies a given instance.
 o classProb(int, Instance)
Gets class probability for instance.
 o clone()
Allows to clone a model (shallow copy).
 o codingCost()
Returns coding costs of model.
 o distribution()
Returns the distribution of class values induced by the model.
 o dumpLabel(int, Instances)
Prints label for subset index of instances (eg class).
 o dumpModel(Instances)
Prints the split model.
 o leftSide(Instances)
Prints left side of condition satisfied by instances.
 o numSubsets()
Returns the number of created subsets for the split.
 o rightSide(int, Instances)
Prints left side of condition satisfied by instances in subset index.
 o setDistribution(Distribution)
Sets distribution associated with model.
 o sourceClass(int, Instances)
 o sourceExpression(int, Instances)
 o split(Instances)
Splits the given set of instances into subsets.
 o weights(Instance)
Returns weights if instance is assigned to more than one subset.
 o whichSubset(Instance)
Returns index of subset instance is assigned to.

Constructors

 o ClassifierSplitModel
 public ClassifierSplitModel()

Methods

 o clone
 public Object clone()
Allows to clone a model (shallow copy).

Overrides:
clone in class Object
 o buildClassifier
 public abstract void buildClassifier(Instances instances) throws Exception
Builds the classifier split model for the given set of instances.

Throws: Exception
if something goes wrong
 o checkModel
 public final boolean checkModel()
Checks if generated model is valid.

 o classifyInstance
 public final double classifyInstance(Instance instance) throws Exception
Classifies a given instance.

Throws: Exception
if something goes wrong
 o classProb
 public double classProb(int classIndex,
                         Instance instance) throws Exception
Gets class probability for instance.

Throws: Exception
if something goes wrong
 o codingCost
 public double codingCost()
Returns coding costs of model. Returns 0 if not overwritten.

 o distribution
 public final Distribution distribution()
Returns the distribution of class values induced by the model.

 o leftSide
 public abstract String leftSide(Instances data)
Prints left side of condition satisfied by instances.

Parameters:
data - the data.
 o rightSide
 public abstract String rightSide(int index,
                                  Instances data)
Prints left side of condition satisfied by instances in subset index.

 o dumpLabel
 public final String dumpLabel(int index,
                               Instances data) throws Exception
Prints label for subset index of instances (eg class).

Throws: Exception
if something goes wrong
 o sourceClass
 public final String sourceClass(int index,
                                 Instances data) throws Exception
 o sourceExpression
 public abstract String sourceExpression(int index,
                                         Instances data)
 o dumpModel
 public final String dumpModel(Instances data) throws Exception
Prints the split model.

Throws: Exception
if something goes wrong
 o numSubsets
 public final int numSubsets()
Returns the number of created subsets for the split.

 o setDistribution
 public final void setDistribution(Distribution distribution)
Sets distribution associated with model.

 o split
 public final Instances[] split(Instances data) throws Exception
Splits the given set of instances into subsets.

Throws: Exception
if something goes wrong
 o weights
 public abstract double[] weights(Instance instance)
Returns weights if instance is assigned to more than one subset. Returns null if instance is only assigned to one subset.

 o whichSubset
 public abstract int whichSubset(Instance instance) throws Exception
Returns index of subset instance is assigned to. Returns -1 if instance is assigned to more than one subset.

Throws: Exception
if something goes wrong

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home