EDU.gatech.cc.is.learning
Class FunctionApproximator
java.lang.Object
|
+--EDU.gatech.cc.is.learning.FunctionApproximator
- Direct Known Subclasses:
- Bilinear2D
- public abstract class FunctionApproximator
- extends java.lang.Object
- implements java.lang.Cloneable, java.io.Serializable
Provides an abstract interface to
various function approximator implementations.
Copyright (c)2000 Georgia Tech Research Corporation
- See Also:
- Serialized Form
Field Summary |
int |
domain_dim
The dimension of the domain space. |
int |
range_dim
The dimension of the range space. |
Constructor Summary |
FunctionApproximator(int n,
int m)
Create an instance of a function approximator. |
FunctionApproximator(java.lang.String filename)
Create an instance of a function approximator according to the
definition in a given file. |
Method Summary |
abstract double[] |
query(double[] q)
Query the function approximator. |
abstract void |
saveDefinition(java.lang.String filename)
Save a definition of this instance in a file. |
abstract void |
update(double[] q,
double[] p)
Add a case to the approximator's learning set. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
domain_dim
public final int domain_dim
- The dimension of the domain space.
range_dim
public final int range_dim
- The dimension of the range space.
FunctionApproximator
public FunctionApproximator(int n,
int m)
- Create an instance of a function approximator. The approximator
will map from
n
dimensions to m
dimensions.
- Parameters:
n
- dimension of the domain space.m
- dimension of the range space.
FunctionApproximator
public FunctionApproximator(java.lang.String filename)
throws FunctionApproximatorException
- Create an instance of a function approximator according to the
definition in a given file. The file format depends on the
particular implementation.
- Parameters:
filename
- dimension of the domain space.- Throws:
- FunctionApproximatorException - always.
saveDefinition
public abstract void saveDefinition(java.lang.String filename)
throws FunctionApproximatorException,
java.io.IOException
- Save a definition of this instance in a file.
- Parameters:
filename
- the file name.- Throws:
- java.io.IOException - if an I/O error occurs.
- FunctionApproximatorException - if something wrong occurs.
query
public abstract double[] query(double[] q)
throws FunctionApproximatorException
- Query the function approximator.
- Parameters:
q
- an n-dimensional array of doubles specifying a point
to evaluate.- Returns:
- an m-dimensional array of doubles representing the
value at the query point.
- Throws:
- FunctionApproximatorException - if something wrong occurs.
update
public abstract void update(double[] q,
double[] p)
throws FunctionApproximatorException
- Add a case to the approximator's learning set. For some
learners, this has no effect.
- Parameters:
q
- an n-dimensional array of doubles specifying a point
in the domain space.p
- an m-dimensional array of doubles specifying the
associate point in the range space.- Throws:
- FunctionApproximatorException - if something wrong occurs.