edu.uiuc.ge.illigal.gale
Class GALE

java.lang.Object
  |
  +--edu.uiuc.ge.illigal.gale.GALE

public class GALE
extends java.lang.Object

Entry point for running GALE environment.

Since:
0.9alpha
Version:
0.9alpha
Author:
Xavier Llorà <xllora@illigal.ge.uiuc.edu>

Field Summary
protected  boolean bDump
          Board dump flag
protected  boolean bFolds
          Cross validation fold size used
protected  boolean bHoldOut
          Hold out requires
protected  edu.uiuc.ge.illigal.gale.board.Board brd
          The board used by GALE
protected  boolean bSaveFiles
          Save folders required
protected  java.util.Date dateStart
          Data of startup
protected  float fHoldOutProp
          Use hold out
protected  edu.uiuc.ge.illigal.gale.config.GALEConfiguration galeCnf
          GALE configuration object
protected  int iKFolds
          Number of folds
protected  edu.uiuc.ge.illigal.gale.data.InstanceSet insSet
          GALE training instance set
protected  edu.uiuc.ge.illigal.gale.data.InstanceSet insTestSet
          GALE test instance set
protected  edu.uiuc.ge.illigal.gale.io.IOFactory ioFac
          The IO Factory
protected  java.lang.String sGALEConfigFile
          Configuration file name
protected  java.lang.String sTestFile
          Test file name (if provided, cross-validation disabled)
protected  java.lang.String sTrainFile
          Train file name
static java.lang.String sVersion
          GALE version identification sting
 
Constructor Summary
GALE(java.lang.String[] sArgs)
          Configures GALE environment
 
Method Summary
protected  edu.uiuc.ge.illigal.gale.agents.AgentPerformance baggingTest(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
          Tests using bagging.
protected  edu.uiuc.ge.illigal.gale.agents.AgentPerformance bestAgentTest(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
          Tests using the best obtained agent.
 void close()
          Invocation method for running GALE environment.
protected  void crossValidation()
          Runs cross-validation.
protected  void dumpHeader(java.lang.String chn, int iNumIns)
          Dumps the header into the given channel
protected static java.lang.String listOptions()
          Returns the set of available option
static void main(java.lang.String[] sArgs)
          Invocation method for running GALE environment.
 void run()
          Runs GALE environment.
protected  void saveFolds(edu.uiuc.ge.illigal.gale.data.OrderedSet[] osa)
          Saves the folds to files.
protected  void saveHoldOut(edu.uiuc.ge.illigal.gale.data.InstanceSet[] insa)
          Saves the holdout instance sets to files.
protected  void trainTestRun()
          Runs train an test.
protected  void updateOptions(java.lang.String[] sArgs)
          Updates the command line options for GALE environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sVersion

public static final java.lang.String sVersion
GALE version identification sting

See Also:
Constant Field Values

sGALEConfigFile

protected java.lang.String sGALEConfigFile
Configuration file name


sTrainFile

protected java.lang.String sTrainFile
Train file name


sTestFile

protected java.lang.String sTestFile
Test file name (if provided, cross-validation disabled)


bFolds

protected boolean bFolds
Cross validation fold size used


iKFolds

protected int iKFolds
Number of folds


galeCnf

protected edu.uiuc.ge.illigal.gale.config.GALEConfiguration galeCnf
GALE configuration object


insSet

protected edu.uiuc.ge.illigal.gale.data.InstanceSet insSet
GALE training instance set


insTestSet

protected edu.uiuc.ge.illigal.gale.data.InstanceSet insTestSet
GALE test instance set


brd

protected edu.uiuc.ge.illigal.gale.board.Board brd
The board used by GALE


ioFac

protected edu.uiuc.ge.illigal.gale.io.IOFactory ioFac
The IO Factory


bSaveFiles

protected boolean bSaveFiles
Save folders required


bHoldOut

protected boolean bHoldOut
Hold out requires


fHoldOutProp

protected float fHoldOutProp
Use hold out


dateStart

protected java.util.Date dateStart
Data of startup


bDump

protected boolean bDump
Board dump flag

Constructor Detail

GALE

public GALE(java.lang.String[] sArgs)
     throws java.lang.Exception
Configures GALE environment

Parameters:
sArgs - command line arguments
Throws:
java.lang.Exception - could not initialize GALE environment
Method Detail

run

public void run()
         throws java.lang.Exception
Runs GALE environment.

Throws:
java.lang.Exception - could not initialize GALE environment

crossValidation

protected void crossValidation()
                        throws java.lang.Exception
Runs cross-validation.

Throws:
java.lang.Exception - could not initialize GALE environment

trainTestRun

protected void trainTestRun()
                     throws java.lang.Exception
Runs train an test.

Throws:
java.lang.Exception - could not initialize GALE environment

saveHoldOut

protected void saveHoldOut(edu.uiuc.ge.illigal.gale.data.InstanceSet[] insa)
                    throws java.lang.Exception
Saves the holdout instance sets to files.

Parameters:
insa - the array of instance sets
Throws:
java.lang.Exception - problems using the channels

bestAgentTest

protected edu.uiuc.ge.illigal.gale.agents.AgentPerformance bestAgentTest(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
                                                                  throws java.lang.Exception
Tests using the best obtained agent.

Parameters:
os - the set of instances to use
Throws:
java.lang.Exception - could not initialize GALE environment

baggingTest

protected edu.uiuc.ge.illigal.gale.agents.AgentPerformance baggingTest(edu.uiuc.ge.illigal.gale.data.OrderedSet os)
                                                                throws java.lang.Exception
Tests using bagging.

Parameters:
os - the set of instances to use
Throws:
java.lang.Exception - could not initialize GALE environment

updateOptions

protected void updateOptions(java.lang.String[] sArgs)
                      throws java.lang.Exception
Updates the command line options for GALE environment.

Parameters:
sArgs - command line arguments
Throws:
java.lang.Exception - command line error

saveFolds

protected void saveFolds(edu.uiuc.ge.illigal.gale.data.OrderedSet[] osa)
                  throws java.lang.Exception
Saves the folds to files.

Parameters:
osa - the array of folds
Throws:
java.lang.Exception - problems using the channels

dumpHeader

protected void dumpHeader(java.lang.String chn,
                          int iNumIns)
                   throws java.lang.Exception
Dumps the header into the given channel

Parameters:
chn - the channel to use
iNumIns - the number of instances
Throws:
java.lang.Exception - problems closing the channels

close

public void close()
           throws java.lang.Exception
Invocation method for running GALE environment.

Throws:
java.lang.Exception - problems closing the channels

listOptions

protected static java.lang.String listOptions()
Returns the set of available option

Returns:
the options

main

public static void main(java.lang.String[] sArgs)
Invocation method for running GALE environment.

Parameters:
sArgs - command line arguments