|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.engine.network.activation.ActivationRamp
public class ActivationRamp
A ramp activation function. This function has a high and low threshold. If the high threshold is exceeded a fixed value is returned. Likewise, if the low value is exceeded another fixed value is returned.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
ActivationRamp()
Default constructor. |
|
ActivationRamp(double thresholdHigh,
double thresholdLow,
double high,
double low)
Construct a ramp activation function. |
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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.| Method Detail |
|---|
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 Object
public 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||