ModErn Text Analysis
META Enumerates Textual Applications
modified_huber.h
Go to the documentation of this file.
1 
9 #ifndef META_CLASSIFY_MODIFIED_HUBER_LOSS_H_
10 #define META_CLASSIFY_MODIFIED_HUBER_LOSS_H_
11 
13 
14 namespace meta
15 {
16 namespace classify
17 {
18 namespace loss
19 {
20 
28 {
32  const static std::string id;
33 
34  double loss(double prediction, int expected) const override;
35  double derivative(double prediction, int expected) const override;
36 };
37 }
38 }
39 }
40 #endif
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: modified_huber.cpp:27
The modified huber loss function for SGD algorithms.
Definition: modified_huber.h:27
static const std::string id
The identifier for this loss function.
Definition: modified_huber.h:32
Base class for all loss functions that can be passed to the sgd classifier.
Definition: loss_function.h:29
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
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: modified_huber.cpp:17