ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
classify
loss
loss_function.h
Go to the documentation of this file.
1
9
#ifndef META_CLASSIFY_LOSS_FUNCTION_H_
10
#define META_CLASSIFY_LOSS_FUNCTION_H_
11
12
#include <string>
13
14
namespace
meta
15
{
16
namespace
classify
17
{
18
namespace
loss
19
{
20
29
struct
loss_function
30
{
41
virtual
double
loss
(
double
prediction,
int
expected)
const
= 0;
42
53
virtual
double
derivative
(
double
prediction,
int
expected)
const
= 0;
54
};
55
}
56
}
57
}
58
#endif
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
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
meta::classify::loss::loss_function::derivative
virtual double derivative(double prediction, int expected) const =0
The derivative of the loss function given a predicted value and the expected result of that predictio...
meta::classify::loss::loss_function::loss
virtual double loss(double prediction, int expected) const =0
The loss incurred in assigning the given prediction value, given the correct value of the prediction...
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1