org.itc.irst.tcc.sre
Class Train

java.lang.Object
  extended by org.itc.irst.tcc.sre.Train

public class Train
extends java.lang.Object

TO DO

Since:
1.0
Version:
%I%, %G%
Author:
Claudio Giuliano

Field Summary
(package private) static org.apache.log4j.Logger logger
          Define a static logger variable so that it references the Logger instance named Train.
private  java.util.Properties parameter
           
 
Constructor Summary
Train(java.util.Properties parameter)
           
 
Method Summary
private  double calculateC(ExampleSet data)
           
private  int[] classFreq(ExampleSet set)
          Returns a command-line help.
private  double[] classWeigth(int[] c)
           
private  FeatureIndex[] createFeatureIndex(int subspaceCount)
           
static void main(java.lang.String[] args)
           
private  ExampleSet readDataSet(java.io.File in)
           
 void run()
           
private  java.io.File saveExampleSet(ExampleSet outputSet, ZipModel model)
           
private  void saveFeatureIndexes(FeatureIndex[] index, ZipModel model)
           
private  void saveParameters(ZipModel model)
           
private  void svmTrain(java.io.File svmTrainingFile, double c, double[] weight, ZipModel model)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
Define a static logger variable so that it references the Logger instance named Train.


parameter

private java.util.Properties parameter
Constructor Detail

Train

public Train(java.util.Properties parameter)
Method Detail

run

public void run()
         throws java.lang.Exception
Throws:
java.lang.Exception

readDataSet

private ExampleSet readDataSet(java.io.File in)
                        throws java.io.IOException
Throws:
java.io.IOException

calculateC

private double calculateC(ExampleSet data)

createFeatureIndex

private FeatureIndex[] createFeatureIndex(int subspaceCount)

saveFeatureIndexes

private void saveFeatureIndexes(FeatureIndex[] index,
                                ZipModel model)
                         throws java.io.IOException
Throws:
java.io.IOException

saveExampleSet

private java.io.File saveExampleSet(ExampleSet outputSet,
                                    ZipModel model)
                             throws java.io.IOException
Throws:
java.io.IOException

saveParameters

private void saveParameters(ZipModel model)
                     throws java.io.IOException
Throws:
java.io.IOException

svmTrain

private void svmTrain(java.io.File svmTrainingFile,
                      double c,
                      double[] weight,
                      ZipModel model)
               throws java.lang.Exception
Throws:
java.lang.Exception

classFreq

private int[] classFreq(ExampleSet set)
                 throws java.io.IOException
Returns a command-line help. return a command-line help.

Throws:
java.io.IOException

classWeigth

private double[] classWeigth(int[] c)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception