Description Usage Arguments Value See Also

Evaluates the logistic regression objective function value for a given model. See details. Computes the objective function value according to

* -\frac{1}{n} ∑_i y_i s_i - \log( 1 + \exp(s_i) ) + R(w) *

where

* s_i = w^T x_i + b *

* R(w) = λ_1 ∑_j d_j |w_j| + \frac{λ_2}{2} (w-m)^T P (w-m) *

When balanced is TRUE, the loss average over the entire data is replaced with averaging over each class separately. The total loss is then computes as the mean over those per-class estimates.

1 2 |

`w` |
p-by-1 vector of model weights |

`b` |
the model bias term |

`X` |
n-by-p matrix of n samples in p dimensions |

`y` |
n-by-1 binary response vector sampled from 0,1 |

`l1` |
L1-norm penalty scaling factor |

`l2` |
L2-norm penalty scaling factor |

`d` |
p-by-1 vector of feature weights |

`P` |
p-by-p feature-feature penalty matrix |

`m` |
p-by-1 vector of translation coefficients |

`balanced` |
boolean specifying whether the balanced model is being evaluated |

The objective function value.

gelnet documentation built on May 2, 2019, 2:10 p.m.

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.