32 #ifndef SHARK_OBJECTIVEFUNCTIONS_NOISYERRORFUNCTION_H 33 #define SHARK_OBJECTIVEFUNCTIONS_NOISYERRORFUNCTION_H 39 #include "Impl/FunctionWrapperBase.h" 41 #include <boost/scoped_ptr.hpp> 47 class NoisyErrorFunctionWrapperBase:
public FunctionWrapperBase{
49 std::size_t m_batchSize;
51 void setBatchSize(std::size_t batchSize){
52 m_batchSize = batchSize;
54 std::size_t batchSize()
const{
69 template<
class InputType,
class LabelType,
class OutputType>
74 std::size_t batchSize=1
81 {
return "NoisyErrorFunction"; }
83 void setBatchSize(std::size_t batchSize);
84 std::size_t batchSize()
const;
87 return mp_wrapper -> proposeStartingPoint();
90 return mp_wrapper -> numberOfVariables();
94 m_regularizer = regularizer;
95 m_regularizationStrength = factor;
98 double eval(RealVector
const& input)
const;
103 boost::scoped_ptr<detail::NoisyErrorFunctionWrapperBase> mp_wrapper;
106 double m_regularizationStrength;
111 #include "Impl/NoisyErrorFunction.inl"