de.unidu.is.util
Class LearnableFunction

java.lang.Object
  extended byde.unidu.is.util.Function
      extended byde.unidu.is.util.LearnableFunction
Direct Known Subclasses:
IdFunction, LogFunction

public abstract class LearnableFunction
extends Function

A function whose parameters can be learned via regression.

Since:
2004-06-21
Version:
$Revision: 1.5 $, $Date: 2005/02/28 22:27:55 $
Author:
Henrik Nottelmann

Field Summary
 
Fields inherited from class de.unidu.is.util.Function
parameters
 
Constructor Summary
LearnableFunction()
           
 
Method Summary
abstract  java.lang.String getFunction()
          Returns the function in its textual representation.
abstract  java.lang.String[] getParameterNames()
          Returns the parameter names which can be learned.
 void learn(java.io.File learnfile)
          Uses the specified file for learning parameters.
 
Methods inherited from class de.unidu.is.util.Function
apply, getParameter, getParameters, init, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LearnableFunction

public LearnableFunction()
Method Detail

learn

public void learn(java.io.File learnfile)
Uses the specified file for learning parameters. The file should contain x and y values, separated by a space. The parameter names are specified by getParameterNames(), the textual serialisation of this function by getFunction() (including the function name), and the result overwrites the current parameters.

Parameters:
learnfile - file used for learning

getFunction

public abstract java.lang.String getFunction()
Returns the function in its textual representation.

Returns:
textual representation of this function

getParameterNames

public abstract java.lang.String[] getParameterNames()
Returns the parameter names which can be learned.

Specified by:
getParameterNames in class Function
Returns:
parameter names