Commit 82e6fafe authored by Michal Kravcenko's avatar Michal Kravcenko

MOD: added export information to a few learning methods

parent 732adc79
......@@ -173,7 +173,6 @@ namespace lib4neuro {
for (size_t i = 0; i < data->size(); i++) {
/* Compute difference for every element of the output vector */
#ifdef L4N_DEBUG
std::stringstream ss_input;
for (size_t j = 0; j < dim_in; j++) {
denormalized_real_input = data_set->get_denormalized_value(data->at(i).first.at(j));
......@@ -183,7 +182,6 @@ namespace lib4neuro {
std::stringstream ss_real_output;
std::stringstream ss_predicted_output;
#endif
double loc_error = 0;
output_norm = 0;
......@@ -192,11 +190,9 @@ namespace lib4neuro {
denormalized_real_output = data_set->get_denormalized_value(data->at(i).second.at(j));
denormalized_output = data_set->get_denormalized_value(outputs.at(i).at(j));
#ifdef L4N_DEBUG
ss_real_output << separator << denormalized_real_output;
ss_predicted_output << separator << denormalized_output;
separator = ",";
#endif
val = denormalized_output - denormalized_real_output;
loc_error += val * val;
......@@ -205,9 +201,9 @@ namespace lib4neuro {
output_norm += denormalized_output * denormalized_output;
}
#ifdef L4N_DEBUG
std::stringstream ss_ind;
ss_ind << "[" << i << "]";
#ifdef L4N_DEBUG
if (verbose) {
COUT_DEBUG(R_ALIGN << ss_ind.str() << " "
......@@ -220,6 +216,8 @@ namespace lib4neuro {
<< std::endl);
}
#endif
if (results_file_path) {
*results_file_path << R_ALIGN << ss_ind.str() << " "
<< R_ALIGN << ss_input.str() << " "
......@@ -230,7 +228,6 @@ namespace lib4neuro {
<< 200.0 * std::sqrt(loc_error) / (std::sqrt(loc_error) + std::sqrt(output_norm))
<< std::endl;
}
#endif
}
double result = std::sqrt(error) / n_elements;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment