org.encog.engine.network.activation
public class ActivationStep extends Object implements ActivationFunction
Modifier and Type | Field and Description |
---|---|
static int |
PARAM_STEP_CENTER
The step center parameter.
|
static int |
PARAM_STEP_HIGH
The step high parameter.
|
static int |
PARAM_STEP_LOW
The step low parameter.
|
Constructor and Description |
---|
ActivationStep()
Create a basic step activation with low=0, center=0, high=1.
|
ActivationStep(double low,
double center,
double high)
Construct a step activation function.
|
Modifier and Type | Method and Description |
---|---|
void |
activationFunction(double[] x,
int start,
int size)
Implements the activation function.
|
ActivationFunction |
clone() |
double |
derivativeFunction(double b,
double a)
Calculate the derivative.
|
double |
getCenter() |
String |
getFactoryCode() |
double |
getHigh() |
double |
getLow() |
String[] |
getParamNames() |
double[] |
getParams() |
boolean |
hasDerivative() |
void |
setCenter(double d)
Set the center of this function.
|
void |
setHigh(double d)
Set the high of this function.
|
void |
setLow(double d)
Set the low of this function.
|
void |
setParam(int index,
double value)
Set one of the params for this activation function.
|
public static final int PARAM_STEP_CENTER
public static final int PARAM_STEP_LOW
public static final int PARAM_STEP_HIGH
public ActivationStep()
public ActivationStep(double low, double center, double high)
low
- The low of the function.center
- The center of the function.high
- The high of the function.public final void activationFunction(double[] x, int start, int size)
activationFunction
in interface ActivationFunction
x
- The input array to the activation function.start
- The starting index.size
- The number of values to calculate.public final ActivationFunction clone()
clone
in interface ActivationFunction
clone
in class Object
public final double derivativeFunction(double b, double a)
derivativeFunction
in interface ActivationFunction
b
- The number to calculate the derivative of, the number "before" the
activation function was applied.a
- The number "after" an activation function has been applied.public final double getCenter()
public final double getHigh()
public final double getLow()
public final String[] getParamNames()
getParamNames
in interface ActivationFunction
public final double[] getParams()
getParams
in interface ActivationFunction
public final boolean hasDerivative()
hasDerivative
in interface ActivationFunction
public final void setCenter(double d)
d
- The center of this function.public final void setHigh(double d)
d
- The high of this function.public final void setLow(double d)
d
- The low of this function.public final void setParam(int index, double value)
setParam
in interface ActivationFunction
index
- The index of the param to set.value
- The value to set.public String getFactoryCode()
getFactoryCode
in interface ActivationFunction
Copyright © 2014. All Rights Reserved.