Cost function interface. More...
#include <shark/ObjectiveFunctions/AbstractCost.h>
Inheritance diagram for shark::AbstractCost< LabelT, OutputT >:Public Types | |
| enum | Feature { HAS_FIRST_DERIVATIVE = 1, HAS_SECOND_DERIVATIVE = 2, IS_LOSS_FUNCTION = 4 } |
| list of features a cost function can have More... | |
| typedef OutputT | OutputType |
| typedef LabelT | LabelType |
| typedef Batch< OutputType >::type | BatchOutputType |
| typedef Batch< LabelType >::type | BatchLabelType |
| typedef TypedFlags< Feature > | Features |
| typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
Public Member Functions | |
| virtual | ~AbstractCost () |
| const Features & | features () const |
| virtual void | updateFeatures () |
| bool | hasFirstDerivative () const |
| returns true when the first parameter derivative is implemented More... | |
| bool | isLossFunction () const |
| returns true when the cost function is in fact a loss function More... | |
| virtual double | eval (Data< LabelType > const &targets, Data< OutputType > const &predictions) const =0 |
| double | operator() (Data< LabelType > const &targets, Data< OutputType > const &predictions) const |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
| virtual std::string | name () const |
| returns the name of the object More... | |
Protected Attributes | |
| Features | m_features |
Cost function interface.
Definition at line 68 of file AbstractCost.h.
| typedef Batch<LabelType>::type shark::AbstractCost< LabelT, OutputT >::BatchLabelType |
Definition at line 74 of file AbstractCost.h.
| typedef Batch<OutputType>::type shark::AbstractCost< LabelT, OutputT >::BatchOutputType |
Definition at line 73 of file AbstractCost.h.
| typedef TypedFeatureNotAvailableException<Feature> shark::AbstractCost< LabelT, OutputT >::FeatureNotAvailableException |
Definition at line 86 of file AbstractCost.h.
| typedef TypedFlags<Feature> shark::AbstractCost< LabelT, OutputT >::Features |
Definition at line 86 of file AbstractCost.h.
| typedef LabelT shark::AbstractCost< LabelT, OutputT >::LabelType |
Definition at line 72 of file AbstractCost.h.
| typedef OutputT shark::AbstractCost< LabelT, OutputT >::OutputType |
Definition at line 71 of file AbstractCost.h.
| enum shark::AbstractCost::Feature |
list of features a cost function can have
| Enumerator | |
|---|---|
| HAS_FIRST_DERIVATIVE | |
| HAS_SECOND_DERIVATIVE | |
| IS_LOSS_FUNCTION | |
Definition at line 80 of file AbstractCost.h.
|
inlinevirtual |
Definition at line 76 of file AbstractCost.h.
|
pure virtual |
Evaluates the cost of predictions, given targets.
| targets | target values |
| predictions | predictions, typically made by a model |
Implemented in shark::NegativeWilcoxonMannWhitneyStatistic< LabelType, OutputType >, shark::AbstractLoss< LabelT, OutputT >, shark::AbstractLoss< Sequence, Sequence >, shark::AbstractLoss< unsigned int, unsigned int >, shark::AbstractLoss< RealVector, RealVector >, shark::AbstractLoss< unsigned int, OutputType >, shark::AbstractLoss< LabelType, OutputType >, shark::AbstractLoss< VectorType, VectorType >, shark::AbstractLoss< LabelType, LabelType >, shark::AbstractLoss< unsigned int, RealVector >, and shark::NegativeAUC< LabelType, OutputType >.
Referenced by shark::CrossValidationError< ModelTypeT, LabelTypeT >::eval(), shark::AbstractCost< unsigned int, RealVector >::isLossFunction(), and shark::AbstractCost< unsigned int, RealVector >::operator()().
|
inline |
Definition at line 86 of file AbstractCost.h.
|
inline |
returns true when the first parameter derivative is implemented
Definition at line 89 of file AbstractCost.h.
|
inline |
returns true when the cost function is in fact a loss function
Definition at line 98 of file AbstractCost.h.
|
inline |
Definition at line 107 of file AbstractCost.h.
|
inlinevirtual |
Definition at line 86 of file AbstractCost.h.
|
protected |