net.sf.myra.datamining
Class Main

java.lang.Object
  extended by net.sf.myra.datamining.Main

public class Main
extends java.lang.Object

Default executable class to classification algorithms.

Version:
$Revision$ $Date:: $
Author:
Fernando Esteban Barril Otero

Field Summary
static java.lang.String BULK_SIZE
          The property key under which the bulk value is stored.
static java.lang.String CLASSIFIER
          The property key under which the classifier class name is stored.
static java.lang.String CROSS_VALIDATION_FOLDS
          The property key under which the cross validation folds value is stored.
static java.lang.String EXPORTER
          The property key under which the exporter implementation class name is stored.
static java.lang.String EXPORTER_FILE
          The property key under which the exporter output file name is stored.
static java.lang.String FOLD_PREFIX
          Default test file name prefix.
static java.lang.String MEASURE
          The property key under which the measure implementation class name is stored.
static java.lang.String TR_PREFIX
          Default training file name prefix.
static java.lang.String TS_PREFIX
          Default test file name prefix.
 
Constructor Summary
Main()
           
 
Method Summary
protected  void append(java.lang.StringBuffer output, java.util.Properties options)
          Appends the specified options to the output buffer.
 Classifier getClassifier()
          Returns the classifier instance to be used.
 Measure getMeasure()
          Returns the measure instance to be used.
 java.util.Properties getOptions(java.lang.String file)
          Returns the classifier options.
static void main(java.lang.String[] args)
          Program entry point.
protected  void print(Dataset dataset)
          Prints the dataset information.
protected  void print(java.lang.String s)
          Prints the specified string to the default output stream.
 void run(java.lang.String[] args)
          Executes a classification algorithm.
protected  void runBatch(java.lang.String pattern, java.lang.String directory)
           
protected  void runCrossValidation(Dataset dataset)
           
protected  void runTest(Dataset trainingSet, Dataset testSet)
           
protected  void runTrain(Dataset dataset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CROSS_VALIDATION_FOLDS

public static final java.lang.String CROSS_VALIDATION_FOLDS
The property key under which the cross validation folds value is stored.

See Also:
Constant Field Values

BULK_SIZE

public static final java.lang.String BULK_SIZE
The property key under which the bulk value is stored.

See Also:
Constant Field Values

CLASSIFIER

public static final java.lang.String CLASSIFIER
The property key under which the classifier class name is stored.

See Also:
Constant Field Values

MEASURE

public static final java.lang.String MEASURE
The property key under which the measure implementation class name is stored.

See Also:
Constant Field Values

EXPORTER

public static final java.lang.String EXPORTER
The property key under which the exporter implementation class name is stored.

See Also:
Constant Field Values

EXPORTER_FILE

public static final java.lang.String EXPORTER_FILE
The property key under which the exporter output file name is stored.

See Also:
Constant Field Values

TR_PREFIX

public static final java.lang.String TR_PREFIX
Default training file name prefix.

See Also:
Constant Field Values

TS_PREFIX

public static final java.lang.String TS_PREFIX
Default test file name prefix.

See Also:
Constant Field Values

FOLD_PREFIX

public static final java.lang.String FOLD_PREFIX
Default test file name prefix.

See Also:
Constant Field Values
Constructor Detail

Main

public Main()
Method Detail

getClassifier

public Classifier getClassifier()
Returns the classifier instance to be used.

Returns:
the classifier instance to be used.

getMeasure

public Measure getMeasure()
Returns the measure instance to be used.

Returns:
the measure instance to be used.

getOptions

public java.util.Properties getOptions(java.lang.String file)
Returns the classifier options.

Returns:
the classifier options.

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Program entry point.

Parameters:
args - an array of command line arguments.
Throws:
java.io.IOException

run

public void run(java.lang.String[] args)
         throws java.io.IOException
Executes a classification algorithm.

Parameters:
args - an array of command line arguments.
Throws:
java.io.IOException

runTest

protected void runTest(Dataset trainingSet,
                       Dataset testSet)

runTrain

protected void runTrain(Dataset dataset)

runCrossValidation

protected void runCrossValidation(Dataset dataset)

runBatch

protected void runBatch(java.lang.String pattern,
                        java.lang.String directory)
                 throws java.io.IOException
Throws:
java.io.IOException

print

protected void print(java.lang.String s)
Prints the specified string to the default output stream.

Parameters:
s - the string to be printed.

print

protected void print(Dataset dataset)
Prints the dataset information.

Parameters:
dataset - thje current dataset.

append

protected void append(java.lang.StringBuffer output,
                      java.util.Properties options)
Appends the specified options to the output buffer.

Parameters:
output - the output buffer.
options - the options mapping.


Copyright © 2013. All Rights Reserved.