|
||||||||||
| 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 d)
Calculate the derivative of the activation. |
double |
getHigh()
|
double |
getLow()
|
String |
getOpenCLExpression(boolean derivative)
Returns the OpenCL expression for this activation function. |
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(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 ActivationRamp()
| Method Detail |
|---|
public ActivationFunction clone()
clone in interface ActivationFunctionclone in class Objectpublic double getHigh()
public double getLow()
public double getThresholdHigh()
public double getThresholdLow()
public boolean hasDerivative()
hasDerivative in interface ActivationFunctionpublic void setThresholdLow(double d)
d - The threshold low.public void setThresholdHigh(double d)
d - The threshold high.public void setLow(double d)
d - The low value.public void setHigh(double d)
d - The high value.
public 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 double derivativeFunction(double d)
derivativeFunction in interface ActivationFunctiond - The input array to the activation function.
public String[] getParamNames()
getParamNames in interface ActivationFunctionpublic double[] getParams()
getParams in interface ActivationFunction
public void setParam(int index,
double value)
setParam in interface ActivationFunctionindex - The index of the param to set.value - The value to set.public String getOpenCLExpression(boolean derivative)
getOpenCLExpression in interface ActivationFunctionderivative - True if we want the derivative, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||