SHOGUN
v3.2.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2013 Roman Votyakov 00008 * Copyright (C) 2012 Jacob Walker 00009 */ 00010 00011 #ifndef CMEANFUNCTION_H_ 00012 #define CMEANFUNCTION_H_ 00013 00014 #include <shogun/base/SGObject.h> 00015 #include <shogun/base/Parameter.h> 00016 #include <shogun/features/Features.h> 00017 00018 namespace shogun 00019 { 00020 00026 class CMeanFunction : public CSGObject 00027 { 00028 public: 00030 CMeanFunction() { } 00031 00032 virtual ~CMeanFunction() { } 00033 00040 virtual SGVector<float64_t> get_mean_vector(const CFeatures* features) const=0; 00041 00050 virtual SGVector<float64_t> get_parameter_derivative(const CFeatures* features, 00051 const TParameter* param, index_t index=-1) 00052 { 00053 SG_ERROR("Can't compute derivative wrt %s parameter\n", param->m_name) 00054 return SGVector<float64_t>(); 00055 } 00056 }; 00057 } 00058 #endif /* CMEANFUNCTION_H_ */