From 8ebae5b9545645297bddbfe5a36784f36f9e84e1 Mon Sep 17 00:00:00 2001 From: Davis King Date: Fri, 23 Apr 2010 20:52:18 +0000 Subject: [PATCH] Made comments more clear. --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403567 --- examples/optimization_ex.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/optimization_ex.cpp b/examples/optimization_ex.cpp index 30249f252..3db0bbf99 100755 --- a/examples/optimization_ex.cpp +++ b/examples/optimization_ex.cpp @@ -77,16 +77,16 @@ class test_function In this example, our test_function object contains a column_vector as its state and it computes the mean squared error between this stored column_vector and the arguments to its operator() function. - This is a very simple function. However, in general you could compute + + This is a very simple function, however, in general you could compute any function you wanted here. An example of a typical use would be - to find the parameters to some regression function that minimized + to find the parameters of some regression function that minimized the mean squared error on a set of data. In this case the arguments to the operator() function would be the parameters of your regression - function and you would use those parameters to loop over all your data - samples, compute the output of the regression function given those - parameters, and finally return a measure of the error. The dlib - optimization functions would then be used to find the parameters that - minimized the error. + function. You would loop over all your data samples and compute the output + of the regression function for each data sample given the parameters and + return a measure of the total error. The dlib optimization functions + could then be used to find the parameters that minimized the error. */ public: