hinge_set: Calculate the hinge loss

Description Usage Arguments

Description

hinge_pred computes the in-sample hinge loss, given a set of predictions. hinge_w computes predictions, and passes these to hinge_pred to compute the in-sample hinge loss.

Usage

1
2
3
hinge_pred(pred, y, m = 1)

hinge_w(w, X, ...)

Arguments

pred

y predictions from the model w

y

outcome vector, with elements -1 or 1

m

margin parameter

w

weight vector (linear classification model). First element should be an interecept term. For example, the output of optimize_hinge_general.

X

covariate matrix, should not include a constant (intercept) column.

...

passed to hinge_pred


aaronjfisher/mcr documentation built on Jan. 2, 2020, 4:38 p.m.