public class LinearFunction extends AbstractFunction
DIMENSION_PROPERTY
Constructor and Description |
---|
LinearFunction(float[] map,
float bias,
boolean rectified) |
Modifier and Type | Method and Description |
---|---|
Function |
clone() |
float |
getBias() |
float[] |
getMap() |
boolean |
getRectified() |
float |
map(float[] from) |
void |
setBias(float bias) |
void |
setMap(float[] map) |
void |
setRectified(boolean rectified) |
getCode, getDimension, getName, multiMap, setCode, setName
public LinearFunction(float[] map, float bias, boolean rectified)
map
- A 1Xn matrix that defines a map from input onto one dimension
(i.e. f(x) = m'x, where m is the map)bias
- Bias to add to resultrectified
- If true, result is rectified (set to 0 if less than 0)public float[] getMap()
public void setMap(float[] map)
map
- map A 1Xn matrix that defines a map from input onto one dimension
(i.e. f(x) = m'x, where m is the map)public float getBias()
public void setBias(float bias)
bias
- Bias to add to resultpublic boolean getRectified()
public void setRectified(boolean rectified)
rectified
- If true, result is rectified (set to 0 if less than 0)public float map(float[] from)
map
in interface Function
map
in class AbstractFunction
from
- Must have same length as getDimension()Function.map(float[])
public Function clone() throws java.lang.CloneNotSupportedException
clone
in interface Function
clone
in class AbstractFunction
java.lang.CloneNotSupportedException
- is super does not support clone