Adapt wording and use Log:Assert instead of assert to fix the unused parameter warning.

This commit is contained in:
Marcus Edel
2019-08-14 19:23:45 +02:00
parent e581aa757f
commit 06a40697ac
6 changed files with 6 additions and 7 deletions
@@ -74,7 +74,7 @@ class MaxAbsScaler
if (scale.is_empty())
{
throw std::runtime_error("Call Fit() before Transform(), please"
" refer documentation.");
" refer to the documentation.");
}
output.copy_size(input);
output = input.each_col() / scale;
@@ -75,7 +75,7 @@ class MeanNormalization
if (itemMean.is_empty() || scale.is_empty())
{
throw std::runtime_error("Call Fit() before Transform(), please"
" refer documentation.");
" refer to the documentation.");
}
output.copy_size(input);
output = (input.each_col() - itemMean).each_col() / scale;
@@ -97,7 +97,7 @@ class MinMaxScaler
if (scalerowmin.is_empty() || scale.is_empty())
{
throw std::runtime_error("Call Fit() before Transform(), please"
" refer documentation.");
" refer to the documentation.");
}
output.copy_size(input);
output = (input.each_col() % scale).each_col() + scalerowmin;
@@ -88,7 +88,7 @@ class PCAWhitening
if (eigenValues.is_empty() || eigenVectors.is_empty())
{
throw std::runtime_error("Call Fit() before Transform(), please"
" refer documentation.");
" refer to the documentation.");
}
output.copy_size(input);
output = (input.each_col() - itemMean);
@@ -74,7 +74,7 @@ class StandardScaler
if (itemMean.is_empty() || itemStdDev.is_empty())
{
throw std::runtime_error("Call Fit() before Transform(), please"
" refer documentation.");
" refer to the documentation.");
}
output.copy_size(input);
output = (input.each_col() - itemMean).each_col() / itemStdDev;
@@ -95,8 +95,7 @@ class HardCodedSortModel
void Train(arma::field<arma::mat>& predictors,
arma::field<arma::mat>& labels)
{
const bool check = predictors.n_elem == labels.n_elem;
assert(check == true);
Log::Assert(check = predictors.n_elem == labels.n_elem);
}
void Predict(arma::mat& predictors,