Fix spacing and make method const.

This commit is contained in:
Ryan Curtin
2016-06-01 12:35:50 -07:00
parent dca52fd2ed
commit eba4f99246
2 changed files with 3 additions and 2 deletions
@@ -121,7 +121,8 @@ class SoftmaxRegression
* @param testData Matrix of data points using which predictions are made.
* @param labels Vector of labels associated with the data.
*/
double ComputeAccuracy(const arma::mat& testData, const arma::Row<size_t>& labels);
double ComputeAccuracy(const arma::mat& testData,
const arma::Row<size_t>& labels) const;
/**
* Train the softmax regression model with the given optimizer.
@@ -117,7 +117,7 @@ void SoftmaxRegression<OptimizerType>::Predict(const arma::mat& testData,
template<template<typename> class OptimizerType>
double SoftmaxRegression<OptimizerType>::ComputeAccuracy(
const arma::mat& testData,
const arma::Row<size_t>& labels)
const arma::Row<size_t>& labels) const
{
arma::Row<size_t> predictions;