yawn.envs.delve
Class DelveEnvironment
java.lang.Object
yawn.envs.Environment
yawn.envs.delve.DelveEnvironment
public class DelveEnvironment
- extends Environment
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GUESS_FILE_NAME
protected static final java.lang.String GUESS_FILE_NAME
- See Also:
- Constant Field Values
TEST_FILE_NAME
protected static final java.lang.String TEST_FILE_NAME
- See Also:
- Constant Field Values
TRAIN_FILE_NAME
protected static final java.lang.String TRAIN_FILE_NAME
- See Also:
- Constant Field Values
inputSize
protected int inputSize
outputSize
protected int outputSize
parsed
protected boolean parsed
problemDirectory
protected java.lang.String problemDirectory
resultsDirectory
protected java.lang.String resultsDirectory
DelveEnvironment
public DelveEnvironment()
getNumberOfSystemRuns
public int getNumberOfSystemRuns()
- Description copied from class:
Environment
- Returns the number of times the system will be run. Do not mistake the
term "system run" with "epoch"
- Specified by:
getNumberOfSystemRuns
in class Environment
- Returns:
- total number of system runs
- See Also:
Environment.getNumberOfSystemRuns()
outputSize
public int outputSize()
- Specified by:
outputSize
in class Environment
inputSize
public int inputSize()
- Specified by:
inputSize
in class Environment
getProblemDirectory
public java.lang.String getProblemDirectory()
- Returns:
- Returns the problemDirectory.
getResultsDirectory
public java.lang.String getResultsDirectory()
- Returns:
- Returns the resultsDirectory.
getTestDatasetInputs
public Pattern[] getTestDatasetInputs(int runNumber)
throws EnvironmentException
- Reads a test data file from a DELVE directory. The test set is a
input-only file.
- Specified by:
getTestDatasetInputs
in class Environment
- Parameters:
runNumber
- the number of the current system run
- Returns:
- Test set
- Throws:
EnvironmentException
- See Also:
Environment.getTestDatasetInputs(int)
getTrainingDataset
public InputOutputPattern[] getTrainingDataset(int runNumber)
throws EnvironmentException
- Reads a train file from a DELVE directory.
- Specified by:
getTrainingDataset
in class Environment
- Parameters:
runNumber
- the number of the current system run
- Returns:
- the training set as an array of
InputOutputPattern
- Throws:
EnvironmentException
- See Also:
Environment.getTrainingDataset(int)
init
protected void init()
throws EnvironmentException
- Throws:
EnvironmentException
loadInputOutputFile
protected InputOutputPattern[] loadInputOutputFile(java.lang.String fileName,
int numberOfOutputs)
throws EnvironmentException
- Reads a file in DELVE format. The last
numberOfOutpus
columns are selected as outputs.
- Returns:
- an array of
InputOutputPattern
loaded from the
file.
- Throws:
EnvironmentException
setNumberOfSystemRuns
public void setNumberOfSystemRuns(int numberOfRuns)
- Specified by:
setNumberOfSystemRuns
in class Environment
setProblemDirectory
public void setProblemDirectory(java.lang.String problemDirectory)
- Parameters:
problemDirectory
- The problemDirectory to set.
setResultsDirectory
public void setResultsDirectory(java.lang.String resultsDirectory)
- Parameters:
resultsDirectory
- The resultsDirectory to set.
validate
public void validate()
throws ValidationException
- Specified by:
validate
in class Environment
- Throws:
ValidationException
- See Also:
Environment.validate()
writeResults
public void writeResults(Pattern[] results,
int runNumber)
throws EnvironmentException
- Writes a DELVE cguess file representing the predictions of a neural
network.
- Specified by:
writeResults
in class Environment
- Parameters:
results
- the results to be writtenrunNumber
- the number of the current system run
- Throws:
EnvironmentException
Copyright © 2003-2005 GIAA, Universidad Carlos III de Madrid. All Rights Reserved.