## org.apache.mahout.classifier.mlp
Class NeuralNetworkFunctions

    java.lang.Object
      org.apache.mahout.classifier.mlp.NeuralNetworkFunctions

    public class NeuralNetworkFunctions

extends Object

The functions that will be used by NeuralNetwork.

Field Summary
`static DoubleDoubleFunction` `crossEntropy` The cross entropy function (f(t, o) = -t * log(o) - (1 - t) * log(1 - o)).
`static DoubleDoubleFunction` `derivativeCrossEntropy` The derivation of cross entropy function (f(t, o) = -t * log(o) - (1 - t) * log(1 - o)).
`static DoubleFunction` `derivativeIdentityFunction` The derivation of identity function (f(x) = x).
`static DoubleDoubleFunction` `derivativeMinusSquared` The derivation of minus squared function (f(t, o) = (o - t)^2).

Constructor Summary
`NeuralNetworkFunctions()`

Method Summary
`static DoubleDoubleFunction` `getDerivativeDoubleDoubleFunction(String function)` Get the corresponding derivation of double double function by the name.
`static DoubleFunction` `getDerivativeDoubleFunction(String function)` Get the derivation double function by the name.
`static DoubleDoubleFunction` `getDoubleDoubleFunction(String function)` Get the corresponding double-double function by the name.
`static DoubleFunction` `getDoubleFunction(String function)` Get the corresponding function by its name.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### derivativeIdentityFunction

    public static DoubleFunction derivativeIdentityFunction

  The derivation of identity function (f(x) = x).

### derivativeMinusSquared

    public static DoubleDoubleFunction derivativeMinusSquared

  The derivation of minus squared function (f(t, o) = (o - t)^2).

### crossEntropy

    public static DoubleDoubleFunction crossEntropy

  The cross entropy function (f(t, o) = -t * log(o) - (1 - t) * log(1 - o)).

### derivativeCrossEntropy

    public static DoubleDoubleFunction derivativeCrossEntropy

  The derivation of cross entropy function (f(t, o) = -t * log(o) - (1 - t) * log(1 - o)).

Constructor Detail

### NeuralNetworkFunctions

    public NeuralNetworkFunctions()

Method Detail

### getDoubleFunction

    public static DoubleFunction getDoubleFunction(String function)

  Get the corresponding function by its name. Currently supports: "Identity", "Sigmoid".

  Parameters:
    `function` - The name of the function.
  Returns:
    The corresponding double function.

### getDerivativeDoubleFunction

    public static DoubleFunction getDerivativeDoubleFunction(String function)

  Get the derivation double function by the name. Currently supports: "Identity", "Sigmoid".

  Parameters:
    `function` - The name of the function.
  Returns:
    The double function.

### getDoubleDoubleFunction

    public static DoubleDoubleFunction getDoubleDoubleFunction(String function)

  Get the corresponding double-double function by the name. Currently supports: "Minus_Squared", "Cross_Entropy".

  Parameters:
    `function` - The name of the function.
  Returns:
    The double-double function.

### getDerivativeDoubleDoubleFunction

    public static DoubleDoubleFunction getDerivativeDoubleDoubleFunction(String function)

  Get the corresponding derivation of double double function by the name. Currently supports: "Minus_Squared", "Cross_Entropy".

  Parameters:
    `function` - The name of the function.
  Returns:
    The double-double-function.

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.