22 #ifndef __MLPACK_CORE_KERNELS_POLYNOMIAL_KERNEL_HPP
23 #define __MLPACK_CORE_KERNELS_POLYNOMIAL_KERNEL_HPP
62 template<
typename VecType>
63 double Evaluate(
const VecType& a,
const VecType& b)
const
81 std::ostringstream convert;
82 convert <<
"PolynomialKernel [" <<
this <<
"]" << std::endl;
83 convert <<
" Degree: " <<
degree << std::endl;
84 convert <<
" Offset: " <<
offset << std::endl;
double degree
The degree of the polynomial.
PolynomialKernel(const double degree=2.0, const double offset=0.0)
Construct the Polynomial Kernel with the given offset and degree.
Linear algebra utility functions, generally performed on matrices or vectors.
double & Offset()
Modify the offset of the dot product of the arguments.
double Evaluate(const VecType &a, const VecType &b) const
Simple evaluation of the dot product.
std::string ToString() const
Return a string representation of the kernel.
const double & Offset() const
Get the offset of the dot product of the arguments.
const double & Degree() const
Get the degree of the polynomial.
double offset
The offset of the dot product of the arguments.
The simple polynomial kernel.
double & Degree()
Modify the degree of the polynomial.