|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjncc20.Jncc.ResultsReporter
private static class Jncc.ResultsReporter
Helper class for jncc, which accomplishes the following tasks: reads the temporary file where NBC and NCC predictions are stored; computes performances indexes; produces the output file, which reports both the discretization log (i.e., whether some numerical feats have been discretized into a single bin) and the classifiers results.
Field Summary | |
---|---|
private java.util.ArrayList<java.lang.String> |
classNames
Names of the output class. |
private int[] |
discretizationLog
How many times each feature has been discretized in a single bin, over the different training/testing experiments. |
private java.util.ArrayList<java.lang.String> |
featureNames
Names of input features |
private java.lang.String |
indicatorsFile
Temporary file, where the performance indicators are saved fold-by-fold |
private int[][] |
nbcConfusionMatrix
NBCconfusionMatrix, as parsed from the prediction file |
private int[][] |
nccConfusionMatrix
NCCconfusionMatrix, as parsed from the prediction file |
private int |
numCVRuns
|
private int |
numFolds
|
private int |
numRuns
how many training/testing experiments (1 for testing, num runs*num folds for CV) the predictions saved to file reg |
private java.lang.String |
predictionsFile
Where to look for predictions saved to file |
private java.lang.String |
resultsFile
|
private java.lang.String |
workingPath
|
Constructor Summary | |
---|---|
Jncc.ResultsReporter(int[] SuppliedDiscretizationLog,
java.lang.String suppliedResultsFile,
java.util.ArrayList<java.lang.String> suppliedFeatureNames,
java.util.ArrayList<java.lang.String> suppliedClassNames,
java.lang.String suppliedPredictionsFile,
java.lang.String suppliedWorkingPath,
int suppliedNumFolds,
int suppliedNumCVRuns)
Constructor |
Method Summary | |
---|---|
(package private) void |
analyzePredictionsFileNbcNcc()
Computes statistics accuracy of NBC and NCC, by analyzing the predictions saved on a temporary file; then, saves the file the computed indicators and deletes the temporary file. |
(package private) void |
writeDiscretizationLog(int totalExp)
Writes to the output file how many times the different variables have been discretized into a single bin, out of the total number of performed experiments. |
(package private) void |
writeStatsToFile()
Parses the (temporary) file where the performance indicator have been stored fold by fold, and outputs to file the report. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<java.lang.String> classNames
private int[] discretizationLog
private java.util.ArrayList<java.lang.String> featureNames
private java.lang.String indicatorsFile
private int[][] nbcConfusionMatrix
private int[][] nccConfusionMatrix
private int numCVRuns
private int numFolds
private int numRuns
private java.lang.String predictionsFile
private java.lang.String resultsFile
private java.lang.String workingPath
Constructor Detail |
---|
Jncc.ResultsReporter(int[] SuppliedDiscretizationLog, java.lang.String suppliedResultsFile, java.util.ArrayList<java.lang.String> suppliedFeatureNames, java.util.ArrayList<java.lang.String> suppliedClassNames, java.lang.String suppliedPredictionsFile, java.lang.String suppliedWorkingPath, int suppliedNumFolds, int suppliedNumCVRuns)
Method Detail |
---|
void analyzePredictionsFileNbcNcc()
FoldNumber | FEATURES(m columns) | Actual Class (1 col) | NBC prediction (1 col) | NCC prediction (nc cols)
where m is the number of features of the data set, and nc is the number of classes. The function properly manages the fact that in different runs of CV the number of features can be different, because of the discretization (i.e., in some runs, some features might be discretized into a unique bin).
void writeDiscretizationLog(int totalExp)
void writeStatsToFile()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |