diff --git a/src/machine_learning/loss_functions/mean_squared_error.h b/src/machine_learning/loss_functions/mean_squared_error.h deleted file mode 100644 index 666b531b..00000000 --- a/src/machine_learning/loss_functions/mean_squared_error.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef MEAN_SQUARED_ERROR_H -#define MEAN_SQUARED_ERROR_H - -#ifdef __cplusplus -#include -#include -#include -#include -#include -#endif - - -namespace losses { - float mean_squared_error(std::vector const& y, std::vector const& y_hat) { - assert(y.size() == y_hat.size()); - size_t n = y.size(); - float mse = 0.0; - for(size_t i = 0; i const& y, std::vector const& y_hat) { - return std::sqrt(mean_squared_error(y, y_hat)); - } - - float mean_absolute_error(std::vector const& y, std::vector const& y_hat) { - assert(y.size() == y_hat.size()); - size_t n = y.size(); - float mae = 0.0; - for(size_t i = 0; i const& y, std::vector const& y_hat) { - assert(y.size() == y_hat.size()); - size_t n = y.size(); - float bce = 0.0; - for(size_t i = 0; i const& y, std::vector const& y_hat) { - assert(y.size() == y_hat.size()); - size_t n = y.size(); - float ce = 0.0; - for(size_t i = 0; i