dataprocessing
Class Example

java.lang.Object
  extended bydataprocessing.Example

public class Example
extends java.lang.Object

A single input-output pattern pairing.


Field Summary
static java.util.ArrayList[] inputAlphabet
          The set of legal symbols for each input feature.
 double[] inputs
          The inputs for this Example.
 double target
          The target for this Example.
static java.util.ArrayList targetAlphabet
          The set of legal target symbols.
 
Constructor Summary
Example(int numInputs)
           
Example(int numInputs, int numOutputs)
           
 
Method Summary
 boolean equals(java.lang.Object other)
          Test this Example object for equality with another Example.
 void print()
          Prints out the return value of the toString() method.
 java.lang.String toString()
          Generate a String representation of this Example.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inputAlphabet

public static java.util.ArrayList[] inputAlphabet
The set of legal symbols for each input feature.


inputs

public double[] inputs
The inputs for this Example. Values are coded as indices into the inputAlphabet ArrayList, with -1 indicating the "don't care" symbol.


target

public double target
The target for this Example. Value is coded as an index into the targetAlphabet ArrayList.


targetAlphabet

public static java.util.ArrayList targetAlphabet
The set of legal target symbols.

Constructor Detail

Example

public Example(int numInputs)

Example

public Example(int numInputs,
               int numOutputs)
Method Detail

equals

public boolean equals(java.lang.Object other)
Test this Example object for equality with another Example. Returns true if the input and target are equal.

Parameters:
other - An Example object to compare this one to.
Returns:
True if the Examples are equal.

print

public void print()
Prints out the return value of the toString() method.


toString

public java.lang.String toString()
Generate a String representation of this Example. Note this returns Strings coded in the actual alphabet from in the datafile.

Returns:
A String representation of this object.