This function implements the steepest descent algorithm with adaptative stepsize and scaled descent direction to solve the maximum likelihood optimization problem and get the diagonal of the precision matrix.

1 | ```
DESP_PEN_grad(S, B, init, kappa, thresh, stepsize, tol)
``` |

`S` |
The sample covariance matrix. |

`B` |
The coefficient matrix. |

`init` |
The starting vector of the iteration. |

`kappa` |
The tunning paramater. |

`thresh` |
The threshold level. |

`stepsize` |
The initial step-size. |

`tol` |
The gradient magnitude tolerance. |

This function returns the diagonal of the precision matrix associated with the sample covariance matrix S as a vector.

Arnak Dalalyan and Samuel Balmand.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.