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, lreLU, eLU, tanh, sigmoid, gaussian, 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. Protected

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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def eLU(t: Double): Double

    Compute the value of the Exponential Linear Unit 'eLU' function at scalar 't'.

    Compute the value of the Exponential Linear Unit 'eLU' function at scalar 't'.

    t

    the eLU function argument

  7. val eLUDM: FunctionM_2M
  8. def eLUDV(yp: VectoD): VectoD

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

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

    yp

    the derivative function vector argument

  9. val eLUM: FunctionM_2M
  10. val eLUV: FunctionV_2V
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. val f_eLU: AFF
  14. val f_id: AFF
  15. val f_lreLU: AFF
  16. val f_reLU: AFF
  17. val f_sigmoid: AFF
  18. val f_softmax: AFF

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

  19. val f_tanh: AFF
  20. 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

  21. 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

  22. 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

  23. val gaussianM: FunctionM_2M
  24. val gaussianV: FunctionV_2V
  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. 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

  28. val idDM: FunctionM_2M
  29. 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

  30. def idM(tt: MatriD): MatriD
  31. def idV(tt: VectoD): VectoD
  32. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  33. 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

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

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

    Compute the log of the odds (Logit) 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.

  36. val logitV: FunctionV_2V
  37. def lreLU(t: Double): Double

    Compute the value of the Leaky Rectified Linear Unit 'lreLU' function at scalar 't'.

    Compute the value of the Leaky Rectified Linear Unit 'lreLU' function at scalar 't'.

    t

    the lreLU function argument

  38. val lreLUDM: FunctionM_2M
  39. def lreLUDV(yp: VectoD): VectoD

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

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

    yp

    the derivative function vector argument

  40. val lreLUM: FunctionM_2M
  41. val lreLUV: FunctionV_2V
  42. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  43. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  44. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  45. def reLU(t: Double): Double

    Compute the value of the Rectified Linear Unit 'reLU' function at scalar 't'.

    Compute the value of the Rectified Linear Unit 'reLU' function at scalar 't'.

    t

    the reLU function argument

  46. val reLUDM: FunctionM_2M
  47. def reLUDV(yp: VectoD): VectoD

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

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

    yp

    the derivative function vector argument

  48. val reLUM: FunctionM_2M
  49. val reLUV: FunctionV_2V
  50. def setA(a_: Double): Unit

    Set the lreLU 'a' (alpha) parameter for the Leaky Rectified Linear Unit functions.

  51. def setA2(a_: Double): Unit

    Set the eLU 'a2' (alpha) parameter for the Exponential Linear Unit functions.

    Set the eLU 'a2' (alpha) parameter for the Exponential Linear Unit functions.

    a_

    the eLU alpha parameter (0, infinity) indicating how leaky the function is

  52. 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

  53. val sigmoidDM: FunctionM_2M
  54. 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

  55. val sigmoidM: FunctionM_2M
  56. val sigmoidV: FunctionV_2V
  57. val softmaxDM: FunctionM_2M
  58. def softmaxDV(yp: VectoD): VectoD

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

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

    yp

    the derivative function vector argument

  59. val softmaxM: FunctionM_2M
  60. 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 'softmax' is not needed.

  61. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  62. val tanhDM: FunctionM_2M
  63. 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

  64. val tanhM: FunctionM_2M
  65. 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

  66. def toString(): String
    Definition Classes
    AnyRef → Any
  67. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  68. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  69. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped