ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
classify
loss
huber.h
Go to the documentation of this file.
1
9
#ifndef META_CLASSIFY_HUBER_LOSS_H_
10
#define META_CLASSIFY_HUBER_LOSS_H_
11
12
#include <cmath>
13
#include "
classify/loss/loss_function.h
"
14
15
namespace
meta
16
{
17
namespace
classify
18
{
19
namespace
loss
20
{
21
28
struct
huber
:
public
loss_function
29
{
33
const
static
std::string
id
;
34
35
double
loss
(
double
prediction,
int
expected)
const override
;
36
double
derivative
(
double
prediction,
int
expected)
const override
;
37
};
38
}
39
}
40
}
41
#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::classify::loss::huber::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:
huber.cpp:17
meta::classify::loss::huber::id
static const std::string id
The identifier for this loss function.
Definition:
huber.h:33
meta::classify::loss::huber::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:
huber.cpp:25
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::huber
The huber loss for SGD algorithms.
Definition:
huber.h:28
loss_function.h
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1