com.huguesjohnson.jail.jdt
Class JdtApp

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.huguesjohnson.jail.jdt.JdtApp
All Implemented Interfaces:
java.lang.Runnable

public class JdtApp
extends java.lang.Thread

class JdtApp


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
JdtApp(java.lang.String namesFile, java.lang.String trainingFile, java.lang.String testFile, java.lang.String logFile, java.lang.String reportFile)
          constructor
 
Method Summary
 void done()
          override this
 void error(java.lang.Exception x)
          override this
 double getPercentCorrectInitialTreePrune()
          returns the percect of correct classifications made on the initial tree for the pruning data set
 double getPercentCorrectInitialTreeTest()
          returns the percect of correct classifications made on the initial tree for the test data set
 double getPercentCorrectInitialTreeTrain()
          returns the percect of correct classifications made on the initial tree for the training data set
 double getPercentCorrectPrunedTreePrune()
          returns the percect of correct classifications made on the pruned tree for the pruning data set
 double getPercentCorrectPrunedTreeTest()
          returns the percect of correct classifications made on the pruned tree for the test data set
 double getPercentCorrectPrunedTreeTrain()
          returns the percect of correct classifications made on the pruned tree for the training data set
 void loadInitialTree(java.lang.String fileName)
          deserialize the initial tree
 void loadPrunedTree(java.lang.String fileName)
          deserialize the pruned tree
 void run()
          starts decision tree learn
 void saveInitialTree(java.lang.String fileName)
          serialize the initial tree
 void savePrunedTree(java.lang.String fileName)
          serialize the pruned tree
 java.lang.String toString()
          returns a string representation of the object
 void updateStatus(java.lang.String message)
          override this
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JdtApp

public JdtApp(java.lang.String namesFile,
              java.lang.String trainingFile,
              java.lang.String testFile,
              java.lang.String logFile,
              java.lang.String reportFile)
constructor
Parameters:
namesFile - path to names file
trainingFile - path to training file
testFile - path to test file
logFile - path to log file
reportFile - path to report file
Method Detail

run

public void run()
starts decision tree learn
Overrides:
run in class java.lang.Thread

getPercentCorrectInitialTreeTest

public double getPercentCorrectInitialTreeTest()
returns the percect of correct classifications made on the initial tree for the test data set
Returns:
percect of correct classifications made on the initial tree for the test data set

getPercentCorrectPrunedTreeTest

public double getPercentCorrectPrunedTreeTest()
returns the percect of correct classifications made on the pruned tree for the test data set
Returns:
percect of correct classifications made on the pruned tree for the test data set

getPercentCorrectInitialTreePrune

public double getPercentCorrectInitialTreePrune()
returns the percect of correct classifications made on the initial tree for the pruning data set
Returns:
percect of correct classifications made on the initial tree for the pruning data set

getPercentCorrectPrunedTreePrune

public double getPercentCorrectPrunedTreePrune()
returns the percect of correct classifications made on the pruned tree for the pruning data set
Returns:
percect of correct classifications made on the pruned tree for the pruning data set

getPercentCorrectInitialTreeTrain

public double getPercentCorrectInitialTreeTrain()
returns the percect of correct classifications made on the initial tree for the training data set
Returns:
percect of correct classifications made on the initial tree for the training data set

getPercentCorrectPrunedTreeTrain

public double getPercentCorrectPrunedTreeTrain()
returns the percect of correct classifications made on the pruned tree for the training data set
Returns:
percect of correct classifications made on the pruned tree for the training data set

updateStatus

public void updateStatus(java.lang.String message)
override this
Parameters:
message - the message to display

done

public void done()
override this

error

public void error(java.lang.Exception x)
override this
Parameters:
x - the error that occured

saveInitialTree

public void saveInitialTree(java.lang.String fileName)
serialize the initial tree
Parameters:
fileName - the file to save the tree to

savePrunedTree

public void savePrunedTree(java.lang.String fileName)
serialize the pruned tree
Parameters:
fileName - the file to save the tree to

loadInitialTree

public void loadInitialTree(java.lang.String fileName)
deserialize the initial tree
Parameters:
fileName - the file to read the tree from

loadPrunedTree

public void loadPrunedTree(java.lang.String fileName)
deserialize the pruned tree
Parameters:
fileName - the file to read the tree from

toString

public java.lang.String toString()
returns a string representation of the object
Overrides:
toString in class java.lang.Thread
Returns:
string representation of the object