|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.engine.network.activation.ActivationCompetitive
public class ActivationCompetitive
An activation function that only allows a specified number, usually one, of the out-bound connection to win. These connections will share in the sum of the output, whereas the other neurons will receive zero. This activation function can be useful for "winner take all" layers.
| Field Summary | |
|---|---|
static int |
PARAM_COMPETITIVE_MAX_WINNERS
The offset to the parameter that holds the max winners. |
| Constructor Summary | |
|---|---|
ActivationCompetitive()
Create a competitive activation function with one winner allowed. |
|
ActivationCompetitive(int winners)
Create a competitive activation function with the specified maximum number of winners. |
|
| Method Summary | |
|---|---|
void |
activationFunction(double[] x,
int start,
int size)
Implements the activation function. |
ActivationFunction |
clone()
|
double |
derivativeFunction(double b,
double a)
Implements the activation function. |
int |
getMaxWinners()
|
String[] |
getParamNames()
|
double[] |
getParams()
|
boolean |
hasDerivative()
|
void |
setParam(int index,
double value)
Set one of the params for this activation function. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PARAM_COMPETITIVE_MAX_WINNERS
| Constructor Detail |
|---|
public ActivationCompetitive()
public ActivationCompetitive(int winners)
winners - The maximum number of winners that this function supports.| 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 ActivationFunctiond - The input array to the activation function.
public final int getMaxWinners()
public final String[] getParamNames()
getParamNames in interface ActivationFunctionpublic final double[] getParams()
getParams in interface ActivationFunctionpublic final boolean hasDerivative()
hasDerivative in interface ActivationFunction
public final void setParam(int index,
double value)
setParam in interface ActivationFunctionindex - The index of the param to set.value - The value to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||