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 ActivationFunctionx - 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 ActivationFunctionclone in class Objectpublic final double derivativeFunction(double b,
double a)
derivativeFunction in interface ActivationFunctionb - 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 ActivationFunctionpublic final double[] getParams()
getParams in interface ActivationFunctionpublic final boolean hasDerivative()
hasDerivative in interface ActivationFunctionpublic 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 ActivationFunctionindex - The index of the param to set.value - The value to set.public String getFactoryCode()
getFactoryCode in interface ActivationFunctionCopyright © 2014. All Rights Reserved.