rStats.js v1.3.0
    Preparing search index...

    Function jacobian

    • Jacobian of a vector function of a vector: row i holds the derivatives of the i-th value. Equivalent to numDeriv::jacobian(func, x, method) in R.

      Parameters

      • func: (x: number[]) => readonly number[]
      • x: readonly number[]
      • options: DerivOptions = {}

      Returns number[][]

      jacobian((x) => [x[0]! * x[1]!, x[0]! + 2 * x[1]!], [2, 3]); // [[3, 2], [1, 2]]