dice.tree.model
Class RegressionModel

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

public class RegressionModel
extends java.lang.Object

The Random Decision Trees Model for regression prediction. The usage can of it can be found in dice.examples package.

Version:
0.000
Author:
Xiatian Zhang

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
RegressionModel()
           
 
Method Summary
 void clear()
           
 double 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  double getChildrenValue(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

RegressionModel

public RegressionModel()
Method Detail

init

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

clear

public void clear()

estimate

public double 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:

getChildrenValue

protected double getChildrenValue(Node node)
Get the distribution of an inner node.

Parameters:
node -
Returns: