18 #ifndef __MLPACK_CORE_KERNELS_PSPECTRUM_STRING_KERNEL_HPP
19 #define __MLPACK_CORE_KERNELS_PSPECTRUM_STRING_KERNEL_HPP
90 template<
typename VecType>
91 double Evaluate(
const VecType& a,
const VecType& b)
const;
94 const std::vector<std::vector<std::map<std::string, int> > >&
Counts()
const
97 std::vector<std::vector<std::map<std::string, int> > >&
Counts()
101 size_t P()
const {
return p; }
103 size_t&
P() {
return p; }
107 const std::vector<std::vector<std::string> >&
datasets;
111 std::vector<std::vector<std::map<std::string, int> > >
counts;
121 #include "pspectrum_string_kernel_impl.hpp"
Linear algebra utility functions, generally performed on matrices or vectors.
const std::vector< std::vector< std::string > > & datasets
The datasets.
size_t & P()
Modify the value of p.
const std::vector< std::vector< std::map< std::string, int > > > & Counts() const
Access the lists of substrings.
double Evaluate(const VecType &a, const VecType &b) const
Evaluate the kernel for the string indices given.
PSpectrumStringKernel(const std::vector< std::vector< std::string > > &datasets, const size_t p)
Initialize the PSpectrumStringKernel with the given string datasets.
size_t p
The value of p to use in calculation.
The p-spectrum string kernel.
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
std::vector< std::vector< std::map< std::string, int > > > counts
Mappings of the datasets to counts of substrings.
std::vector< std::vector< std::map< std::string, int > > > & Counts()
Modify the lists of substrings.
size_t P() const
Access the value of p.