22 #ifndef __MLPACK_METHODS_NCA_NCA_HPP
23 #define __MLPACK_METHODS_NCA_NCA_HPP
76 const arma::Col<size_t>&
labels,
77 MetricType
metric = MetricType());
96 const OptimizerType<SoftmaxErrorFunction<MetricType> >&
Optimizer()
const
98 OptimizerType<SoftmaxErrorFunction<MetricType> >&
Optimizer()
117 OptimizerType<SoftmaxErrorFunction<MetricType> >
optimizer;
124 #include "nca_impl.hpp"
SoftmaxErrorFunction< MetricType > errorFunction
The function to optimize.
MetricType metric
Metric to be used.
const arma::mat & dataset
Dataset reference.
The "softmax" stochastic neighbor assignment probability function.
OptimizerType< SoftmaxErrorFunction< MetricType > > optimizer
The optimizer to use.
LMetric< 2, false > SquaredEuclideanDistance
NCA(const arma::mat &dataset, const arma::Col< size_t > &labels, MetricType metric=MetricType())
Construct the Neighborhood Components Analysis object.
const OptimizerType< SoftmaxErrorFunction< MetricType > > & Optimizer() const
Get the optimizer.
const arma::mat & Dataset() const
Get the dataset reference.
std::string ToString() const
const arma::Col< size_t > & Labels() const
Get the labels reference.
Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...
An implementation of Neighborhood Components Analysis, both a linear dimensionality reduction techniq...
const arma::Col< size_t > & labels
Labels reference.
void LearnDistance(arma::mat &outputMatrix)
Perform Neighborhood Components Analysis.
OptimizerType< SoftmaxErrorFunction< MetricType > > & Optimizer()