Implements Multiclass hinge loss

Implements multiclass hinge loss. Fixes #3451 
I don't know what comment you're referring to, but assume it pertains to
`check_X_y`

On 17 September 2014 00:52, Manoj Kumar <notifications@github.com> wrote:

>  In sklearn/metrics/classification.py:
>
> > -    y_true = lbin.fit_transform(y_true)[:, 0]
> > -
> > -    if len(lbin.classes_) > 2 or (pred_decision.ndim == 2
> > -                                  and pred_decision.shape[1] != 1):
> > -        raise ValueError("Multi-class hinge loss not supported")
> > -    pred_decision = np.ravel(pred_decision)
> > -
> > -    try:
> > -        margin = y_true * pred_decision
> > -    except TypeError:
> > -        raise TypeError("pred_decision should be an array of floats.")
> > +    pred_decision = np.array(pred_decision)
> > +
> > +    if len(y_true) != pred_decision.shape[0]:
> > +        raise ValueError('Number of classes not equal\
> > +        to number of predictions')
>
> @jnothman <https://github.com/jnothman> @SaurabhJha
> <https://github.com/SaurabhJha> Sorry this was a highly pretentious
> comment by me.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/scikit-learn/scikit-learn/pull/3607/files#r17605967>.
>