yawn.envs.synthetic
Class CircleInTheSquareEnvironment

java.lang.Object
  extended by yawn.envs.Environment
      extended by yawn.envs.synthetic.SyntheticDataEnvironment
          extended by yawn.envs.synthetic.CircleInTheSquareEnvironment

public class CircleInTheSquareEnvironment
extends SyntheticDataEnvironment

A synthetic environment for the circle-in-the-square problem. In this problem inputs are distributed in a two-dimensional square. The objective is to determine of weather a given point is located inside a circunsference laid on the center of the square. In this case, if the point belongs to the circle it will have `1' as output or `0' in the other case. $Id: CircleInTheSquareEnvironment.java,v 1.3 2005/03/24 17:59:54 supermarti Exp $

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

Field Summary
protected  Pattern center
           
protected  double innerCircleRadius
           
protected static double[] ONE_PAT
           
protected  double squareDimension
           
protected static double[] ZERO_PAT
           
 
Fields inherited from class yawn.envs.synthetic.SyntheticDataEnvironment
log, numberOfSystemRuns, testSetSize, testSetsList, trainSetSize, trainSetsList
 
Constructor Summary
CircleInTheSquareEnvironment()
           
 
Method Summary
protected  Pattern generateRandomInput()
           
 double getInnerCircleRadius()
           
 double getSquareDimension()
           
 void setInnerCircleRadius(double innerCircleRadius)
           
 void setSquareDimension(double squareDimension)
           
protected  Pattern synthetizeOutput(Pattern input)
           
 void validate()
           
 
Methods inherited from class yawn.envs.synthetic.SyntheticDataEnvironment
generateSet, getFullTestDataset, getNumberOfSystemRuns, getTestDataset, getTestDatasetInputs, getTestExpectedOutputsSet, getTestSetSize, getTrainingDataset, getTrainSetSize, init, inputSize, outputSize, setNumberOfSystemRuns, setTestSetSize, setTrainSetSize, writeResults
 
Methods inherited from class yawn.envs.Environment
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

innerCircleRadius

protected double innerCircleRadius

squareDimension

protected double squareDimension

center

protected Pattern center

ONE_PAT

protected static final double[] ONE_PAT

ZERO_PAT

protected static final double[] ZERO_PAT
Constructor Detail

CircleInTheSquareEnvironment

public CircleInTheSquareEnvironment()
Method Detail

getInnerCircleRadius

public double getInnerCircleRadius()

setInnerCircleRadius

public void setInnerCircleRadius(double innerCircleRadius)

getSquareDimension

public double getSquareDimension()

setSquareDimension

public void setSquareDimension(double squareDimension)

synthetizeOutput

protected Pattern synthetizeOutput(Pattern input)
Specified by:
synthetizeOutput in class SyntheticDataEnvironment

generateRandomInput

protected Pattern generateRandomInput()
Specified by:
generateRandomInput in class SyntheticDataEnvironment

validate

public void validate()
              throws ValidationException
Overrides:
validate in class SyntheticDataEnvironment
Throws:
ValidationException


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