JsNativeDoubleArrays
vecxt.JsNativeDoubleArrays
object JsNativeDoubleArrays
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JsNativeDoubleArrays.type
Members list
Extensions
Extensions
extension (d: Double)
extension (m: Matrix[Double])
extension (vec: Array[Double])
The formula for the logarithm of the sum of exponentials is:
The formula for the logarithm of the sum of exponentials is:
logSumExp(x) = log(sum(exp(x_i))) for i = 1 to n
This is computed in a numerically stable way by subtracting the maximum value in the array before taking the exponentials:
logSumExp(x) = max(x) + log(sum(exp(x_i - max(x)))) for i = 1 to n
Attributes
extension (vec: Array[Int])
In this article