Packages

o

scalation.analytics

ActivationFun

object ActivationFun

The ActivationFun object contains common Activation functions and provides both scalar and vector versions.

See also

en.wikipedia.org/wiki/Activation_function Convention: fun activation function (e.g., sigmoid) funV vector version of activation function (e.g., sigmoidV) funM matrix version of activation function (e.g., sigmoidM) funDV vector version of dervivative (e.g., sigmoidDV) funDM matrix version of dervivative (e.g., sigmoidDM) ------------------------------------------------------------------------------ Supports: id, reLU, tanh, sigmoid, gaussain, softmax Related functions: logistic, logit

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ActivationFun
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def gaussian(t: Double): Double

    Compute the value of the 'gaussian' function at scalar 't'.

    Compute the value of the 'gaussian' function at scalar 't'.

    t

    the gaussian function argument

  10. def gaussianDM(yp: MatriD, tt: MatriD): MatriD

    Compute the derivative matrix for 'sigmoid' function at matrix 'yp' where 'yp' is pre-computed by 'yp = gaussianM (tt)'.

    Compute the derivative matrix for 'sigmoid' function at matrix 'yp' where 'yp' is pre-computed by 'yp = gaussianM (tt)'.

    yp

    the derivative function vector argument

    tt

    the domain value for the function

  11. def gaussianDV(yp: VectoD, tt: VectoD): VectoD

    Compute the derivative vector for 'gaussian' function at vector 'yp' where 'yp' is pre-computed by 'yp = gaussianV (tt)'.

    Compute the derivative vector for 'gaussian' function at vector 'yp' where 'yp' is pre-computed by 'yp = gaussianV (tt)'.

    yp

    the derivative function vector argument

    tt

    the domain value for the function

  12. val gaussianM: FunctionM_2M
  13. val gaussianV: FunctionV_2V
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def id(t: Double): Double

    Compute the value of the identity 'id' function at scalar 't'.

    Compute the value of the identity 'id' function at scalar 't'.

    t

    the id function argument

  17. val idDM: FunctionM_2M
  18. def idDV(yp: VectoD): VectoD

    Compute the derivative vector for 'id' function at vector 'yp' where 'yp' is pre-computed by 'yp = idV (tt)'.

    Compute the derivative vector for 'id' function at vector 'yp' where 'yp' is pre-computed by 'yp = idV (tt)'.

    yp

    the derivative function vector argument

  19. def idM(tt: MatriD): MatriD
  20. def idV(tt: VectoD): VectoD
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def logistic(t: Double, a: Double = 1.0, b: Double = 1.0, c: Double = 1.0): Double

    Compute the value of the 'logistic' function at scalar 't'.

    Compute the value of the 'logistic' function at scalar 't'. With the default settings, it is identical to 'sigmoid'. Note, it is not typically used as an activation function

    t

    the logistic function argument

    a

    the shift parameter (1 => mid at 0, <1 => mid shift left, >= mid shift right

    b

    the spread parameter (1 => sigmoid rate, <1 => slower than, >1 => faster than) althtough typically positive, a negative b will cause the function to decrease

    c

    the scale parameter (range is 0 to c)

    See also

    www.cs.xu.edu/math/math120/01f/logistic.pdf

  23. def logisticV(tt: VectoD, a: Double = 1.0, b: Double = 1.0, c: Double = 1.0): VectoD
  24. def logit(p: Double): Double

    Compute the log of the odds of an event occurring (e.g., success, 1).

    Compute the log of the odds of an event occurring (e.g., success, 1). The inverse of the 'logit' function is the standard logistic function (sigmoid function). Note, it is not typically used as an activation function

    p

    the probability, a number between 0 and 1.

  25. val logitV: FunctionV_2V
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def reLU(t: Double): Double

    Compute the value of the identity 'reLU' function at scalar 't'.

    Compute the value of the identity 'reLU' function at scalar 't'.

    t

    the id function argument

  30. val reLUDM: FunctionM_2M
  31. def reLUDV(yp: VectoD): VectoD

    Compute the derivative vector for 'id' function at vector 'yp' where 'yp' is pre-computed by 'yp = idV (tt)'.

    Compute the derivative vector for 'id' function at vector 'yp' where 'yp' is pre-computed by 'yp = idV (tt)'.

    yp

    the derivative function vector argument

  32. val reLUM: FunctionM_2M
  33. val reLUV: FunctionV_2V
  34. def sigmoid(t: Double): Double

    Compute the value of the 'sigmoid' function at 't'.

    Compute the value of the 'sigmoid' function at 't'. This is a special case of the logistic function, where 'a = 0' and 'b = 1'. It is also referred to as the standard logistic function. It is also the inverse of the logit function.

    t

    the sigmoid function argument

  35. val sigmoidDM: FunctionM_2M
  36. def sigmoidDV(yp: VectoD): VectoD

    Compute the derivative vector for 'sigmoid' function at vector 'yp' where 'yp' is pre-computed by 'yp = sigmoidV (tt)'.

    Compute the derivative vector for 'sigmoid' function at vector 'yp' where 'yp' is pre-computed by 'yp = sigmoidV (tt)'.

    yp

    the derivative function vector argument

  37. val sigmoidM: FunctionM_2M
  38. val sigmoidV: FunctionV_2V
  39. def softmaxDM(yp: VectoD): MatriD

    Compute the derivative vector for 'softmax' function at vector 'yp' where 'yp' is pre-computed by 'yp = softmaxV (tt)'.

    Compute the derivative vector for 'softmax' function at vector 'yp' where 'yp' is pre-computed by 'yp = softmaxV (tt)'.

    yp

    the derivative function vector argument

  40. val softmaxM: FunctionM_2M
  41. def softmaxV(tt: VectoD): VectoD

    Compute the vector of values of the 'softmax' function applied to vector 'tt'.

    Compute the vector of values of the 'softmax' function applied to vector 'tt'.

    tt

    the softmax function vector argument

    See also

    https://en.wikipedia.org/wiki/Softmax_function Note, scalar function version is not needed.

  42. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  43. val tanhDM: FunctionM_2M
  44. def tanhDV(yp: VectoD): VectoD

    Compute the derivative vector for 'tanh' function at vector 'yp' where 'yp' is pre-computed by 'yp = tanhV (tt)'.

    Compute the derivative vector for 'tanh' function at vector 'yp' where 'yp' is pre-computed by 'yp = tanhV (tt)'.

    yp

    the derivative function vector argument

  45. val tanhM: FunctionM_2M
  46. def tanhV(tt: VectoD): VectoD

    Compute the vector of values of the 'tanh' function applied to vector 'tt'.

    Compute the vector of values of the 'tanh' function applied to vector 'tt'.

    tt

    the tanh function vector argument

  47. def toString(): String
    Definition Classes
    AnyRef → Any
  48. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped