diff --git a/src/ErrorFunction/ErrorFunctions.cpp b/src/ErrorFunction/ErrorFunctions.cpp index f785a08651211e07fdb69c6a9b502a70640bfa27..f876b1e29d96aed750623cc1e1376a359ff0f9fb 100644 --- a/src/ErrorFunction/ErrorFunctions.cpp +++ b/src/ErrorFunction/ErrorFunctions.cpp @@ -260,11 +260,11 @@ namespace lib4neuro { bool verbose) { std::ofstream ofs(results_file_path); if (ofs.is_open()) { - this->eval_on_data_set(data_set, - &ofs, - weights, - true, - verbose); + return this->eval_on_data_set(data_set, + &ofs, + weights, + true, + verbose); ofs.close(); } else { THROW_RUNTIME_ERROR("File " + results_file_path + " couldn't be open!"); @@ -274,21 +274,21 @@ namespace lib4neuro { double MSE::eval_on_data_set(DataSet* data_set, std::vector<double>* weights, bool verbose) { - this->eval_on_data_set(data_set, - nullptr, - weights, - true, - verbose); + return this->eval_on_data_set(data_set, + nullptr, + weights, + true, + verbose); } double MSE::eval(std::vector<double>* weights, bool denormalize_data, bool verbose) { - this->eval_on_data_set(this->ds, - nullptr, - weights, - denormalize_data, - verbose); + return this->eval_on_data_set(this->ds, + nullptr, + weights, + denormalize_data, + verbose); } double MSE::eval_on_test_data(std::vector<double>* weights,