34 #ifndef SHARK_OBJECTIVEFUNCTIONS_LOSS_ABSTRACTLOSS_H 35 #define SHARK_OBJECTIVEFUNCTIONS_LOSS_ABSTRACTLOSS_H 58 template<
class LabelT,
class OutputT = LabelT>
83 virtual double eval( BatchLabelType
const& target, BatchOutputType
const& prediction)
const = 0;
89 virtual double eval( ConstLabelReference target, ConstOutputReference prediction)
const{
94 return eval(labelBatch,predictionBatch);
102 virtual double evalDerivative(ConstLabelReference target, ConstOutputReference prediction, OutputType& gradient)
const {
108 double ret =
evalDerivative(labelBatch, predictionBatch, gradientBatch);
120 ConstLabelReference target, ConstOutputReference prediction,
121 OutputType& gradient,MatrixType & hessian
136 virtual double evalDerivative(BatchLabelType
const& target, BatchOutputType
const& prediction, BatchOutputType& gradient)
const 187 double operator () (LabelType
const& target, OutputType
const& prediction)
const 188 {
return eval(target, prediction); }
190 double operator () (BatchLabelType
const& target, BatchOutputType
const& prediction)
const 191 {
return eval(target, prediction); }
193 using base_type::operator();