public class CompositeApproximator extends java.lang.Object implements LinearApproximator
A LinearApproximator that approximates multi-dimensional functions as sums of lower-dimensional functions. Each lower-dimensional function is approximated by a component approximator, which is provided in the constructor. The resulting approximation is the sum of approximations produced by each component.
CompositeApproximator is similar to the simpler IndependentDimensionApproximator, but more general because dimensions can be handled either independently or in arbitrary groups.
CompositeApproximator is useful for low-dimensionally non-linear functions of high-dimensional vectors, eg x1*x2 + x3*x4 - x5*x6.
It is also useful for creating accurate, high-dimensional ensembles of neurons with a little overlap between dimensions.
TODO: should LinearApproximator have getDimension()? would be possible to get rid of 2nd constructor arg then TODO: testConstructor and Description |
---|
CompositeApproximator(LinearApproximator[] components,
int[][] dimensions) |
Modifier and Type | Method and Description |
---|---|
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() |
public CompositeApproximator(LinearApproximator[] components, int[][] dimensions)
components
- LinearApproximators that make up the compositedimensions
- dimensionality of each LinearApproximatorpublic float[][] getEvalPoints()
getEvalPoints
in interface LinearApproximator
LinearApproximator.getEvalPoints()
public float[][] getValues()
getValues
in interface LinearApproximator
LinearApproximator.getValues()
public float[] findCoefficients(Function target)
LinearApproximator
findCoefficients
in interface LinearApproximator
target
- Function to approximateLinearApproximator.findCoefficients(ca.nengo.math.Function)
public LinearApproximator clone() throws java.lang.CloneNotSupportedException
clone
in interface LinearApproximator
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if clone can't be made