root

deer.root(func: Callable[[Array, Any], Array], y0: Array, params: Any, method: RootMethod | None = None) Result[source]

Solve the root of the function,

\[f(y; \theta) = 0\]
Parameters:
  • func (Callable[[jnp.ndarray, Any], jnp.ndarray]) – The function to find the root. The function that takes the current value of the root and the parameters.

  • y0 (jnp.ndarray) – The initial guess of the root.

  • params (Any) – The parameters of the function.

  • method (Optional[RootMethod]) – The method to solve the root. If None, then use the Newton() method.

Returns:

res – The result of the root finding.

Return type:

Result

method=root.Newton()
root.Newton(max_iter: int = 100, atol: float = 1e-06, rtol: float = 0.001)

Compute the root-finding method using Newton’s method