|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.klimt.Klimt
public class Klimt
Main Klimt Trees class. Besides the main method it also contains methods for data root and tree handling.
Field Summary | |
---|---|
static java.lang.String |
lastTreeFileName
file name of the most recently loaded tree. |
static java.lang.String |
lastUsedDir
|
static java.lang.String |
Release
|
static java.lang.String |
Version
|
Constructor Summary | |
---|---|
Klimt()
|
Method Summary | |
---|---|
static void |
addData(DataRoot dr)
add a new data root |
static DataRoot |
addData(SVarSet vs)
create a new data root for the data set and return the corresponding root. if a root containing this dataset is already present, if will be returned without creating a new root. therefore it is safe to use this method for existing data sets. |
static java.util.Vector |
getData()
return vector of all data roots |
static SVar |
getPredictionVar(SNode t,
SVar cv,
SVarSet resolver)
|
static SVar |
getPredictionVar(SNode t,
SVar cv,
SVar rccv,
SVar nids)
construct prediction variable, RCC/residuals variabe and node-index variable |
static DataRoot |
getRootForData(SVarSet vs)
return corresponding DataRoot object to the specified dataset |
static DataRoot |
getRootForTreeRegistry(TreeRegistry tr)
return corresponding DataRoot object to the specified dataset |
static SNode |
loadTreeFile(java.io.File f,
DataRoot dr,
boolean createFrames)
|
static void |
main(java.lang.String[] argv)
Main InTrees method, entry for KLIMT as stand-alone application. |
static SNode |
makePrunedCopy(SNode t)
creates a pruned copy of a tree |
static SNode |
makePrunedCopy(SNode t,
boolean deepCopy,
SNode cutpoint,
boolean imTheRoot,
java.util.Vector cps,
java.lang.String newName)
|
static SVar |
manageMisclassVar(SNode t,
SVar smcv)
manages internal misclassification variable - that is creates new one if none exists or updates existing one |
static boolean |
manageResidualStats(SNode t,
int regCount,
SVar rs1,
SVar rs2)
|
static TreeCanvas |
newTreeDisplay(SNode t,
TFrame tf)
creates a new tree display with default geometry (0,0,800,500) |
static TreeCanvas |
newTreeDisplay(SNode t,
TFrame tf,
int x,
int y,
int w,
int h)
creates a new tree display |
static VarFrame |
newVarDisplay(DataRoot dr)
creates a new variables display with default geometry (0,0,140,200) |
static VarFrame |
newVarDisplay(DataRoot dr,
int x,
int y,
int w,
int h)
creates a new variables display |
static SNode |
openTreeFile(java.awt.Frame f,
java.lang.String fn,
DataRoot dr)
|
static SNode |
openTreeFile(java.awt.Frame f,
java.lang.String fn,
DataRoot dr,
boolean readOnlyDataset,
boolean createFrames)
loads a dataset and a tree from a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String Version
public static java.lang.String Release
public static java.lang.String lastTreeFileName
public static java.lang.String lastUsedDir
Constructor Detail |
---|
public Klimt()
Method Detail |
---|
public static java.util.Vector getData()
public static DataRoot getRootForData(SVarSet vs)
DataRoot
object to the specified dataset
vs
- dataset
null
if none was foundpublic static DataRoot getRootForTreeRegistry(TreeRegistry tr)
DataRoot
object to the specified dataset
vs
- dataset
null
if none was foundpublic static void addData(DataRoot dr)
dr
- data root to addpublic static DataRoot addData(SVarSet vs)
vs
- data set to add
public static TreeCanvas newTreeDisplay(SNode t, TFrame tf, int x, int y, int w, int h)
t
- root nodetf
- frame of the treex,y,w,h
- initial geometry of the canvas
public static TreeCanvas newTreeDisplay(SNode t, TFrame tf)
t
- root nodetf
- frame of the tree
public static VarFrame newVarDisplay(DataRoot dr, int x, int y, int w, int h)
vs
- the underlying datasetx,y,w,h
- initial geomery. Note: VarFrame itself modifies the height if necessary
public static VarFrame newVarDisplay(DataRoot dr)
vs
- the underlying dataset
public static SNode makePrunedCopy(SNode t)
t
- root of the source tree
public static SNode makePrunedCopy(SNode t, boolean deepCopy, SNode cutpoint, boolean imTheRoot, java.util.Vector cps, java.lang.String newName)
public static SNode openTreeFile(java.awt.Frame f, java.lang.String fn, DataRoot dr)
public static SNode openTreeFile(java.awt.Frame f, java.lang.String fn, DataRoot dr, boolean readOnlyDataset, boolean createFrames)
f
- frame to be used for FileDialog if necessaryfn
- filename of the source. If null
FileDialog
is used to let the user select the filetvs
- SVarSet
object to be used for storage of the dataset.readOnlyDataset
- if set to true
then tvs is not modified except for classifier
null
if no tree was present. This methods returns null
even if the dataset was loaded correcly and no tree was present. Total failure to process the file can be determined only by using clean dataset and check for size of the dataset after the call.public static SNode loadTreeFile(java.io.File f, DataRoot dr, boolean createFrames)
public static void main(java.lang.String[] argv)
argv
- Run-time parameters. The syntax is as follows:[--debug] source [source2 [source3 [...]]] source must contain a dataset and may contain a tree source2... must contain a tree only the --debug parameter switches debugging output on
public static SVar manageMisclassVar(SNode t, SVar smcv)
public static boolean manageResidualStats(SNode t, int regCount, SVar rs1, SVar rs2)
public static SVar getPredictionVar(SNode t, SVar cv, SVarSet resolver)
public static SVar getPredictionVar(SNode t, SVar cv, SVar rccv, SVar nids)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |