dice.tree.model
Class CBRRDTModel

java.lang.Object
  extended by dice.tree.model.CBRRDTModel

public class CBRRDTModel
extends java.lang.Object

The Random Decision Trees Model for multi-label classification prediction. CBRRDT is Calibrated Binary Relevance Random Decision Tree. In this model, it will predicate scores/probablities for each label, and the number of the positive labels for the given instance. The usage can of it can be found in dice.examples package.

Version:
0.000
Author:
Xiatian Zhang

Nested Class Summary
 class CBRRDTModel.Prediction
           
 
Field Summary
protected  int[] attrs
          The attribute type array.
protected  int clsSize
          The size of classes.
static double frac
          An parameter for claiming or reclaiming the space of the arrays may be used in Model
protected  int minS
          If the number of data instances in a leaf node is leass than minS, Model don't use that leaf node's class distribution to predict, while it will use the class distribution on the parent node to predict.
protected  java.util.Random rd
          Random number generator.
protected  Node[] trees
          The array stores the decision trees.
 
Constructor Summary
CBRRDTModel()
           
 
Method Summary
 void clear()
           
 CBRRDTModel.Prediction estimate(Instance inst)
          Predict the probabilities of classes of an instance.
protected  Node findLeaf(Node tree, Instance inst)
          Find the leaf node the given instance belong to.
protected  CBRRDTModel.Prediction getChildrenPrediction(Node node)
          Get the distribution of an inner node.
 void init(Node[] trees, int[] attrs, int clsSize, int minS)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frac

public static double frac
An parameter for claiming or reclaiming the space of the arrays may be used in Model


trees

protected Node[] trees
The array stores the decision trees.


minS

protected int minS
If the number of data instances in a leaf node is leass than minS, Model don't use that leaf node's class distribution to predict, while it will use the class distribution on the parent node to predict.


attrs

protected int[] attrs
The attribute type array.


clsSize

protected int clsSize
The size of classes.


rd

protected java.util.Random rd
Random number generator.

Constructor Detail

CBRRDTModel

public CBRRDTModel()
Method Detail

init

public void init(Node[] trees,
                 int[] attrs,
                 int clsSize,
                 int minS)

clear

public void clear()

estimate

public CBRRDTModel.Prediction estimate(Instance inst)
Predict the probabilities of classes of an instance.

Parameters:
inst -
Returns:

findLeaf

protected Node findLeaf(Node tree,
                        Instance inst)
Find the leaf node the given instance belong to.

Parameters:
tree -
inst -
Returns:

getChildrenPrediction

protected CBRRDTModel.Prediction getChildrenPrediction(Node node)
Get the distribution of an inner node.

Parameters:
node -
Returns: