From 76d685cd2e19705d4b44d8a455fdfdddf9799ef2 Mon Sep 17 00:00:00 2001 From: Rishabh Garg <56191449+RishabhGarg108@users.noreply.github.com> Date: Fri, 16 Jul 2021 09:17:57 +0530 Subject: [PATCH] Fix static analysis error --- src/mlpack/methods/xgboost/loss_functions/sse_loss.hpp | 2 +- src/mlpack/tests/xgboost_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mlpack/methods/xgboost/loss_functions/sse_loss.hpp b/src/mlpack/methods/xgboost/loss_functions/sse_loss.hpp index d777ade217..d4ffe22c3c 100644 --- a/src/mlpack/methods/xgboost/loss_functions/sse_loss.hpp +++ b/src/mlpack/methods/xgboost/loss_functions/sse_loss.hpp @@ -55,7 +55,7 @@ class SSELoss * Returns the output value for the leaf in the tree. */ template - double OutputLeafValue(const MatType& input, + double OutputLeafValue(const MatType& /* input */, const WeightVecType& /* weights */) { return -ApplyL1(arma::accu(gradients)) / (arma::accu(hessians) + lambda); diff --git a/src/mlpack/tests/xgboost_test.cpp b/src/mlpack/tests/xgboost_test.cpp index f3904857ca..40c3fdfe11 100644 --- a/src/mlpack/tests/xgboost_test.cpp +++ b/src/mlpack/tests/xgboost_test.cpp @@ -44,7 +44,7 @@ TEST_CASE("SSELeafValueTest", "[XGBTest]") double leafValue = -0.075; SSELoss Loss; - double gain = Loss.Evaluate(input, weights); + double = Loss.Evaluate(input, weights); REQUIRE(Loss.OutputLeafValue(input, weights) == leafValue); }