Commit 971c4a5f authored by Michal Kravcenko's avatar Michal Kravcenko

MOD: changed the normalization strategy, as its non-linear nature caused several problems

parent 2da77a30
......@@ -35,7 +35,8 @@ double DoubleUnitStrategy::normalize(double n,
this->max_min_inp_val.at(1) = min;
}
return 2 * (n - min) / (max - min) - 1;
// return 2 * (n - min) / (max - min) - 1;
return n / (this->get_max_value() - this->get_min_value());
}
double DoubleUnitStrategy::de_normalize(double n) {
......@@ -43,6 +44,7 @@ double DoubleUnitStrategy::de_normalize(double n) {
THROW_RUNTIME_ERROR("Data were not normalized, so de-normalization cannot progress!");
}
return 0.5 * ((1 + n) * (this->get_max_value() - this->get_min_value())) + this->get_min_value();
//return 0.5 * ((1 + n) * (this->get_max_value() - this->get_min_value())) + this->get_min_value();
return n * (this->get_max_value() - this->get_min_value());
}
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