ca.nengo.math.impl
Class IndependentDimensionApproximator

java.lang.Object
  extended by ca.nengo.math.impl.IndependentDimensionApproximator
All Implemented Interfaces:
LinearApproximator, java.io.Serializable, java.lang.Cloneable

public class IndependentDimensionApproximator
extends java.lang.Object
implements LinearApproximator

A LinearApproximator for functions with no multidimensional nonlinearities. Each of the source functions is assumed to be a function of one dimension. Consequently, only functions of one dimension can be decoded directly. Linear functions of multiple dimensions can obtained later by combining weights of one-dimensional functions.

Author:
Bryan Tripp
See Also:
Serialized Form

Nested Class Summary
static class IndependentDimensionApproximator.EncoderFactory
          A VectorGenerator for use with IndependentDimensionApproximator as an encoder factory.
static class IndependentDimensionApproximator.EvalPointFactory
          A VectorGenerator for use with IndependentDimensionApproximator as an evaluation point factory.
static class IndependentDimensionApproximator.Factory
          Factory for IndependentDimensionApproximators.
 
Constructor Summary
IndependentDimensionApproximator(float[] evaluationPoints, float[][] values, int[] dimensions, int dimension, Function costFunction, float noise)
           
 
Method Summary
 LinearApproximator clone()
           
 float[] findCoefficients(Function target)
          Note: more information is needed than the arguments provide (for example the functions that are to be combined to estimate the target).
 float[][] getEvalPoints()
           
 float[][] getValues()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndependentDimensionApproximator

public IndependentDimensionApproximator(float[] evaluationPoints,
                                        float[][] values,
                                        int[] dimensions,
                                        int dimension,
                                        Function costFunction,
                                        float noise)
Parameters:
evaluationPoints - Points of evaluation of source functions, in the dimension along which they vary
values - Values of each source function at each point
dimensions - The dimension along which each function varies
dimension - Dimension of the space from which source functions map
costFunction - As in WeightedCostApproximator, but in dimension along which functions vary
noise - Proportion of noise to add
Method Detail

getEvalPoints

public float[][] getEvalPoints()
Specified by:
getEvalPoints in interface LinearApproximator
Returns:
Points at which target functions are evaluated. Each row (or float[]) corresponds to a single evaluation point. These points should usually be uniformly distributed, because the sum of error at these points is treated as an integral over the domain of interest.
See Also:
LinearApproximator.getEvalPoints()

getValues

public float[][] getValues()
Specified by:
getValues in interface LinearApproximator
Returns:
The values of component functions at the evaluation points. The first dimension makes up the list of functions, and the second the values of these functions at each evaluation point.
See Also:
LinearApproximator.getValues()

findCoefficients

public float[] findCoefficients(Function target)
Description copied from interface: LinearApproximator
Note: more information is needed than the arguments provide (for example the functions that are to be combined to estimate the target). These other data are object properties. This enables re-use of calculations based on these data, for estimating multiple functions.

Specified by:
findCoefficients in interface LinearApproximator
Parameters:
target - Function to approximate
Returns:
coefficients on component functions which result in an approximation of the target
See Also:
LinearApproximator.findCoefficients(ca.nengo.math.Function)

clone

public LinearApproximator clone()
                         throws java.lang.CloneNotSupportedException
Specified by:
clone in interface LinearApproximator
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

main

public static void main(java.lang.String[] args)