86 #ifndef KERNEL_POLY_HH 87 #define KERNEL_POLY_HH 138 template<
typename ForwardIter,
typename Accessor>
148 template<
typename ForwardIter1,
typename Accessor1,
149 typename ForwardIter2,
typename Accessor2 >
166 template<
typename FV>
172 template<
typename STDATA>
176 stData.getValue(
"gamma",
p_gamma);
177 stData.getValue(
"coef0",
p_coef0);
178 stData.getValue(
"degree",
p_degree);
182 template<
typename STDATA>
186 stData.setValue(
"kernel_type",
name());
187 stData.setValue(
"gamma",
p_gamma);
188 stData.setValue(
"coef0",
p_coef0);
189 stData.setValue(
"degree",
p_degree);
199 return "polynomial kernel: (gamma*u'*v + coef0)^degree";
215 "gamma for polynomial kernel. (default 1)"));
218 "coef0 for polynomial kernel. (default 0)"));
221 "degree for polynomial kernel. (default 3)"));
void saveParameters(STDATA &stData) const
void updateCache(const ForwardIter1 &, const ForwardIter1 &, Accessor1, const ForwardIter2 &, const ForwardIter2 &, Accessor2, ProgressReporter *=0) const
#define CHECK_MEMBER_TEMPLATE(c)
double k_function(const FV &x, const FV &y) const
Kernel_POLY(double gamma=1., double coef0=0., double degree=3.)
void setDegree(double degree)
static const char * description()
static void getParamInfos(std::vector< ParamInfo > &p)
get information about the parameters, that are used in loadParameters() and saveParameters().
void setGamma(double gamma)
void updateCache(const ForwardIter &, const ForwardIter &, Accessor, ProgressReporter *) const
void loadParameters(STDATA &stData)
static const char * name()
The ParamInfo class contains informations about one parameter like key, help text, guiHints etc.
void setCoef0(double coef0)
Polynomial< CoeffT > pow(const Polynomial< CoeffT > &p, int exponential)
Power operator.
The Kernel_POLY class specifies a polynomial kernel function: (gamma*u'*v + coef0)^degree.