jBNC Toolbox

jbnc.util
Class BNCTester

java.lang.Object
  extended byjbnc.util.BNCTester

public class BNCTester
extends java.lang.Object

Description of the Class

Since:
Author:
Jarek Sacha

Nested Class Summary
 class BNCTester.Result
           
 
Field Summary
protected  InferenceGraphs.InferenceGraphNode[] attribNodes
           
protected  java.lang.String className
           
protected static java.lang.String classNameDefault
           
protected  InferenceGraphs.InferenceGraphNode classNode
           
protected  java.lang.String dataFileName
           
protected  Dataset dataset
           
protected  boolean debugMode
           
protected  InferenceGraphs.InferenceGraph graph
           
protected  java.lang.String namesFileName
           
protected  int nbFail
           
protected  int nbPass
           
protected  java.lang.String netFileName
           
protected  boolean useTimer
           
 
Constructor Summary
BNCTester()
           
 
Method Summary
protected  void clear()
           
protected  void loadDataset()
           
protected  void loadNetwork()
           
static void main(java.lang.String[] argv)
           
protected  void printClassificationReport()
           
protected  boolean processCommandLine(java.lang.String[] argv)
          Process command line arguments.
 void report()
          Print test results to the standard output.
 void reportShort()
          Print test results to the standard output in the short form (single line).
protected  void run()
           
 void setDebugMode(boolean mode)
          Sets the DebugMode attribute of the BNCTester object
 BNCTester.Result test_old(BayesianNetworks.BayesNet net, Dataset dataset)
           
 BNCTester.Result test_old(InferenceGraphs.InferenceGraph graph, Dataset dataset)
           
 BNCTester.Result test(BayesianNetworks.BayesNet net, Dataset dataset)
           
protected  void testClassifier_old()
           
protected  void testClassifier(BayesianNetworks.BayesNet net)
           
protected  void verifyDatasetVsNetwork()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classNameDefault

protected static final java.lang.String classNameDefault
See Also:
Constant Field Values

useTimer

protected boolean useTimer

debugMode

protected boolean debugMode

dataFileName

protected java.lang.String dataFileName

namesFileName

protected java.lang.String namesFileName

netFileName

protected java.lang.String netFileName

className

protected java.lang.String className

dataset

protected Dataset dataset

graph

protected InferenceGraphs.InferenceGraph graph

attribNodes

protected InferenceGraphs.InferenceGraphNode[] attribNodes

classNode

protected InferenceGraphs.InferenceGraphNode classNode

nbPass

protected int nbPass

nbFail

protected int nbFail
Constructor Detail

BNCTester

public BNCTester()
Method Detail

main

public static void main(java.lang.String[] argv)
Parameters:
argv - Description of Parameter

setDebugMode

public void setDebugMode(boolean mode)
Sets the DebugMode attribute of the BNCTester object

Parameters:
mode - The new DebugMode value

test

public BNCTester.Result test(BayesianNetworks.BayesNet net,
                             Dataset dataset)
                      throws java.lang.Exception
Parameters:
net - Description of Parameter
dataset - Description of Parameter
Returns:
Confusion matrix.
Throws:
java.lang.Exception - Description of Exception

test_old

public BNCTester.Result test_old(BayesianNetworks.BayesNet net,
                                 Dataset dataset)
                          throws java.lang.Exception
Parameters:
net - Description of Parameter
dataset - Description of Parameter
Returns:
Confusion matrix.
Throws:
java.lang.Exception - Description of Exception

test_old

public BNCTester.Result test_old(InferenceGraphs.InferenceGraph graph,
                                 Dataset dataset)
                          throws java.lang.Exception
Parameters:
graph - Description of Parameter
dataset - Description of Parameter
Returns:
Confusion matrix.
Throws:
java.lang.Exception - Description of Exception

report

public void report()
Print test results to the standard output.


reportShort

public void reportShort()
                 throws java.lang.Exception
Print test results to the standard output in the short form (single line).

Throws:
java.lang.Exception - Description of Exception

processCommandLine

protected boolean processCommandLine(java.lang.String[] argv)
Process command line arguments.

Parameters:
argv - Description of Parameter
Returns:
'false' when command line is invalid.

run

protected void run()

loadNetwork

protected void loadNetwork()
                    throws java.lang.Exception
Throws:
java.lang.Exception

loadDataset

protected void loadDataset()
                    throws java.lang.Exception
Throws:
java.lang.Exception

verifyDatasetVsNetwork

protected void verifyDatasetVsNetwork()
                               throws java.lang.Exception
Throws:
java.lang.Exception

testClassifier

protected void testClassifier(BayesianNetworks.BayesNet net)
                       throws java.lang.Exception
Parameters:
net - Description of Parameter
Throws:
java.lang.Exception - Description of Exception

testClassifier_old

protected void testClassifier_old()
                           throws java.lang.Exception
Throws:
java.lang.Exception

printClassificationReport

protected void printClassificationReport()

clear

protected void clear()

SourceForge.net Logo