Description Usage Arguments Details Value

This function obtains the minimum-norm subgradient of the approximated square error with L1 norm penalty or L2 norm penalty.

1 | ```
subgradient(w, X, y, nHidden, lambda, lambda2)
``` |

`w` |
(numeric, |

`X` |
(numeric, |

`y` |
(numeric, |

`nHidden` |
(positive integer, |

`lambda` |
(numeric, |

`lambda2` |
(numeric, |

It is based on choosing a subgradient with minimum norm as a steepest descent direction and taking a step resembling Newton iteration in this direction with a Hessian approximation.

A vector with the subgradient values.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.