|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.kmeans.Gaussian
public class Gaussian
This class implements the Gaussian activation function.
| Field Summary | |
|---|---|
static float |
DEF_MU
Default value of mu. |
static float |
DEF_SIGMA
Default value of sigma. |
static float |
MIN_SIGMA
Minimum value for sigma. |
| Constructor Summary | |
|---|---|
Gaussian()
Default constructor. |
|
| Method Summary | |
|---|---|
float |
getMu()
Accessor for Gaussian mu (mean) parameter. |
float |
getOutput(float x)
Calculate the value of a Gaussian function for a given input. |
float |
getOutputPrime(float x)
Calculate the value of the derivative of a Gaussian function for a given input. |
float |
getSigma()
Accessor for Gaussian sigma (std. dev.) parameter. |
void |
initDefaults()
Initialize the function parameters to their default values. |
static void |
main(java.lang.String[] args)
DOCUMENT ME! |
void |
setMu(float m)
Mutator for Gaussian mu parameter. |
void |
setSigma(float s)
Mutator for Gaussian sigma parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final float DEF_MU
public static final float MIN_SIGMA
public static final float DEF_SIGMA
| Constructor Detail |
|---|
public Gaussian()
| Method Detail |
|---|
public float getMu()
public void setMu(float m)
m - m - the new value for mu.public float getSigma()
public void setSigma(float s)
s - s - the new value for sigma.public void initDefaults()
public float getOutput(float x)
1 -(x-mu)^2 / (2 * sigma^2) y = ------------------- * e (2 * pi * sigma)^0.5The variable k1 holds the value of the first term, and k2 holds the value of the 1 / (2 simga^2) term for the current value of sigma.
x - - the input value.
public float getOutputPrime(float x)
y'(x) = y(x) * -2k2(x - mu)The variable k1 holds the value of the first term, and k2 holds the value of the 1 / (2 simga^2) term for the current value of sigma.
x - - the input value.
public static void main(java.lang.String[] args)
args - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||