#ifndef MLPP_REG_H #define MLPP_REG_H // // Reg.hpp // // Created by Marc Melikyan on 1/16/21. // #include "core/math/math_defs.h" #include #include class MLPPReg { public: real_t regTerm(std::vector weights, real_t lambda, real_t alpha, std::string reg); real_t regTerm(std::vector> weights, real_t lambda, real_t alpha, std::string reg); std::vector regWeights(std::vector weights, real_t lambda, real_t alpha, std::string reg); std::vector> regWeights(std::vector> weights, real_t lambda, real_t alpha, std::string reg); std::vector regDerivTerm(std::vector weights, real_t lambda, real_t alpha, std::string reg); std::vector> regDerivTerm(std::vector>, real_t lambda, real_t alpha, std::string reg); private: real_t regDerivTerm(std::vector weights, real_t lambda, real_t alpha, std::string reg, int j); real_t regDerivTerm(std::vector> weights, real_t lambda, real_t alpha, std::string reg, int i, int j); }; #endif /* Reg_hpp */