yawn.envs
Class Environment

java.lang.Object
  extended by yawn.envs.Environment
Direct Known Subclasses:
DelveEnvironment, PlainTextEnvironment, SyntheticDataEnvironment

public abstract class Environment
extends java.lang.Object

Specifies methods that should provide a way to interact with a test environment. In particular, it allows to read training and test data and to write predictions.
$Id: Environment.java,v 1.4 2005/04/07 17:28:27 supermarti Exp $

Version:
$Revision: 1.4 $
Author:
Luis Martí (luis dot marti at uc3m dot es)

Constructor Summary
Environment()
           
 
Method Summary
abstract  int getNumberOfSystemRuns()
          Returns the number of times the system will be run.
abstract  Pattern[] getTestDatasetInputs(int runNumber)
          Reads a test dataset from the environment.
abstract  InputOutputPattern[] getTrainingDataset(int runNumber)
          Reads a train file from the environment.
abstract  int inputSize()
           
abstract  int outputSize()
           
abstract  void setNumberOfSystemRuns(int numberOfRuns)
           
 java.lang.String toString()
           
abstract  void validate()
           
abstract  void writeResults(Pattern[] results, int runNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Environment

public Environment()
Method Detail

getNumberOfSystemRuns

public abstract int getNumberOfSystemRuns()
Returns the number of times the system will be run. Do not mistake the term "system run" with "epoch"

Returns:
total number of system runs

setNumberOfSystemRuns

public abstract void setNumberOfSystemRuns(int numberOfRuns)

getTrainingDataset

public abstract InputOutputPattern[] getTrainingDataset(int runNumber)
                                                 throws EnvironmentException
Reads a train file from the environment.

Parameters:
runNumber - the number of the current system run
Returns:
the training set as an array of InputOutputPattern
Throws:
EnvironmentException

getTestDatasetInputs

public abstract Pattern[] getTestDatasetInputs(int runNumber)
                                        throws EnvironmentException
Reads a test dataset from the environment. The test set is a input-only file.

Parameters:
runNumber - the number of the current system run
Returns:
Test set
Throws:
EnvironmentException

writeResults

public abstract void writeResults(Pattern[] results,
                                  int runNumber)
                           throws EnvironmentException
Throws:
EnvironmentException

validate

public abstract void validate()
                       throws ValidationException
Throws:
ValidationException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

inputSize

public abstract int inputSize()

outputSize

public abstract int outputSize()


Copyright © 2003-2005 GIAA, Universidad Carlos III de Madrid. All Rights Reserved.