Commit d311952c authored by Davis King's avatar Davis King

Fixed some comments.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404117
parent 184652c2
...@@ -209,8 +209,7 @@ namespace dlib ...@@ -209,8 +209,7 @@ namespace dlib
/* /*
Notes on the solution of ridge regression Notes on the solution of ridge regression
Let A = an x.size() by dims matrix which contains Let A = an x.size() by dims matrix which contains all the data samples.
all the projected data samples.
Let I = an identity matrix Let I = an identity matrix
...@@ -238,7 +237,7 @@ namespace dlib ...@@ -238,7 +237,7 @@ namespace dlib
where V*D*trans(V) == C where V*D*trans(V) == C
Also, via some simple linear algebra the above paper works out that the leave one out Also, via some simple linear algebra the above paper works out that the leave one out
value for a sample x(i) is equal to the following (we refer to x(i) as x(i) for brevity): value for a sample x(i) is equal to the following:
Let G = inv(C + lambda*I) Let G = inv(C + lambda*I)
let val = trans(x(i))*G*x(i); let val = trans(x(i))*G*x(i);
...@@ -315,7 +314,7 @@ namespace dlib ...@@ -315,7 +314,7 @@ namespace dlib
// compute the solution w for the current lambda // compute the solution w for the current lambda
w = G*L; w = G*L;
// make w have the same length as the x_proj vectors. // make w have the same length as the x vectors.
const scalar_type b = w(dims); const scalar_type b = w(dims);
w = colm(w,0,dims); w = colm(w,0,dims);
...@@ -364,7 +363,7 @@ namespace dlib ...@@ -364,7 +363,7 @@ namespace dlib
G = tempm*trans(V); G = tempm*trans(V);
w = G*L; w = G*L;
// make w have the same length as the x_proj vectors. // make w have the same length as the x vectors.
const scalar_type b = w(dims); const scalar_type b = w(dims);
w = colm(w,0,dims); w = colm(w,0,dims);
......
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