dclib-devel Mailing List for dlib C++ Library (Page 5)
Brought to you by:
davisking
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
(7) |
Nov
(3) |
Dec
|
2009 |
Jan
(4) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(9) |
Jun
(5) |
Jul
(7) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2017 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(10) |
Sep
|
Oct
(12) |
Nov
(1) |
Dec
(20) |
2018 |
Jan
(11) |
Feb
(10) |
Mar
(8) |
Apr
|
May
(8) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mani A. <man...@gm...> - 2016-02-04 18:43:53
|
Thanks! I also noticed there is a *one_vs_all* trainer (http://dlib.net/ml.html#one_vs_all_trainer) Isn't it more efficient and faster than *one_vs_one* trainer for multiclass classification since it does not train N*(N-1)/2 binary classifiers. - Mani -------- Forwarded Message -------- Subject: Multiclass classification Date: Wed, 3 Feb 2016 20:04:47 -0800 From: Mani Amoozadeh <man...@gm...> To: dcl...@li... I would try the one_vs_one_trainer.=C2=A0 See=C2=A0 http://dlib.net/ml.html#one= _vs_one_trainer -------- Forwarded Message -------- Subject: Multiclass classification Date: Wed, 3 Feb 2016 20:04:47 -0800 From: Mani Amoozadeh <man...@gm...> To: dcl...@li... Hi, I am looking for a multiclass classification algorithm in Dlib that can classify inputs into three classes. The inputs are 3-dimensional (x,y,z) and like the following picture. After the training phase, the algorithm should be able to classify the input into class 1,2 or 3. Can you please give me a hint or show me a skeleton example that I can start with? Thanks! - Mani |
From: Mani A. <man...@gm...> - 2016-02-04 18:32:57
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1252"> </head> <body text="#000000" bgcolor="#FFFFFF"> Thanks! I also noticed there is a <b>one_vs_all</b> trainer (<a class="moz-txt-link-freetext" href="http://dlib.net/ml.html#one_vs_all_trainer">http://dlib.net/ml.html#one_vs_all_trainer</a>)<br> Isn't it more efficient and faster than <b>one_vs_one</b> trainer for multiclass classification since it does not train N*(N-1)/2 binary classifiers.<br> <br> <br> - Mani<br> <br> <br> <br> -------- Forwarded Message -------- <table class="moz-email-headers-table" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject: </th> <td>Multiclass classification</td> </tr> <tr> <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th> <td>Wed, 3 Feb 2016 20:04:47 -0800</td> </tr> <tr> <th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th> <td>Mani Amoozadeh <a class="moz-txt-link-rfc2396E" href="mailto:man...@gm..."><man...@gm...></a></td> </tr> <tr> <th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th> <td><a class="moz-txt-link-abbreviated" href="mailto:dcl...@li...">dcl...@li...</a></td> </tr> </tbody> </table> <br> <br> <br> <br> <div class="moz-forward-container"> <meta http-equiv="content-type" content="text/html; charset=windows-1252"> <span style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;">I would try the one_vs_one_trainer.=C2=A0 See=C2=A0 </span><a href="=3D%22http://dlib.net/ml.html#one_vs_one_trainer%22" style="font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a class="moz-txt-link-freetext" href="http://dlib.net/ml.html#one=">http://dlib.net/ml.html#one=</a> _vs_one_trainer</a><br> <br> <br> <br> -------- Forwarded Message -------- <table class="moz-email-headers-table" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject: </th> <td>Multiclass classification</td> </tr> <tr> <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th> <td>Wed, 3 Feb 2016 20:04:47 -0800</td> </tr> <tr> <th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th> <td>Mani Amoozadeh <a class="moz-txt-link-rfc2396E" href="mailto:man...@gm..."><man...@gm...></a></td> </tr> <tr> <th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th> <td><a class="moz-txt-link-abbreviated" href="mailto:dcl...@li...">dcl...@li...</a></td> </tr> </tbody> </table> <br> <br> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style><![endif]--> <style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:#0563C1; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri",sans-serif;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> <div class="WordSection1"> <p class="MsoNormal">Hi,<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">I am looking for a multiclass classification algorithm in Dlib that can classify inputs into three classes.<o:p></o:p></p> <p class="MsoNormal">The inputs are 3-dimensional (x,y,z) and like the following picture. After the training phase, the algorithm<o:p></o:p></p> <p class="MsoNormal">should be able to classify the input into class 1,2 or 3.<br> </p> <p class="MsoNormal">Can you please give me a hint or show me a skeleton example that I can start with?<o:p></o:p></p> <p class="MsoNormal">Thanks!<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">- Mani<o:p></o:p></p> </div> <br> </div> <br> </body> </html> |
From: Davis K. <dav...@us...> - 2016-02-04 11:52:21
|
I would try the one_vs_one_trainer. See http://dlib.net/ml.html#one_vs_one_trainer On Wed, Feb 3, 2016 at 11:04 PM, Mani Amoozadeh <man...@gm...> wrote: > Hi, > > > > I am looking for a multiclass classification algorithm in Dlib that can > classify inputs into three classes. > > The inputs are 3-dimensional (x,y,z) and like the following picture. After > the training phase, the algorithm > > should be able to classify the input into class 1,2 or 3. > > > > > > Can you please give me a hint or show me a skeleton example that I can > start with? > > Thanks! > > > > - Mani > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > > |
From: Mani A. <man...@gm...> - 2016-02-04 04:04:57
|
Hi, I am looking for a multiclass classification algorithm in Dlib that can classify inputs into three classes. The inputs are 3-dimensional (x,y,z) and like the following picture. After the training phase, the algorithm should be able to classify the input into class 1,2 or 3. Can you please give me a hint or show me a skeleton example that I can start with? Thanks! - Mani |
From: Davis K. <dav...@us...> - 2015-02-07 12:42:57
|
You mean copied dlib's code and changed double to long double? That would probably work fine. I'm using double in the optimizers because it's accurate enough for nearly everything. You can use an objective function that internally uses long double or whatever you want, but the optimizers themselves run at double precision. Are you saying that you want to run the optimization until it gets a solution that is accurate to more than about 14 digits of precision? If not then double is fine. If so, then what are you doing where you need 15 or more digits of precision in the solution? Cheers, Davis |
From: Zhoulai <ze...@gm...> - 2015-02-05 14:26:13
|
Thank you for your reply. Right, probably Bobyqa is too coarse for my case. Then, can we use a l-bfgs/bfgs/cg search with long double precision in dblp? Can I just take dblp's procedure, change all double to long double and then it shall work? BTW, I don't see why dblp uses to 'double' rather than a type template as in most BOOST's scientific-computing packages. Being merely compatible with 'double' may make dblp unable to meet a high-precision computation requirement. Zhoulai On Wed, Feb 4, 2015 at 5:01 PM, Davis King <dav...@us...> wrote: > It's designed for double. I don't think it will compile if you use any > other type. > > Also, if you have an objective function that is so sensitive that you need > long double precision then a derivative free optimizer like BOBYQA is > almost certainly not appropriate for this task. > > Cheers, > Davis > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > > |
From: Davis K. <dav...@us...> - 2015-02-05 01:01:44
|
It's designed for double. I don't think it will compile if you use any other type. Also, if you have an objective function that is so sensitive that you need long double precision then a derivative free optimizer like BOBYQA is almost certainly not appropriate for this task. Cheers, Davis |
From: Zhoulai <ze...@gm...> - 2015-02-05 00:09:05
|
Hello, Is there an easy way to use dlib's BOBYQA algorithm with 'long double' precision? In the document, http://dlib.net/dlib/optimization/optimization_bobyqa_abstract.h.html#find_min_bobyqa it seems that the objective function has to be of type double vector -> double, but I have a function of type long double vector -> long double and its minimum has to be evaluated with long-double precision. Do you think I can use dlib for this task? Thanks for your ideas. --Zhoulai On Sat, May 31, 2014 at 9:48 AM, Zhoulai <ze...@gm...> wrote: > Hello, > > I am new to Dlib, but I am surprised that there is no root-finding > procedures in Dlib. Although the functionality provided by the > optmization.h should also be able to solve root-finding problems, I guess > that comes with a higher complexity? > > So what if I want to solve a problem as follows using Dlib? > > I have a one dimensional function 'f' which is not necessarily > differentiable. I want to find a root 'r' that is closest to an initial > guess 'g' so that f(r)=0 ? > > More formally, I am looking for a low-cost way to minimize |r-g| > under the constraint f(r)=0; > > In my problem setting, it is likely the initial guess is the root, thus I > would use 'g' as an initial guess. However, I do not have an interval [a,b] > such that f(a).f(b)<0 which is a common request for most root-finding > procedures. > > Of course the problem above can be handled by the optimization approaches > like find_min_single_variable etc, but my guess is that it can also treated > as a root-finding problem which is less expensive. What do you think? > > Thank you for your ideas. > > Sncerely, > Zhoulai > > > > > |
From: Davis K. <dav...@us...> - 2014-05-31 17:44:35
|
No problem :) f^2 should be faster since it is a closer match to the polynomial interpolation used to take the steps. That is, I would expect it to require fewer iterations to solve when using f^2. Also, it should be noted that the method can also get stuck in a local minima which doesn't correspond to any root. For example, if f(x) has a local minimum somewhere and the output of f(x) at the location is > 0 then f(x)^2 will also have a minimum in the same place. But that spot isn't a root of f(x). So find_min_single_variable() might return one of these points as a solution which isn't what you want. To avoid this you would need to make sure the initial search point is not too far from a root. Here is a little example: auto f = [](double x) { return 3*x*x*x - 8*x*x + x - 10; }; auto g = [&](double x) { double val = f(x); cout << "."; return val*val; }; double x = 10; find_min_single_variable(g, x); cout << x << endl; cout << f(x) << endl; It works with x = 10. But if you try x = -10 as the starting point it finds a minimizer of f() that isn't a root. You can also see the number of times g() is called, which in this case is 19 times. Cheers, Davis On Sat, May 31, 2014 at 1:30 PM, Zhoulai <ze...@gm...> wrote: > Thank you very much for your quick reply ! > > What do think about the efficiency between minimizing f^2 and |f| with > find_min_single_variable? > > My guess is: since find_min_single_variable is based on bracket approaches, > to compute |f| at each step is less complex than computing fˆ2, and thus to > minimize |f| is more efficient than to minimize fˆ2, am I correct? > > Thanks for your ideas. > > Zhoulai > > > On Sat, May 31, 2014 at 10:23 AM, Davis King > <dav...@us...> wrote: >> >> I don't have any detailed description of find_min_single_variable() >> other than >> http://dlib.net/dlib/optimization/optimization_line_search_abstract.h.html#find_min_single_variable. >> But if it can't find a bracket or a good enough solution in under >> max_iter function evaluations then it throws an exception. Beyond >> that, I would just look at the code. It's got comments telling you >> what it does at each step and on the whole it's one of the simpler >> optimization algorithms. But basically, it's just interpolation >> except when the interpolation output is not useful and then it will do >> a bisection step. >> >> Cheers, >> Davis >> >> On Sat, May 31, 2014 at 1:13 PM, Zhoulai <ze...@gm...> wrote: >> > Thank you for your very quick reply. I wonder the efficiency between >> > minimizing f^2 and |f| in my problem? >> > >> > Otherwise, do you have documentation about your implementation >> > details? Of >> > course, the source code is the best document but I am also looking for a >> > (maybe not that formal) mathematical description of what you have >> > implemented in some provided functions. For example, how can I know >> > which >> > your find_min_single_variable has implemented, bisection, false >> > position, or >> > Brent etc? What is the expected behavior if the implementation fails to >> > find >> > endpoints with opposite signs? >> > >> > Thank you for your ideas. >> > >> > Zhoulai >> > >> > >> > On Sat, May 31, 2014 at 10:04 AM, Davis King >> > <dav...@us...> wrote: >> >> >> >> Well, to describe find_min_single_variable() in terms of what is >> >> described on wikipedia >> >> (http://en.wikipedia.org/wiki/Root-finding_algorithm), >> >> find_min_single_variable() first finds a bracket containing the >> >> minimizer and then uses interpolation to shrink the bracket to the >> >> solution. So it's pretty representative of general purpose root >> >> finding methods that don't require the user to supply a derivative. >> >> So it sounds like a reasonable thing to use for your problem. In your >> >> case, you just have to ask it to minimize f(r)^2 so that the root is >> >> the minimum and it should work fine. >> >> >> >> Cheers, >> >> Davis >> >> >> >> On Sat, May 31, 2014 at 12:48 PM, Zhoulai <ze...@gm...> wrote: >> >> > Hello, >> >> > >> >> > I am new to Dlib, but I am surprised that there is no root-finding >> >> > procedures in Dlib. Although the functionality provided by the >> >> > optmization.h should also be able to solve root-finding problems, I >> >> > guess >> >> > that comes with a higher complexity? >> >> > >> >> > So what if I want to solve a problem as follows using Dlib? >> >> > >> >> > I have a one dimensional function 'f' which is not necessarily >> >> > differentiable. I want to find a root 'r' that is closest to an >> >> > initial >> >> > guess 'g' so that f(r)=0 ? >> >> > >> >> > More formally, I am looking for a low-cost way to minimize |r-g| >> >> > under the constraint f(r)=0; >> >> > >> >> > In my problem setting, it is likely the initial guess is the root, >> >> > thus >> >> > I >> >> > would use 'g' as an initial guess. However, I do not have an interval >> >> > [a,b] >> >> > such that f(a).f(b)<0 which is a common request for most root-finding >> >> > procedures. >> >> > >> >> > Of course the problem above can be handled by the optimization >> >> > approaches >> >> > like find_min_single_variable etc, but my guess is that it can also >> >> > treated >> >> > as a root-finding problem which is less expensive. What do you >> >> > think? >> >> > >> >> > Thank you for your ideas. >> >> > >> >> > Sncerely, >> >> > Zhoulai >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > ------------------------------------------------------------------------------ >> >> > Time is money. Stop wasting it! Get your web API in 5 minutes. >> >> > www.restlet.com/download >> >> > http://p.sf.net/sfu/restlet >> >> > _______________________________________________ >> >> > Dclib-devel mailing list >> >> > Dcl...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/dclib-devel >> >> > >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Time is money. Stop wasting it! Get your web API in 5 minutes. >> >> www.restlet.com/download >> >> http://p.sf.net/sfu/restlet >> >> _______________________________________________ >> >> Dclib-devel mailing list >> >> Dcl...@li... >> >> https://lists.sourceforge.net/lists/listinfo/dclib-devel >> > >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Time is money. Stop wasting it! Get your web API in 5 minutes. >> > www.restlet.com/download >> > http://p.sf.net/sfu/restlet >> > _______________________________________________ >> > Dclib-devel mailing list >> > Dcl...@li... >> > https://lists.sourceforge.net/lists/listinfo/dclib-devel >> > >> >> >> ------------------------------------------------------------------------------ >> Time is money. Stop wasting it! Get your web API in 5 minutes. >> www.restlet.com/download >> http://p.sf.net/sfu/restlet >> _______________________________________________ >> Dclib-devel mailing list >> Dcl...@li... >> https://lists.sourceforge.net/lists/listinfo/dclib-devel > > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > |
From: Zhoulai <ze...@gm...> - 2014-05-31 17:30:20
|
Thank you very much for your quick reply ! What do think about the efficiency between minimizing f^2 and |f| with find_min_single_variable? My guess is: since find_min_single_variable is based on bracket approaches, to compute |f| at each step is less complex than computing fˆ2, and thus to minimize |f| is more efficient than to minimize fˆ2, am I correct? Thanks for your ideas. Zhoulai On Sat, May 31, 2014 at 10:23 AM, Davis King < dav...@us...> wrote: > I don't have any detailed description of find_min_single_variable() > other than > http://dlib.net/dlib/optimization/optimization_line_search_abstract.h.html#find_min_single_variable > . > But if it can't find a bracket or a good enough solution in under > max_iter function evaluations then it throws an exception. Beyond > that, I would just look at the code. It's got comments telling you > what it does at each step and on the whole it's one of the simpler > optimization algorithms. But basically, it's just interpolation > except when the interpolation output is not useful and then it will do > a bisection step. > > Cheers, > Davis > > On Sat, May 31, 2014 at 1:13 PM, Zhoulai <ze...@gm...> wrote: > > Thank you for your very quick reply. I wonder the efficiency between > > minimizing f^2 and |f| in my problem? > > > > Otherwise, do you have documentation about your implementation > details? Of > > course, the source code is the best document but I am also looking for a > > (maybe not that formal) mathematical description of what you have > > implemented in some provided functions. For example, how can I know which > > your find_min_single_variable has implemented, bisection, false > position, or > > Brent etc? What is the expected behavior if the implementation fails to > find > > endpoints with opposite signs? > > > > Thank you for your ideas. > > > > Zhoulai > > > > > > On Sat, May 31, 2014 at 10:04 AM, Davis King > > <dav...@us...> wrote: > >> > >> Well, to describe find_min_single_variable() in terms of what is > >> described on wikipedia > >> (http://en.wikipedia.org/wiki/Root-finding_algorithm), > >> find_min_single_variable() first finds a bracket containing the > >> minimizer and then uses interpolation to shrink the bracket to the > >> solution. So it's pretty representative of general purpose root > >> finding methods that don't require the user to supply a derivative. > >> So it sounds like a reasonable thing to use for your problem. In your > >> case, you just have to ask it to minimize f(r)^2 so that the root is > >> the minimum and it should work fine. > >> > >> Cheers, > >> Davis > >> > >> On Sat, May 31, 2014 at 12:48 PM, Zhoulai <ze...@gm...> wrote: > >> > Hello, > >> > > >> > I am new to Dlib, but I am surprised that there is no root-finding > >> > procedures in Dlib. Although the functionality provided by the > >> > optmization.h should also be able to solve root-finding problems, I > >> > guess > >> > that comes with a higher complexity? > >> > > >> > So what if I want to solve a problem as follows using Dlib? > >> > > >> > I have a one dimensional function 'f' which is not necessarily > >> > differentiable. I want to find a root 'r' that is closest to an > initial > >> > guess 'g' so that f(r)=0 ? > >> > > >> > More formally, I am looking for a low-cost way to minimize |r-g| > >> > under the constraint f(r)=0; > >> > > >> > In my problem setting, it is likely the initial guess is the root, > thus > >> > I > >> > would use 'g' as an initial guess. However, I do not have an interval > >> > [a,b] > >> > such that f(a).f(b)<0 which is a common request for most root-finding > >> > procedures. > >> > > >> > Of course the problem above can be handled by the optimization > >> > approaches > >> > like find_min_single_variable etc, but my guess is that it can also > >> > treated > >> > as a root-finding problem which is less expensive. What do you think? > >> > > >> > Thank you for your ideas. > >> > > >> > Sncerely, > >> > Zhoulai > >> > > >> > > >> > > >> > > >> > > >> > > >> > > ------------------------------------------------------------------------------ > >> > Time is money. Stop wasting it! Get your web API in 5 minutes. > >> > www.restlet.com/download > >> > http://p.sf.net/sfu/restlet > >> > _______________________________________________ > >> > Dclib-devel mailing list > >> > Dcl...@li... > >> > https://lists.sourceforge.net/lists/listinfo/dclib-devel > >> > > >> > >> > >> > ------------------------------------------------------------------------------ > >> Time is money. Stop wasting it! Get your web API in 5 minutes. > >> www.restlet.com/download > >> http://p.sf.net/sfu/restlet > >> _______________________________________________ > >> Dclib-devel mailing list > >> Dcl...@li... > >> https://lists.sourceforge.net/lists/listinfo/dclib-devel > > > > > > > > > ------------------------------------------------------------------------------ > > Time is money. Stop wasting it! Get your web API in 5 minutes. > > www.restlet.com/download > > http://p.sf.net/sfu/restlet > > _______________________________________________ > > Dclib-devel mailing list > > Dcl...@li... > > https://lists.sourceforge.net/lists/listinfo/dclib-devel > > > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > |
From: Davis K. <dav...@us...> - 2014-05-31 17:23:29
|
I don't have any detailed description of find_min_single_variable() other than http://dlib.net/dlib/optimization/optimization_line_search_abstract.h.html#find_min_single_variable. But if it can't find a bracket or a good enough solution in under max_iter function evaluations then it throws an exception. Beyond that, I would just look at the code. It's got comments telling you what it does at each step and on the whole it's one of the simpler optimization algorithms. But basically, it's just interpolation except when the interpolation output is not useful and then it will do a bisection step. Cheers, Davis On Sat, May 31, 2014 at 1:13 PM, Zhoulai <ze...@gm...> wrote: > Thank you for your very quick reply. I wonder the efficiency between > minimizing f^2 and |f| in my problem? > > Otherwise, do you have documentation about your implementation details? Of > course, the source code is the best document but I am also looking for a > (maybe not that formal) mathematical description of what you have > implemented in some provided functions. For example, how can I know which > your find_min_single_variable has implemented, bisection, false position, or > Brent etc? What is the expected behavior if the implementation fails to find > endpoints with opposite signs? > > Thank you for your ideas. > > Zhoulai > > > On Sat, May 31, 2014 at 10:04 AM, Davis King > <dav...@us...> wrote: >> >> Well, to describe find_min_single_variable() in terms of what is >> described on wikipedia >> (http://en.wikipedia.org/wiki/Root-finding_algorithm), >> find_min_single_variable() first finds a bracket containing the >> minimizer and then uses interpolation to shrink the bracket to the >> solution. So it's pretty representative of general purpose root >> finding methods that don't require the user to supply a derivative. >> So it sounds like a reasonable thing to use for your problem. In your >> case, you just have to ask it to minimize f(r)^2 so that the root is >> the minimum and it should work fine. >> >> Cheers, >> Davis >> >> On Sat, May 31, 2014 at 12:48 PM, Zhoulai <ze...@gm...> wrote: >> > Hello, >> > >> > I am new to Dlib, but I am surprised that there is no root-finding >> > procedures in Dlib. Although the functionality provided by the >> > optmization.h should also be able to solve root-finding problems, I >> > guess >> > that comes with a higher complexity? >> > >> > So what if I want to solve a problem as follows using Dlib? >> > >> > I have a one dimensional function 'f' which is not necessarily >> > differentiable. I want to find a root 'r' that is closest to an initial >> > guess 'g' so that f(r)=0 ? >> > >> > More formally, I am looking for a low-cost way to minimize |r-g| >> > under the constraint f(r)=0; >> > >> > In my problem setting, it is likely the initial guess is the root, thus >> > I >> > would use 'g' as an initial guess. However, I do not have an interval >> > [a,b] >> > such that f(a).f(b)<0 which is a common request for most root-finding >> > procedures. >> > >> > Of course the problem above can be handled by the optimization >> > approaches >> > like find_min_single_variable etc, but my guess is that it can also >> > treated >> > as a root-finding problem which is less expensive. What do you think? >> > >> > Thank you for your ideas. >> > >> > Sncerely, >> > Zhoulai >> > >> > >> > >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Time is money. Stop wasting it! Get your web API in 5 minutes. >> > www.restlet.com/download >> > http://p.sf.net/sfu/restlet >> > _______________________________________________ >> > Dclib-devel mailing list >> > Dcl...@li... >> > https://lists.sourceforge.net/lists/listinfo/dclib-devel >> > >> >> >> ------------------------------------------------------------------------------ >> Time is money. Stop wasting it! Get your web API in 5 minutes. >> www.restlet.com/download >> http://p.sf.net/sfu/restlet >> _______________________________________________ >> Dclib-devel mailing list >> Dcl...@li... >> https://lists.sourceforge.net/lists/listinfo/dclib-devel > > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > |
From: Zhoulai <ze...@gm...> - 2014-05-31 17:14:06
|
Thank you for your very quick reply. I wonder the efficiency between minimizing f^2 and |f| in my problem? Otherwise, do you have documentation about your implementation details? Of course, the source code is the best document but I am also looking for a (maybe not that formal) mathematical description of what you have implemented in some provided functions. For example, how can I know which your find_min_single_variable has implemented, bisection, false position, or Brent etc? What is the expected behavior if the implementation fails to find endpoints with opposite signs? Thank you for your ideas. Zhoulai On Sat, May 31, 2014 at 10:04 AM, Davis King < dav...@us...> wrote: > Well, to describe find_min_single_variable() in terms of what is > described on wikipedia > (http://en.wikipedia.org/wiki/Root-finding_algorithm), > find_min_single_variable() first finds a bracket containing the > minimizer and then uses interpolation to shrink the bracket to the > solution. So it's pretty representative of general purpose root > finding methods that don't require the user to supply a derivative. > So it sounds like a reasonable thing to use for your problem. In your > case, you just have to ask it to minimize f(r)^2 so that the root is > the minimum and it should work fine. > > Cheers, > Davis > > On Sat, May 31, 2014 at 12:48 PM, Zhoulai <ze...@gm...> wrote: > > Hello, > > > > I am new to Dlib, but I am surprised that there is no root-finding > > procedures in Dlib. Although the functionality provided by the > > optmization.h should also be able to solve root-finding problems, I guess > > that comes with a higher complexity? > > > > So what if I want to solve a problem as follows using Dlib? > > > > I have a one dimensional function 'f' which is not necessarily > > differentiable. I want to find a root 'r' that is closest to an initial > > guess 'g' so that f(r)=0 ? > > > > More formally, I am looking for a low-cost way to minimize |r-g| > > under the constraint f(r)=0; > > > > In my problem setting, it is likely the initial guess is the root, thus I > > would use 'g' as an initial guess. However, I do not have an interval > [a,b] > > such that f(a).f(b)<0 which is a common request for most root-finding > > procedures. > > > > Of course the problem above can be handled by the optimization approaches > > like find_min_single_variable etc, but my guess is that it can also > treated > > as a root-finding problem which is less expensive. What do you think? > > > > Thank you for your ideas. > > > > Sncerely, > > Zhoulai > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Time is money. Stop wasting it! Get your web API in 5 minutes. > > www.restlet.com/download > > http://p.sf.net/sfu/restlet > > _______________________________________________ > > Dclib-devel mailing list > > Dcl...@li... > > https://lists.sourceforge.net/lists/listinfo/dclib-devel > > > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > |
From: Davis K. <dav...@us...> - 2014-05-31 17:04:55
|
Well, to describe find_min_single_variable() in terms of what is described on wikipedia (http://en.wikipedia.org/wiki/Root-finding_algorithm), find_min_single_variable() first finds a bracket containing the minimizer and then uses interpolation to shrink the bracket to the solution. So it's pretty representative of general purpose root finding methods that don't require the user to supply a derivative. So it sounds like a reasonable thing to use for your problem. In your case, you just have to ask it to minimize f(r)^2 so that the root is the minimum and it should work fine. Cheers, Davis On Sat, May 31, 2014 at 12:48 PM, Zhoulai <ze...@gm...> wrote: > Hello, > > I am new to Dlib, but I am surprised that there is no root-finding > procedures in Dlib. Although the functionality provided by the > optmization.h should also be able to solve root-finding problems, I guess > that comes with a higher complexity? > > So what if I want to solve a problem as follows using Dlib? > > I have a one dimensional function 'f' which is not necessarily > differentiable. I want to find a root 'r' that is closest to an initial > guess 'g' so that f(r)=0 ? > > More formally, I am looking for a low-cost way to minimize |r-g| > under the constraint f(r)=0; > > In my problem setting, it is likely the initial guess is the root, thus I > would use 'g' as an initial guess. However, I do not have an interval [a,b] > such that f(a).f(b)<0 which is a common request for most root-finding > procedures. > > Of course the problem above can be handled by the optimization approaches > like find_min_single_variable etc, but my guess is that it can also treated > as a root-finding problem which is less expensive. What do you think? > > Thank you for your ideas. > > Sncerely, > Zhoulai > > > > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > |
From: Zhoulai <ze...@gm...> - 2014-05-31 16:48:56
|
Hello, I am new to Dlib, but I am surprised that there is no root-finding procedures in Dlib. Although the functionality provided by the optmization.h should also be able to solve root-finding problems, I guess that comes with a higher complexity? So what if I want to solve a problem as follows using Dlib? I have a one dimensional function 'f' which is not necessarily differentiable. I want to find a root 'r' that is closest to an initial guess 'g' so that f(r)=0 ? More formally, I am looking for a low-cost way to minimize |r-g| under the constraint f(r)=0; In my problem setting, it is likely the initial guess is the root, thus I would use 'g' as an initial guess. However, I do not have an interval [a,b] such that f(a).f(b)<0 which is a common request for most root-finding procedures. Of course the problem above can be handled by the optimization approaches like find_min_single_variable etc, but my guess is that it can also treated as a root-finding problem which is less expensive. What do you think? Thank you for your ideas. Sncerely, Zhoulai |
From: Davis K. <dav...@us...> - 2014-05-21 23:16:46
|
It's not working because you disabled exceptions and are getting errors on lines of code that deal in exceptions. You can see this in your first compiler error message: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_2.h:51:17: error: exception handling disabled, use -fexceptions to enable In your makefile you have -fno-exceptions set. If you take that out it should work fine. Cheers, Davis On Wed, May 21, 2014 at 1:07 PM, Martin Fabichak <mfa...@gm...> wrote: > Hi guys! > > I'm writing a cross-platform code and need to use dlib. > In windows, I added the source.cpp file and added the dlib folder to my > project include path and everything worked. > > I needed to compile the same result in windows, But I can't! > > This is the makefile I'm using (generated by shiva3D). > > If I add the folder D_LIB with -I$(DLIB) in CFLAGS, results in the errors on > the end of the email. I'm pretty sure the error is caused by me not adding > the source.cpp here. I'm really lost, can someone help me? > > > ################################################################# > # ShiVa Extension Plugin Makefile for Linux > ################################################################# > > TEMP_DIR = ../../Temp/Linux > SRCROOT = ../../Sources > S3DXROOT = ../../Sources/S3DX > BUILT_PRODUCTS_DIR = ../../Contents/Linux > PRODUCT_NAME = ludiumTest_Linux.so > D_SOURCE = /dlib-18.7/dlib/all > D_LIB = /dlib-18.7/ > BOOST_LIB = /boost/boost_1_55_0/stage/libs/ > ################################################################# > SOURCES = Plugin.cpp ludium.cpp > > ################################################################# > # Compiler executables > # > CC = gcc > CPP = g++ > LD = $(CPP) > > ####################################################################" > # Compiler flags > # > CFLAGS = -Os -Wno-unknown-pragmas -fsigned-char -fno-exceptions > -DS3DX_DLL -D__LINUX__ -D_GNU_SOURCE -DHAVE_STDINT_H -I$(D_LIB) > -I$(SRCROOT)/Linux -I$(S3DXROOT) > CPPFLAGS = > LDFLAGS = > > ####################################################################" > # Objects > # > OBJECTS = \ > $(patsubst %.c,%.o,$(filter %.c,$(SOURCES))) \ > $(patsubst %.cc,%.o,$(filter %.cc,$(SOURCES))) \ > $(patsubst %.cpp,%.o,$(filter %.cpp,$(SOURCES))) > > OBJECTS_ABS = $(addprefix $(TEMP_DIR)/,$(OBJECTS)) > PRODUCT_ABS = $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME) > > ####################################################################" > # Rules > # > > $(TEMP_DIR)/%.o: $(SRCROOT)/%.c > mkdir -p `dirname $@` > $(CC) $(CFLAGS) -c $< -o $@ > > $(TEMP_DIR)/%.o: $(SRCROOT)/%.cpp > mkdir -p `dirname $@` > $(CPP) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ > > ####################################################################" > # Targets > # > all: $(PRODUCT_ABS) > > $(PRODUCT_ABS): $(OBJECTS_ABS) > mkdir -p $(BUILT_PRODUCTS_DIR) > $(LD) -shared -o $(PRODUCT_ABS) $(OBJECTS_ABS) $(LDFLAGS) > > clean: > rm -f $(PRODUCT_ABS) $(OBJECTS_ABS) > > ####################################################################" > > > > ERRORS: > > g++ -Os -Wno-unknown-pragmas -fsigned-char -fno-exceptions -DS3DX_DLL > -D__LINUX__ -D_GNU_SOURCE -DHAVE_STDINT_H -I/dlib-18.7/ > -I../../Sources/Linux -I../../Sources/S3DX -c ../../Sources/ludium.cpp -o > ../../Temp/Linux/ludium.o > In file included from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/posix.h:4:0, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel.h:13, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads.h:6, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/sockets_kernel_2.h:33, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/posix.h:4, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets.h:14, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/sockstreambuf.h:8, > from /dlib-18.7/dlib/iosockstream/../sockstreambuf.h:6, > from /dlib-18.7/dlib/iosockstream/iosockstream.h:9, > from /dlib-18.7/dlib/iosockstream.h:6, > from ../../Sources/ludium.cpp:6: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_2.h: > In constructor ‘dlib::mutex::mutex()’: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_2.h:51:17: > error: exception handling disabled, use -fexceptions to enable > ); > ^ > In file included from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/binary_search_tree_kernel_1.h:11:0, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree.h:7, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_shared.h:10, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_2.h:173, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/posix.h:4, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel.h:13, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads.h:6, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/sockets_kernel_2.h:33, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/posix.h:4, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets.h:14, > from > /dlib-18.7/dlib/iosockstream/../sockstreambuf/sockstreambuf.h:8, > from /dlib-18.7/dlib/iosockstream/../sockstreambuf.h:6, > from /dlib-18.7/dlib/iosockstream/iosockstream.h:9, > from /dlib-18.7/dlib/iosockstream.h:6, > from ../../Sources/ludium.cpp:6: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: > In function ‘void dlib::serialize(const string&, std::ostream&)’: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1038:39: > error: request for member ‘info’ in ‘dlib::e’, which is of non-class type > ‘const double’ > { throw serialization_error(e.info + "\n while serializing object > of type std::string"); } > ^ > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: > In function ‘void dlib::deserialize(std::string&, std::istream&)’: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1052:39: > error: request for member ‘info’ in ‘dlib::e’, which is of non-class type > ‘const double’ > { throw serialization_error(e.info + "\n while deserializing > object of type std::string"); } > ^ > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: > In function ‘void dlib::serialize(const wstring&, std::ostream&)’: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1072:39: > error: request for member ‘info’ in ‘dlib::e’, which is of non-class type > ‘const double’ > { throw serialization_error(e.info + "\n while serializing object > of type std::wstring"); } > ^ > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: > In function ‘void dlib::deserialize(std::wstring&, std::istream&)’: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1087:39: > error: request for member ‘info’ in ‘dlib::e’, which is of non-class type > ‘const double’ > { throw serialization_error(e.info + "\n while deserializing > object of type std::wstring"); } > ^ > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: > In function ‘void dlib::serialize(const ustring&, std::ostream&)’: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1106:39: > error: request for member ‘info’ in ‘dlib::e’, which is of non-class type > ‘const double’ > { throw serialization_error(e.info + "\n while serializing object > of type ustring"); } > ^ > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: > In function ‘void dlib::deserialize(dlib::ustring&, std::istream&)’: > /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1121:39: > error: request for member ‘info’ in ‘dlib::e’, which is of non-class type > ‘const double’ > { throw serialization_error(e.info + "\n while deserializing > object of type ustring"); } > ^ > make: *** [../../Temp/Linux/ludium.o] Error 1 > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > |
From: Martin F. <mfa...@gm...> - 2014-05-21 17:07:39
|
Hi guys! I'm writing a cross-platform code and need to use dlib. In windows, I added the source.cpp file and added the dlib folder to my project include path and everything worked. I needed to compile the same result in windows, But I can't! This is the makefile I'm using (generated by shiva3D). If I add the folder D_LIB with -I$(DLIB) in CFLAGS, results in the errors on the end of the email. I'm pretty sure the error is caused by me not adding the source.cpp here. I'm really lost, can someone help me? ################################################################# # ShiVa Extension Plugin Makefile for Linux ################################################################# TEMP_DIR = ../../Temp/Linux SRCROOT = ../../Sources S3DXROOT = ../../Sources/S3DX BUILT_PRODUCTS_DIR = ../../Contents/Linux PRODUCT_NAME = ludiumTest_Linux.so D_SOURCE = /dlib-18.7/dlib/all D_LIB = /dlib-18.7/ BOOST_LIB = /boost/boost_1_55_0/stage/libs/ ################################################################# SOURCES = Plugin.cpp ludium.cpp ################################################################# # Compiler executables # CC = gcc CPP = g++ LD = $(CPP) ####################################################################" # Compiler flags # CFLAGS = -Os -Wno-unknown-pragmas -fsigned-char -fno-exceptions -DS3DX_DLL -D__LINUX__ -D_GNU_SOURCE -DHAVE_STDINT_H -I$(D_LIB) -I$(SRCROOT)/Linux -I$(S3DXROOT) CPPFLAGS = LDFLAGS = ####################################################################" # Objects # OBJECTS = \ $(patsubst %.c,%.o,$(filter %.c,$(SOURCES))) \ $(patsubst %.cc,%.o,$(filter %.cc,$(SOURCES))) \ $(patsubst %.cpp,%.o,$(filter %.cpp,$(SOURCES))) OBJECTS_ABS = $(addprefix $(TEMP_DIR)/,$(OBJECTS)) PRODUCT_ABS = $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME) ####################################################################" # Rules # $(TEMP_DIR)/%.o: $(SRCROOT)/%.c mkdir -p `dirname $@` $(CC) $(CFLAGS) -c $< -o $@ $(TEMP_DIR)/%.o: $(SRCROOT)/%.cpp mkdir -p `dirname $@` $(CPP) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ ####################################################################" # Targets # all: $(PRODUCT_ABS) $(PRODUCT_ABS): $(OBJECTS_ABS) mkdir -p $(BUILT_PRODUCTS_DIR) $(LD) -shared -o $(PRODUCT_ABS) $(OBJECTS_ABS) $(LDFLAGS) clean: rm -f $(PRODUCT_ABS) $(OBJECTS_ABS) ####################################################################" ERRORS: g++ -Os -Wno-unknown-pragmas -fsigned-char -fno-exceptions -DS3DX_DLL -D__LINUX__ -D_GNU_SOURCE -DHAVE_STDINT_H -I/dlib-18.7/ -I../../Sources/Linux -I../../Sources/S3DX -c ../../Sources/ludium.cpp -o ../../Temp/Linux/ludium.o In file included from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/posix.h:4:0, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel.h:13, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads.h:6, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/sockets_kernel_2.h:33, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/posix.h:4, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets.h:14, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/sockstreambuf.h:8, from /dlib-18.7/dlib/iosockstream/../sockstreambuf.h:6, from /dlib-18.7/dlib/iosockstream/iosockstream.h:9, from /dlib-18.7/dlib/iosockstream.h:6, from ../../Sources/ludium.cpp:6: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_2.h: In constructor ‘dlib::mutex::mutex()’: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_2.h:51:17: error: exception handling disabled, use -fexceptions to enable ); ^ In file included from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/binary_search_tree_kernel_1.h:11:0, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree.h:7, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_shared.h:10, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel_2.h:173, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/posix.h:4, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/threads_kernel.h:13, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads.h:6, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/sockets_kernel_2.h:33, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/posix.h:4, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets.h:14, from /dlib-18.7/dlib/iosockstream/../sockstreambuf/sockstreambuf.h:8, from /dlib-18.7/dlib/iosockstream/../sockstreambuf.h:6, from /dlib-18.7/dlib/iosockstream/iosockstream.h:9, from /dlib-18.7/dlib/iosockstream.h:6, from ../../Sources/ludium.cpp:6: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: In function ‘void dlib::serialize(const string&, std::ostream&)’: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1038:39: error: request for member ‘info’ in ‘dlib::e’, which is of non-class type ‘const double’ { throw serialization_error(e.info + "\n while serializing object of type std::string"); } ^ /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: In function ‘void dlib::deserialize(std::string&, std::istream&)’: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1052:39: error: request for member ‘info’ in ‘dlib::e’, which is of non-class type ‘const double’ { throw serialization_error(e.info + "\n while deserializing object of type std::string"); } ^ /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: In function ‘void dlib::serialize(const wstring&, std::ostream&)’: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1072:39: error: request for member ‘info’ in ‘dlib::e’, which is of non-class type ‘const double’ { throw serialization_error(e.info + "\n while serializing object of type std::wstring"); } ^ /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: In function ‘void dlib::deserialize(std::wstring&, std::istream&)’: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1087:39: error: request for member ‘info’ in ‘dlib::e’, which is of non-class type ‘const double’ { throw serialization_error(e.info + "\n while deserializing object of type std::wstring"); } ^ /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: In function ‘void dlib::serialize(const ustring&, std::ostream&)’: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1106:39: error: request for member ‘info’ in ‘dlib::e’, which is of non-class type ‘const double’ { throw serialization_error(e.info + "\n while serializing object of type ustring"); } ^ /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h: In function ‘void dlib::deserialize(dlib::ustring&, std::istream&)’: /dlib-18.7/dlib/iosockstream/../sockstreambuf/../sockets/../threads/../binary_search_tree/../serialize.h:1121:39: error: request for member ‘info’ in ‘dlib::e’, which is of non-class type ‘const double’ { throw serialization_error(e.info + "\n while deserializing object of type ustring"); } ^ make: *** [../../Temp/Linux/ludium.o] Error 1 |
From: Davis K. <dav...@us...> - 2013-11-05 12:04:45
|
Thanks, I'm glad you like it :) Sure, that should be easy to do. Just add another templated argument to the .train() method. So something like this: template <typename in, typename out, typename cancel_type> return_type train(in,out, cancel_type canceler) { ... // somewhere inside the main loop canceler(iteration_count); ... } Then you can pass in a function object that takes the current iteration and every 100 or 1000 iterations checks the clock (or whatever you want to check) and if it's been to long throws an exception. Let me know which trainers you do this to (or send me a patch file or whatever is convenient) and I'll include the changes into the next dlib release, which should be out in about 6 weeks or so. Cheers, Davis On Tue, Nov 5, 2013 at 6:12 AM, Maurizio Monge <mau...@gm...>wrote: > Dear developers, > thank very much you for dlib, I have found it exceptionally good and > well documented! > I was wondering if (possibly with some tweak or template override) it > could be possible to interrupt the training of an SVM model, for > instance inserting somewhere a hook that could raise an exception. I > am writing a server that allows to be invoked remotely, and I would > like it to allow "cancelling" of training operations. > > Thank you for your attention! > Maurizio Monge > > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. > Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and > register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > |
From: Maurizio M. <mau...@gm...> - 2013-11-05 11:13:01
|
Dear developers, thank very much you for dlib, I have found it exceptionally good and well documented! I was wondering if (possibly with some tweak or template override) it could be possible to interrupt the training of an SVM model, for instance inserting somewhere a hook that could raise an exception. I am writing a server that allows to be invoked remotely, and I would like it to allow "cancelling" of training operations. Thank you for your attention! Maurizio Monge |
From: Davis K. <dav...@us...> - 2013-02-05 12:38:25
|
Certainly, one of the most popular uses of RBF networks is to perform interpolation. You can also use the krr_trainer with the RBF kernel, and in fact, that is what I would recommend as it generally performs better than the rbf_network_trainer. You can use any of these tools in a program that uses MPI. Cheers, Davis On Tue, Feb 5, 2013 at 1:01 AM, milind d <mil...@gm...> wrote: > hi, > Can i use Radial Basis Function kernel to interpolate a function on a > scattered data, if there exist another class which uses rbf please let me > know and also will it be suitable if i use MPI. > > Thanks, > > > On Mon, Jan 21, 2013 at 10:03 PM, Davis King < > dav...@us...> wrote: > >> Most of the solvers in dlib are unconstrained solvers. There are a few >> special purpose solvers for certain kinds of very specific constrained >> problems, but those probably aren't what you are looking for. However, for >> a reasonable number of problems it's straight forward to use an >> unconstrained solver such as BFGS to solve a constrained problem. The >> simplest method is the penalty method. Essentially, you add a penalty term >> to your objective function that is something like lambda*pow( >> how_much_constraint_is_violated, 2.0). Then you solve the augmented >> objective function for a small value of lambda. Then, you make lambda >> bigger and call the solver again, this time starting from the location of >> the previous solution. In this way, you can avoid numerical problems >> because the penalty term never gets very large even though lambda can grow >> to a huge value. >> >> There are other general constrained optimization methods. My >> understanding is that the best general purpose solvers for constrained >> problems are the sequential quadratic programming methods. That isn't in >> dlib, but there are free tools available on the internet. I haven't used >> any of them myself though so I don't know which ones are easiest to use and >> so forth. >> >> I'm not sure I understand your second question. If you want to do a >> non-linear regression then there are RBF kernel methods in dlib that you >> can use. But if you want to do something very special purpose then I'm not >> sure. >> >> Cheers, >> Davis >> >> >> On Mon, Jan 21, 2013 at 7:03 AM, milind d <mil...@gm...> wrote: >> >>> hi, >>> i really liked dlib, I have questions related to 2 topics, one is i >>> tried the optimization class example, I want to use BFGS algorithm, but i >>> didnot see anything for constrained optimization, so is it possible to use >>> dlib for constrained optimization I understand i can augment my objective >>> function with constrained, but i guess it can have ill posed problems, can >>> you give any idea on this. >>> Also away from this topic i had one more question related to >>> Radial Basis Function, Actually I want to do a shape optimization >>> using Computational fluid Dynamics, so hence my question is can i use the >>> Radial Basis kernel in dlib to deform my mesh. please let me know if you >>> have any examples if possible. >>> >>> Thank you >>> >>> -- >>> Milind Dhake >>> Engineering Mechanics Unit >>> Jawaharlal Nehru Centre for Advanced Scientific Research >>> Bangalore >>> >>> >>> ------------------------------------------------------------------------------ >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>> MVPs and experts. SALE $99.99 this month only -- learn more at: >>> http://p.sf.net/sfu/learnmore_122412 >>> _______________________________________________ >>> Dclib-devel mailing list >>> Dcl...@li... >>> https://lists.sourceforge.net/lists/listinfo/dclib-devel >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. SALE $99.99 this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122412 >> _______________________________________________ >> Dclib-devel mailing list >> Dcl...@li... >> https://lists.sourceforge.net/lists/listinfo/dclib-devel >> >> > > > -- > Milind Dhake > Engineering Mechanics Unit > Jawaharlal Nehru Centre for Advanced Scientific Research > Bangalore > > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > > |
From: milind d <mil...@gm...> - 2013-02-05 06:01:26
|
hi, Can i use Radial Basis Function kernel to interpolate a function on a scattered data, if there exist another class which uses rbf please let me know and also will it be suitable if i use MPI. Thanks, On Mon, Jan 21, 2013 at 10:03 PM, Davis King < dav...@us...> wrote: > Most of the solvers in dlib are unconstrained solvers. There are a few > special purpose solvers for certain kinds of very specific constrained > problems, but those probably aren't what you are looking for. However, for > a reasonable number of problems it's straight forward to use an > unconstrained solver such as BFGS to solve a constrained problem. The > simplest method is the penalty method. Essentially, you add a penalty term > to your objective function that is something like lambda*pow( > how_much_constraint_is_violated, 2.0). Then you solve the augmented > objective function for a small value of lambda. Then, you make lambda > bigger and call the solver again, this time starting from the location of > the previous solution. In this way, you can avoid numerical problems > because the penalty term never gets very large even though lambda can grow > to a huge value. > > There are other general constrained optimization methods. My > understanding is that the best general purpose solvers for constrained > problems are the sequential quadratic programming methods. That isn't in > dlib, but there are free tools available on the internet. I haven't used > any of them myself though so I don't know which ones are easiest to use and > so forth. > > I'm not sure I understand your second question. If you want to do a > non-linear regression then there are RBF kernel methods in dlib that you > can use. But if you want to do something very special purpose then I'm not > sure. > > Cheers, > Davis > > > On Mon, Jan 21, 2013 at 7:03 AM, milind d <mil...@gm...> wrote: > >> hi, >> i really liked dlib, I have questions related to 2 topics, one is i >> tried the optimization class example, I want to use BFGS algorithm, but i >> didnot see anything for constrained optimization, so is it possible to use >> dlib for constrained optimization I understand i can augment my objective >> function with constrained, but i guess it can have ill posed problems, can >> you give any idea on this. >> Also away from this topic i had one more question related to >> Radial Basis Function, Actually I want to do a shape optimization >> using Computational fluid Dynamics, so hence my question is can i use the >> Radial Basis kernel in dlib to deform my mesh. please let me know if you >> have any examples if possible. >> >> Thank you >> >> -- >> Milind Dhake >> Engineering Mechanics Unit >> Jawaharlal Nehru Centre for Advanced Scientific Research >> Bangalore >> >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. SALE $99.99 this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122412 >> _______________________________________________ >> Dclib-devel mailing list >> Dcl...@li... >> https://lists.sourceforge.net/lists/listinfo/dclib-devel >> >> > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122412 > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > > -- Milind Dhake Engineering Mechanics Unit Jawaharlal Nehru Centre for Advanced Scientific Research Bangalore |
From: Davis K. <dav...@us...> - 2013-01-21 16:33:14
|
Most of the solvers in dlib are unconstrained solvers. There are a few special purpose solvers for certain kinds of very specific constrained problems, but those probably aren't what you are looking for. However, for a reasonable number of problems it's straight forward to use an unconstrained solver such as BFGS to solve a constrained problem. The simplest method is the penalty method. Essentially, you add a penalty term to your objective function that is something like lambda*pow( how_much_constraint_is_violated, 2.0). Then you solve the augmented objective function for a small value of lambda. Then, you make lambda bigger and call the solver again, this time starting from the location of the previous solution. In this way, you can avoid numerical problems because the penalty term never gets very large even though lambda can grow to a huge value. There are other general constrained optimization methods. My understanding is that the best general purpose solvers for constrained problems are the sequential quadratic programming methods. That isn't in dlib, but there are free tools available on the internet. I haven't used any of them myself though so I don't know which ones are easiest to use and so forth. I'm not sure I understand your second question. If you want to do a non-linear regression then there are RBF kernel methods in dlib that you can use. But if you want to do something very special purpose then I'm not sure. Cheers, Davis On Mon, Jan 21, 2013 at 7:03 AM, milind d <mil...@gm...> wrote: > hi, > i really liked dlib, I have questions related to 2 topics, one is i > tried the optimization class example, I want to use BFGS algorithm, but i > didnot see anything for constrained optimization, so is it possible to use > dlib for constrained optimization I understand i can augment my objective > function with constrained, but i guess it can have ill posed problems, can > you give any idea on this. > Also away from this topic i had one more question related to > Radial Basis Function, Actually I want to do a shape optimization > using Computational fluid Dynamics, so hence my question is can i use the > Radial Basis kernel in dlib to deform my mesh. please let me know if you > have any examples if possible. > > Thank you > > -- > Milind Dhake > Engineering Mechanics Unit > Jawaharlal Nehru Centre for Advanced Scientific Research > Bangalore > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122412 > _______________________________________________ > Dclib-devel mailing list > Dcl...@li... > https://lists.sourceforge.net/lists/listinfo/dclib-devel > > |
From: milind d <mil...@gm...> - 2013-01-21 12:03:35
|
hi, i really liked dlib, I have questions related to 2 topics, one is i tried the optimization class example, I want to use BFGS algorithm, but i didnot see anything for constrained optimization, so is it possible to use dlib for constrained optimization I understand i can augment my objective function with constrained, but i guess it can have ill posed problems, can you give any idea on this. Also away from this topic i had one more question related to Radial Basis Function, Actually I want to do a shape optimization using Computational fluid Dynamics, so hence my question is can i use the Radial Basis kernel in dlib to deform my mesh. please let me know if you have any examples if possible. Thank you -- Milind Dhake Engineering Mechanics Unit Jawaharlal Nehru Centre for Advanced Scientific Research Bangalore |
From: Davis K. <dav...@gm...> - 2013-01-03 23:36:44
|
Does this get all messed up this time? #include <dlib/matrix.h> using namespace dlib; Did it display right? |
From: Davis K. <da...@dl...> - 2011-04-23 16:35:31
|
You can post your question to the forums here: http://sourceforge.net/projects/dclib/forums/forum/442518 or you can email me. Either is fine. You should be able to build programs which use dlib and MSVC 2008 without any trouble. The "how to compile" page has a general description of the procedure for any compiler: http://dlib.net/compile.html. But basically, all you have to do is add dlib/all/source.cpp to your project and make sure the folder containing dlib is in your compiler's include search path. Nothing else is required. What kind of error messages are you getting? Cheers, Davis On Sat, Apr 23, 2011 at 11:52 AM, Yakov Lerner <il...@gm...> wrote: > Hello Davis, > Does a discussion forum exist for dlib. Or your email is a right address. > > I am trying to build dlib on Windows under Msvc 2008. > Without Cmake, as Msvc solution. > > What are my general chances ? > Did anybody report success on it ? > > It goes with no sign of convergence so far. > > > Thanks > Yakov > > |
From: Davis K. <da...@dl...> - 2011-01-10 23:53:03
|
To use dlib you can either create your own visual c++ project manually and then add the folder containing dlib to your compiler's include search path and also add dlib/all/source.cpp if necessary. Or you can use CMake. I prefer to use CMake but if you will only develop on windows then you might prefer to use manually created visual studio projects. 1. The CMake opion: To create a project with cmake first go to www.cmake.org and download the cmake installer for windows. Once installed you can go into the dlib/examples folder and do the following: create a subfolder named anything you like. I usually name it build. Then open a command prompt in the build folder. Then type "cmake .." This will create a visual studio project in your build folder. Using this project you can build all the example programs in the example folder. If you look in the examples/CMakeLists.txt file you can see how the CMake project file is setup. You can also look at the dlib/test/CMakeLists.txt file for another example. It's relatively straight forward and there is also documentation about CMake on the cmake webpage. 2. The make your own visual studio project option: Go to the menu and click: File->New->Project. Select win32, Then select win32 console application. Name your project something. Then click ok and next, uncheck precompiled header, click finish. Now you have an empty project that should build. Next you just need to do two things. First, add the dlib/all/source.cpp file to your project. Right click on Source files->Add->existing item. Find the dlib/all/source.cpp file and add it. Next, right click on your project and go to properties. Then Configuration Properties -> C/C++ -> Additional Include directories. Add the folder which contains the dlib folder to your additional include directories. Now you should be able to compile. You should also be able to start #including parts of dlib and using them. Hope that helps. Cheers, Davis On Mon, Jan 10, 2011 at 6:16 PM, Jian Liang <lia...@ya...> wrote: > Hello, Dear DLIB Developers: > > I am new to C++ and DLIB, and would like to learn and practice it in my > daily work. I would like to install this library within the developing > environment of Visual C++ Express. But I could not find the installation > tutorial from the DLIB website. Can you let me know how to do it or provide > some on-line tutorial that I can follow? > > Thank you very much! > > Liangjian > > |