org.encog.engine.network.activation
public class ActivationRamp extends Object implements ActivationFunction
| Modifier and Type | Field and Description |
|---|---|
static int |
PARAM_RAMP_HIGH
The ramp high parameter.
|
static int |
PARAM_RAMP_HIGH_THRESHOLD
The ramp high threshold parameter.
|
static int |
PARAM_RAMP_LOW
The ramp low parameter.
|
static int |
PARAM_RAMP_LOW_THRESHOLD
The ramp low threshold parameter.
|
| Constructor and Description |
|---|
ActivationRamp()
Default constructor.
|
ActivationRamp(double thresholdHigh,
double thresholdLow,
double high,
double low)
Construct a ramp activation function.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activationFunction(double[] x,
int start,
int size)
Implements the activation function.
|
ActivationFunction |
clone()
Clone the object.
|
double |
derivativeFunction(double b,
double a)
Calculate the derivative.
|
String |
getFactoryCode() |
double |
getHigh() |
double |
getLow() |
String[] |
getParamNames() |
double[] |
getParams() |
double |
getThresholdHigh() |
double |
getThresholdLow() |
boolean |
hasDerivative() |
void |
setHigh(double d)
Set the high value.
|
void |
setLow(double d)
Set the low value.
|
void |
setParam(int index,
double value)
Set one of the params for this activation function.
|
void |
setThresholdHigh(double d)
Set the threshold high.
|
void |
setThresholdLow(double d)
Set the threshold low.
|
public static final int PARAM_RAMP_HIGH_THRESHOLD
public static final int PARAM_RAMP_LOW_THRESHOLD
public static final int PARAM_RAMP_HIGH
public static final int PARAM_RAMP_LOW
public ActivationRamp()
public ActivationRamp(double thresholdHigh,
double thresholdLow,
double high,
double low)
thresholdHigh - The high threshold value.thresholdLow - The low threshold value.high - The high value, replaced if the high threshold is exceeded.low - The low value, replaced if the low threshold is exceeded.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 getHigh()
public final double getLow()
public final String[] getParamNames()
getParamNames in interface ActivationFunctionpublic final double[] getParams()
getParams in interface ActivationFunctionpublic final double getThresholdHigh()
public final double getThresholdLow()
public final boolean hasDerivative()
hasDerivative in interface ActivationFunctionpublic final void setHigh(double d)
d - The high value.public final void setLow(double d)
d - The low value.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 final void setThresholdHigh(double d)
d - The threshold high.public final void setThresholdLow(double d)
d - The threshold low.public String getFactoryCode()
getFactoryCode in interface ActivationFunctionCopyright © 2014. All Rights Reserved.