ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
classify
loss
hinge.h
Go to the documentation of this file.
1
9
#ifndef META_CLASSIFY_HINGE_LOSS_H_
10
#define META_CLASSIFY_HINGE_LOSS_H_
11
12
#include <algorithm>
13
#include "
classify/loss/loss_function.h
"
14
15
namespace
meta
16
{
17
namespace
classify
18
{
19
namespace
loss
20
{
21
31
struct
hinge
:
public
loss_function
32
{
36
const
static
std::string
id
;
37
38
double
loss
(
double
prediction,
int
expected)
const override
;
39
double
derivative
(
double
prediction,
int
expected)
const override
;
40
};
41
}
42
}
43
}
44
#endif
meta::classify::loss::hinge::derivative
double derivative(double prediction, int expected) const override
The derivative of the loss function given a predicted value and the expected result of that predictio...
Definition:
hinge.cpp:25
meta::classify::loss::loss_function
Base class for all loss functions that can be passed to the sgd classifier.
Definition:
loss_function.h:29
meta::classify::loss::hinge::loss
double loss(double prediction, int expected) const override
The loss incurred in assigning the given prediction value, given the correct value of the prediction...
Definition:
hinge.cpp:17
meta
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition:
analyzer.h:24
loss_function.h
meta::classify::loss::hinge
The hinge loss for SGD algorithms.
Definition:
hinge.h:31
meta::classify::loss::hinge::id
static const std::string id
The identifier for this loss function.
Definition:
hinge.h:36
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1