diff --git a/src/mlpack/core/cv/metrics/roc_auc_score_impl.hpp b/src/mlpack/core/cv/metrics/roc_auc_score_impl.hpp index 2b4a487559..edaca792d6 100644 --- a/src/mlpack/core/cv/metrics/roc_auc_score_impl.hpp +++ b/src/mlpack/core/cv/metrics/roc_auc_score_impl.hpp @@ -29,11 +29,11 @@ double ROCAUCScore::Evaluate(const arma::Row& labels, } // Compute labels with "1" for positive class and "0" for the other. - arma::Col binaryLabels = arma::conv_to>::from( + arma::Col binaryLabels = ConvTo>::from( (labels == PositiveClass)); // Converting probability scores of PositiveClass, from row to column vector. - arma::vec colScores = arma::conv_to::from(scores); + arma::vec colScores = ConvTo::from(scores); size_t numberOfTrueLabels = sum(binaryLabels); size_t numberOfFalseLabels = binaryLabels.n_rows - numberOfTrueLabels; @@ -69,7 +69,7 @@ double ROCAUCScore::Evaluate(const arma::Row& labels, cumulativeSum = cumulativeSum(uniqueScoreIndices); arma::vec tpr, fpr; - tpr = arma::conv_to::from(cumulativeSum); + tpr = ConvTo::from(cumulativeSum); fpr = 1 + uniqueScoreIndices - tpr; tpr /= numberOfTrueLabels; fpr /= numberOfFalseLabels; diff --git a/src/mlpack/core/data/load_image_impl.hpp b/src/mlpack/core/data/load_image_impl.hpp index b790782188..49776e50f7 100644 --- a/src/mlpack/core/data/load_image_impl.hpp +++ b/src/mlpack/core/data/load_image_impl.hpp @@ -40,7 +40,7 @@ bool Load(const std::string& filename, return false; } - matrix = arma::conv_to>::from(tempMatrix); + matrix = ConvTo>::from(tempMatrix); Timer::Stop("loading_image"); return true; } @@ -86,7 +86,7 @@ bool Load(const std::vector& files, return false; } - matrix = arma::conv_to>::from(tmpMatrix); + matrix = ConvTo>::from(tmpMatrix); return true; } diff --git a/src/mlpack/core/data/save_image_impl.hpp b/src/mlpack/core/data/save_image_impl.hpp index e14d56bcb4..24848c3633 100644 --- a/src/mlpack/core/data/save_image_impl.hpp +++ b/src/mlpack/core/data/save_image_impl.hpp @@ -34,7 +34,7 @@ bool Save(const std::string& filename, const bool fatal) { arma::Mat tmpMatrix = - arma::conv_to>::from(matrix); + ConvTo>::from(matrix); return SaveImage(filename, tmpMatrix, info, fatal); } @@ -139,7 +139,7 @@ inline bool SaveImage(const std::string& filename, else if ("hdr" == Extension(filename)) { // We'll have to convert to float... - arma::fmat tmpImage = arma::conv_to::from(image); + arma::fmat tmpImage = ConvTo::from(image); status = stbi_write_hdr(filename.c_str(), info.Width(), info.Height(), info.Channels(), tmpImage.memptr()); }