From b9eda1bb2d698bf57877a7a781b00c761cadf764 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 28 Apr 2023 21:07:46 +0200 Subject: [PATCH] Small cleanups. --- mlpp/tanh_reg/tanh_reg.cpp | 1 - mlpp/uni_lin_reg/uni_lin_reg.cpp | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/mlpp/tanh_reg/tanh_reg.cpp b/mlpp/tanh_reg/tanh_reg.cpp index 43968d8..498640e 100644 --- a/mlpp/tanh_reg/tanh_reg.cpp +++ b/mlpp/tanh_reg/tanh_reg.cpp @@ -8,7 +8,6 @@ #include "../activation/activation.h" #include "../cost/cost.h" -#include "../lin_alg/lin_alg.h" #include "../regularization/reg.h" #include "../utilities/utilities.h" diff --git a/mlpp/uni_lin_reg/uni_lin_reg.cpp b/mlpp/uni_lin_reg/uni_lin_reg.cpp index 721d08a..f547507 100644 --- a/mlpp/uni_lin_reg/uni_lin_reg.cpp +++ b/mlpp/uni_lin_reg/uni_lin_reg.cpp @@ -5,8 +5,6 @@ // #include "uni_lin_reg.h" - -#include "../lin_alg/lin_alg.h" #include "../stat/stat.h" // General Multivariate Linear Regression Model @@ -53,9 +51,7 @@ void MLPPUniLinReg::train() { } Ref MLPPUniLinReg::model_set_test(const Ref &x) { - MLPPLinAlg alg; - - return alg.scalar_addnv(_b0, alg.scalar_multiplynv(_b1, x)); + return x->scalar_multiplyn(_b1)->scalar_addn(_b0); } real_t MLPPUniLinReg::model_test(real_t x) {