|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.util.Node org.rosuda.klimt.SNode
public class SNode
Statistical Node
class. It's used for storing statistical information in tree nodes.
Field Summary | |
---|---|
int |
Cases
# of cases |
java.lang.String |
Cond
splitting condition as string |
int |
cx
position of the node and its geometry (replaces former x,y,x2,y2) |
int |
cy
position of the node and its geometry (replaces former x,y,x2,y2) |
int[] |
data
list of indices of the data used in this node |
double |
devGain
deviation gain by this split |
double |
F1
deviation (or Gini-index) of this node |
int |
height
position of the node and its geometry (replaces former x,y,x2,y2) |
int |
id
id of the node |
java.awt.Rectangle |
labelR
label rectangle |
java.lang.String |
Name
name of tha class assigned to this node |
boolean |
overflowWarning
overflow warning - if true then the node is bigger than its display representation |
double |
predValD
predicted value (for regr. trees) |
double |
sampleDev
deviance in this node based on the sample |
double |
sampleDevGain
deviance gain based on the sample |
int |
sel
selector (0=not sel, 1=selected node, 2=leaf of sel. category, 3=non-leaf of selected category |
int |
splitComp
split compare type (-1/0/1) |
int |
splitIndex
index of the split variable |
java.lang.String |
splitVal
value of the split condition as string |
double |
splitValF
value of the split condition as string |
SVar |
splitVar
object of the splitting variable |
int |
tmp
user definable temporary variable |
boolean |
underflowWarning
underflow warning - if true then the node is displayed bigger than it should be |
java.util.Vector |
V
values (percentage of each class) |
int |
width
position of the node and its geometry (replaces former x,y,x2,y2) |
Fields inherited from class org.rosuda.util.Node |
---|
ch, level, par |
Constructor Summary | |
---|---|
SNode()
default constructor |
|
SNode(Node t)
constructs a new root node as the parent of a subtree |
Method Summary | |
---|---|
void |
calculateSampleDeviances()
calculates deviance and deviance gain based on the sample stored in data. note that this deviance may be different from the F1/devGain if the tree was based on another sample |
int |
getBinaryID()
returns the ID of this node in a binary tree (root=1) or -1 if the tree is not a binary tree |
java.lang.String |
getFormula()
|
RootInfo |
getRootInfo()
returns root information associated with this tree |
SVarSet |
getSource()
returns data source |
boolean |
isPruned()
gets pruned flag |
void |
passDownData(SNode ct)
pass data from node ct down to this node according to the conditions in this node |
void |
printTree(java.lang.String prefix)
print the tree on System.out (mainly for debugging purposes) |
void |
setAllTmp(int v)
sets temporary custom variable of the entire subtree to v |
void |
setFormula(java.lang.String form)
|
void |
setPrune(boolean ps)
set prune flag for this node and all children |
void |
setSource(SVarSet src)
sets data source |
java.lang.String |
toString()
returns basic string representation of this node (suitable for debugging only) |
Methods inherited from class org.rosuda.util.Node |
---|
add, at, children, count, getAllNodes, getChildren, getHeight, getLevel, getNodesAtLevel, getNumNodes, getParent, getRoot, isLeaf, isRoot, prune, rebuildHeight, rebuildLevels, remove |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int[] data
public java.lang.String Cond
public int Cases
public double F1
public double devGain
public java.lang.String Name
public double predValD
public java.util.Vector V
public int id
public double sampleDev
public double sampleDevGain
public int cx
public int cy
public int width
public int height
public boolean underflowWarning
true
then the node is displayed bigger than it should be
public boolean overflowWarning
true
then the node is bigger than its display representation
public int sel
public int splitIndex
public SVar splitVar
public int splitComp
public java.lang.String splitVal
public double splitValF
public java.awt.Rectangle labelR
public int tmp
Constructor Detail |
---|
public SNode()
public SNode(Node t)
t
- subtreeMethod Detail |
---|
public void setSource(SVarSet src)
src
- data sourcepublic RootInfo getRootInfo()
public void setFormula(java.lang.String form)
public java.lang.String getFormula()
public SVarSet getSource()
public void setPrune(boolean ps)
ps
- prune state to be setpublic boolean isPruned()
public void printTree(java.lang.String prefix)
prefix
- text to be printed before each line of outputpublic void setAllTmp(int v)
public void calculateSampleDeviances()
public int getBinaryID()
public void passDownData(SNode ct)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |