Skip to content
Snippets Groups Projects
Commit dfcf3cab authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

bugfix: consistently leave out the 0.5 in front of the sum. We never use it

[[Imported from SVN: r7348]]
parent 7d491baa
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ public:
double result = 0;
for (size_t i=0; i<coefficients_.size(); i++) {
double dist = TargetSpace::distance(coefficients_[i], x);
result += 0.5*weights_[i]*dist*dist;
result += weights_[i]*dist*dist;
}
return result;
......@@ -33,7 +33,7 @@ public:
{
gradient = 0;
for (size_t i=0; i<coefficients_.size(); i++)
gradient.axpy(0.5*weights_[i],
gradient.axpy(weights_[i],
TargetSpace::derivativeOfDistanceSquaredWRTSecondArgument(coefficients_[i], x));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment