Small cleanups.

This commit is contained in:
Relintai 2023-04-28 21:07:46 +02:00
parent 6d5f66d9ff
commit b9eda1bb2d
2 changed files with 1 additions and 6 deletions

View File

@ -8,7 +8,6 @@
#include "../activation/activation.h" #include "../activation/activation.h"
#include "../cost/cost.h" #include "../cost/cost.h"
#include "../lin_alg/lin_alg.h"
#include "../regularization/reg.h" #include "../regularization/reg.h"
#include "../utilities/utilities.h" #include "../utilities/utilities.h"

View File

@ -5,8 +5,6 @@
// //
#include "uni_lin_reg.h" #include "uni_lin_reg.h"
#include "../lin_alg/lin_alg.h"
#include "../stat/stat.h" #include "../stat/stat.h"
// General Multivariate Linear Regression Model // General Multivariate Linear Regression Model
@ -53,9 +51,7 @@ void MLPPUniLinReg::train() {
} }
Ref<MLPPVector> MLPPUniLinReg::model_set_test(const Ref<MLPPVector> &x) { Ref<MLPPVector> MLPPUniLinReg::model_set_test(const Ref<MLPPVector> &x) {
MLPPLinAlg alg; return x->scalar_multiplyn(_b1)->scalar_addn(_b0);
return alg.scalar_addnv(_b0, alg.scalar_multiplynv(_b1, x));
} }
real_t MLPPUniLinReg::model_test(real_t x) { real_t MLPPUniLinReg::model_test(real_t x) {