13 #ifndef MLPACK_METHODS_NCA_NCA_SOFTMAX_ERROR_FUNCTION_HPP
14 #define MLPACK_METHODS_NCA_NCA_SOFTMAX_ERROR_FUNCTION_HPP
42 template<
typename MetricType = metric::SquaredEucl
ideanDistance>
57 const arma::Row<size_t>& labels,
58 MetricType metric = MetricType());
72 double Evaluate(
const arma::mat& covariance);
86 double Evaluate(
const arma::mat& covariance,
88 const size_t batchSize = 1);
98 void Gradient(
const arma::mat& covariance, arma::mat& gradient);
115 template <
typename GradType>
116 void Gradient(
const arma::mat& covariance,
119 const size_t batchSize = 1);
137 arma::Row<size_t> labels;
143 arma::mat lastCoordinates;
145 arma::mat stretchedDataset;
150 arma::vec denominators;
168 void Precalculate(
const arma::mat& coordinates);
175 #include "nca_softmax_error_function_impl.hpp"