org.encog.engine.network.activation
public class ActivationCompetitive extends Object implements ActivationFunction
| Modifier and Type | Field and Description |
|---|---|
static int |
PARAM_COMPETITIVE_MAX_WINNERS
The offset to the parameter that holds the max winners.
|
| Constructor and Description |
|---|
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.
|
| 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.
|
String |
getFactoryCode() |
int |
getMaxWinners() |
String[] |
getParamNames() |
double[] |
getParams() |
boolean |
hasDerivative() |
void |
setParam(int index,
double value)
Set one of the params for this activation function.
|
public static final int PARAM_COMPETITIVE_MAX_WINNERS
public ActivationCompetitive()
public ActivationCompetitive(int winners)
winners - The maximum number of winners that this function supports.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 int getMaxWinners()
public final String[] getParamNames()
getParamNames in interface ActivationFunctionpublic final double[] getParams()
getParams in interface ActivationFunctionpublic final boolean hasDerivative()
hasDerivative in interface ActivationFunctionpublic 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.