com.rapidminer.generator
Class SingularNumericalGenerator

java.lang.Object
  extended by com.rapidminer.generator.FeatureGenerator
      extended by com.rapidminer.generator.SingularNumericalGenerator
Direct Known Subclasses:
AbsoluteValueGenerator, ExponentialFunctionGenerator, FloorCeilGenerator, ReciprocalValueGenerator, SignumGenerator, SquareRootGenerator, TrigonometricFunctionGenerator

public abstract class SingularNumericalGenerator
extends FeatureGenerator

Generators of this class will have one numerical input attribute and one output attribute.

Author:
Ingo Mierswa ingomierswa Exp $

Field Summary
 
Fields inherited from class com.rapidminer.generator.FeatureGenerator
resultAttributes, SELECTION_MODE_ALL, SELECTION_MODE_RESTRICTIVE
 
Constructor Summary
SingularNumericalGenerator()
           
 
Method Summary
abstract  double calculateValue(double value)
          Subclasses have to implement this method to calculate the function result.
 void generate(DataRow data)
          Generates the new attribute values for the example e and returns the new attribute values as doubles.
 Attribute[] getInputAttributes()
          Returns an array of Attributes where the length is the arity of the generator, [i] is the attribute type of the i-th argument.
 java.util.List<Attribute[]> getInputCandidates(ExampleSet exampleSet, java.lang.String[] functions)
          Returns all compatible input attribute arrays for this generator from the given example set as list.
 Attribute[] getOutputAttributes(ExampleTable input)
          Returns the generated attributes types.
 java.lang.String toString()
           
 
Methods inherited from class com.rapidminer.generator.FeatureGenerator
argumentsSet, checkCompatibility, createGeneratorForFunction, equals, generateAll, getArgument, getExampleTable, getFunction, getSelectionMode, hashCode, newInstance, selectGenerator, setArguments, setExampleTable, setFunction, setSelectionMode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingularNumericalGenerator

public SingularNumericalGenerator()
Method Detail

calculateValue

public abstract double calculateValue(double value)
Subclasses have to implement this method to calculate the function result.


getInputAttributes

public Attribute[] getInputAttributes()
Description copied from class: FeatureGenerator
Returns an array of Attributes where the length is the arity of the generator, [i] is the attribute type of the i-th argument.

Specified by:
getInputAttributes in class FeatureGenerator

getOutputAttributes

public Attribute[] getOutputAttributes(ExampleTable input)
Description copied from class: FeatureGenerator
Returns the generated attributes types.

Specified by:
getOutputAttributes in class FeatureGenerator

getInputCandidates

public java.util.List<Attribute[]> getInputCandidates(ExampleSet exampleSet,
                                                      java.lang.String[] functions)
Returns all compatible input attribute arrays for this generator from the given example set as list.

Specified by:
getInputCandidates in class FeatureGenerator

generate

public void generate(DataRow data)
              throws GenerationException
Description copied from class: FeatureGenerator
Generates the new attribute values for the example e and returns the new attribute values as doubles. e.getAttribute(getArgument(i)) is the correct way to access argument i. If the according attribute's type is VALUE_SERIES, the end index can be determined by i_end = getExampleTable().getBlockEndIndex(getArgument(i)). Thus all values of the series can be accessed using indices i through i_end.

Specified by:
generate in class FeatureGenerator
Throws:
GenerationException

toString

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


Copyright © 2001-2009 by Rapid-I