|
jBNC Toolbox | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjbnc.Classifier
jbnc.CrossVal
Cross validation classifier tester. Assumes that cross validation files are already generated an attempts to read them using given file stem. The file name format is: "stem-repetition-fold". For instance for stem "monk" the file names could be "monk-0-0.*", "monk-0-1.*", etc.
USAGE: CrossVal {options} where: -a {algor_name} Algorithm choices: "naive", "TAN", "FAN", "STAN", "STAND". -c {class_name} Name of the class variable. The default value is 'class'. -d Print debugging information. -f {file_stem} Load test data in C4.5 format (.names + .test), file_stem-?-?.names - file with specification of attributes, file_stem-?-?.data - file with train cases. file_stem-?-?.test - file with test cases. -n {file_name} Save constructed naive-Bayes networks to file_name-?-?.bif. File is saved in BIF 0.15 format. -q {q_measure} Select quality mesure. This relevant for the inducers that perform selection of network candidates, like FAN or STAN. Diffrent measure have drasticaly diffrent computational complexity. Quality measures choices: LC - local criterion: log p(c_l|D) [local] SB - standard Bayesian measure with penalty for size [global]. HGS - Heckerman-Geiger-Chickering measure [global]. LOO - leave-one-out cross validation [local]. CV10 - ten fold cross validation.[local]. CV1010 - ten fold cross validation averaged ten times [local]. -s Number of smoothing priors to test. Has to be an integer greater or equal zero. -t Print execution time. EXAMPLE: CrossVal -a TAN -tf monk1 EXAMPLE: CrossVal -dta FAN -q LOO -f monk1
Field Summary |
Fields inherited from class jbnc.Classifier |
algorithmName, className, classNameDefault, databaseURL, debugMode, fileNameStem, measureName, namesFileName, nbAlphas, netFileName, tableName, testFileName, trainFileName, usageMsg, useTimer |
Constructor Summary | |
CrossVal()
|
Method Summary | |
protected DatasetInt |
loadDataset(java.lang.String namesFile,
java.lang.String dataFile)
Dataset loading wrapper. |
static void |
main(java.lang.String[] args)
Main function. |
protected void |
run()
Create and test a classifier. |
protected void |
run(java.lang.String[] args)
|
protected BNCTester.Result |
test(BayesianNetworks.BayesNet net,
DatasetInt testSet,
boolean report)
Bayesian network classifier testing wrapper. |
protected BayesianNetworks.BayesNet |
train(BayesianInducer inducer,
FrequencyCalc fc,
boolean usePriors,
double alphaK)
Bayesian network classifier training wrapper. |
Methods inherited from class jbnc.Classifier |
processCommandLine, setUsageMsg |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CrossVal()
Method Detail |
protected void run(java.lang.String[] args)
run
in class Classifier
public static void main(java.lang.String[] args)
args
- The command line argumentsprotected BayesianNetworks.BayesNet train(BayesianInducer inducer, FrequencyCalc fc, boolean usePriors, double alphaK) throws java.lang.Exception
inducer
- algorithm used for classifier learning.fc
- Description of ParameterusePriors
- Description of ParameteralphaK
- Description of Parameter
java.lang.Exception
- Description of Exceptionprotected BNCTester.Result test(BayesianNetworks.BayesNet net, DatasetInt testSet, boolean report) throws java.lang.Exception
net
- Bayesian network classifier.testSet
- test data.report
- wether to report results on the screen.
java.lang.Exception
- Description of Exceptionprotected void run()
Classifier
run
in class Classifier
protected DatasetInt loadDataset(java.lang.String namesFile, java.lang.String dataFile) throws java.lang.Exception
loadDataset
in class Classifier
namesFile
- Description of ParameterdataFile
- Description of Parameter
java.lang.Exception
- Description of Exception
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |