The simple linear kernel (dot product).
LinearKernel ()
This constructor does nothing; the linear kernel has no parameters to store. std::string ToString () const
Return a string representation of the kernel.
template<typename VecType > static double Evaluate (const VecType &a, const VecType &b)
Simple evaluation of the dot product.
The simple linear kernel (dot product).
For any two vectors $ x $ and $ y $,
\[ K(x, y) = x^T y \].PP This kernel has no parameters and therefore the evaluation can be static.
Definition at line 42 of file linear_kernel.hpp.
This constructor does nothing; the linear kernel has no parameters to store.
Definition at line 49 of file linear_kernel.hpp.
Simple evaluation of the dot product. This evaluation uses Armadillo's dot() function.
Template Parameters:
VecType Type of vector (should be arma::vec or arma::spvec).
Parameters:
a First vector.
b Second vector.
Returns:
K(a, b).
Definition at line 61 of file linear_kernel.hpp.
Return a string representation of the kernel.
Definition at line 67 of file linear_kernel.hpp.
Generated automatically by Doxygen for MLPACK from the source code.