12 #ifndef MLPACK_METHODS_CF_AVERAGE_INTERPOLATION_HPP 13 #define MLPACK_METHODS_CF_AVERAGE_INTERPOLATION_HPP 63 template
(neighbors.n_elem == 0)
<< "Require: neighbors.n_elem > 0. There should be at "
<< "least one neighbor!"
(weights.n_elem != neighbors.n_elem)
<< "The size of the first parameter (weights) should "
<< "be set to the number of neighbors before calling GetWeights()."
weights.fill(1.0 / neighbors.n_elem);
AverageInterpolation(const arma::sp_mat &)
This constructor is needed for interface consistency.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This class performs average interpolation to generate interpolation weights for neighborhood-based co...
static MLPACK_EXPORT util::PrefixedOutStream Fatal
Prints fatal messages prefixed with [FATAL], then terminates the program.
void GetWeights(VectorType &&weights, const DecompositionPolicy &, const size_t, const arma::Col< size_t > &neighbors, const arma::vec &, const arma::sp_mat &)
Interoplation weights are identical and sum up to one.