Re: [Math] LeastSquaresOptimizer Design

2015-09-25 Thread Ole Ersoy
On 09/25/2015 06:55 AM, Gilles wrote: On Thu, 24 Sep 2015 21:41:10 -0500, Ole Ersoy wrote: On 09/24/2015 06:01 PM, Gilles wrote: On Thu, 24 Sep 2015 17:02:15 -0500, Ole Ersoy wrote: On 09/24/2015 03:23 PM, Luc Maisonobe wrote: Le 24/09/2015 21:40, Ole Ersoy a écrit : Hi Luc, I gave this s

Re: [Math] LeastSquaresOptimizer Design

2015-09-25 Thread Gilles
On Thu, 24 Sep 2015 22:07:58 -0500, Ole Ersoy wrote: Why should the instance throwing the exception hold a field with the information? Separation of concerns: optimizer does the computation, then the exception holds what's needed for a full report of the failure. I would see what makes sense on

Re: [Math] LeastSquaresOptimizer Design

2015-09-25 Thread Gilles
On Thu, 24 Sep 2015 21:41:10 -0500, Ole Ersoy wrote: On 09/24/2015 06:01 PM, Gilles wrote: On Thu, 24 Sep 2015 17:02:15 -0500, Ole Ersoy wrote: On 09/24/2015 03:23 PM, Luc Maisonobe wrote: Le 24/09/2015 21:40, Ole Ersoy a écrit : Hi Luc, I gave this some more thought, and I think I may have

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Ole Ersoy
Why should the instance throwing the exception hold a field with the information? Separation of concerns: optimizer does the computation, then the exception holds what's needed for a full report of the failure. I would see what makes sense on on case by case basis. For example if the Observer

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Ole Ersoy
On 09/24/2015 06:01 PM, Gilles wrote: On Thu, 24 Sep 2015 17:02:15 -0500, Ole Ersoy wrote: On 09/24/2015 03:23 PM, Luc Maisonobe wrote: Le 24/09/2015 21:40, Ole Ersoy a écrit : Hi Luc, I gave this some more thought, and I think I may have tapped out to soon, even though you are absolutely r

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Gilles
On Thu, 24 Sep 2015 18:01:13 -0500, Ole Ersoy wrote: On 09/24/2015 04:05 PM, Gilles wrote: On Thu, 24 Sep 2015 08:43:38 -0500, Ole Ersoy wrote: On 09/24/2015 06:31 AM, luc wrote: Le 2015-09-24 04:16, Ole Ersoy a écrit : On 09/23/2015 03:09 PM, Luc Maisonobe wrote: CM is not intended to be a d

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Gilles
On Thu, 24 Sep 2015 17:02:15 -0500, Ole Ersoy wrote: On 09/24/2015 03:23 PM, Luc Maisonobe wrote: Le 24/09/2015 21:40, Ole Ersoy a écrit : Hi Luc, I gave this some more thought, and I think I may have tapped out to soon, even though you are absolutely right about what an exception does in ter

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Ole Ersoy
On 09/24/2015 04:05 PM, Gilles wrote: On Thu, 24 Sep 2015 08:43:38 -0500, Ole Ersoy wrote: On 09/24/2015 06:31 AM, luc wrote: Le 2015-09-24 04:16, Ole Ersoy a écrit : On 09/23/2015 03:09 PM, Luc Maisonobe wrote: CM is not intended to be a design pattern people should mimic. We are so bad at

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Ole Ersoy
On 09/24/2015 03:23 PM, Luc Maisonobe wrote: Le 24/09/2015 21:40, Ole Ersoy a écrit : Hi Luc, I gave this some more thought, and I think I may have tapped out to soon, even though you are absolutely right about what an exception does in terms bubbling execution to a point where it stops or we

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Gilles
On Thu, 24 Sep 2015 08:43:38 -0500, Ole Ersoy wrote: On 09/24/2015 06:31 AM, luc wrote: Le 2015-09-24 04:16, Ole Ersoy a écrit : On 09/23/2015 03:09 PM, Luc Maisonobe wrote: CM is not intended to be a design pattern people should mimic. We are so bad at this it would be a shame. No one in its

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Luc Maisonobe
Le 24/09/2015 21:40, Ole Ersoy a écrit : > Hi Luc, > > I gave this some more thought, and I think I may have tapped out to > soon, even though you are absolutely right about what an exception does > in terms bubbling execution to a point where it stops or we handle it. > > Suppose we have an Opti

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Ole Ersoy
Hi Luc, I gave this some more thought, and I think I may have tapped out to soon, even though you are absolutely right about what an exception does in terms bubbling execution to a point where it stops or we handle it. Suppose we have an Optimizer and an Optimizer observer. The optimizer will

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread Ole Ersoy
On 09/24/2015 06:31 AM, luc wrote: Le 2015-09-24 04:16, Ole Ersoy a écrit : On 09/23/2015 03:09 PM, Luc Maisonobe wrote: CM is not intended to be a design pattern people should mimic. We are so bad at this it would be a shame. No one in its right mind would copy or reuse this stuff. It is f

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread luc
Le 2015-09-24 04:16, Ole Ersoy a écrit : On 09/23/2015 03:09 PM, Luc Maisonobe wrote: CM is not intended to be a design pattern people should mimic. We are so bad at this it would be a shame. No one in its right mind would copy or reuse this stuff. It is for internal use only and we don't even

Re: [Math] LeastSquaresOptimizer Design

2015-09-24 Thread luc
Hi Gilles, Le 2015-09-23 23:00, Gilles a écrit : [...] CM is not intended to be a design pattern people should mimic. We are so bad at this The crux is that the project's team is in effect not _interested_ in this. [And I admit that I had not understood it for a long time (hence the temptati

Re: [Math] LeastSquaresOptimizer Design

2015-09-23 Thread Ole Ersoy
On 09/23/2015 03:09 PM, Luc Maisonobe wrote: CM is not intended to be a design pattern people should mimic. We are so bad at this it would be a shame. No one in its right mind would copy or reuse this stuff. It is for internal use only and we don't even have the resources to manage it by ourselves

Re: [Math] LeastSquaresOptimizer Design

2015-09-23 Thread Gilles
[...] CM is not intended to be a design pattern people should mimic. We are so bad at this The crux is that the project's team is in effect not _interested_ in this. [And I admit that I had not understood it for a long time (hence the temptation to convince that it was important for *some* peo

Re: [Math] LeastSquaresOptimizer Design

2015-09-23 Thread Luc Maisonobe
Le 23/09/2015 19:20, Ole Ersoy a écrit : > HI Luc, Hi Ole, > > On 09/23/2015 03:02 AM, luc wrote: >> Hi, >> >> Le 2015-09-22 02:55, Ole Ersoy a écrit : >>> Hola, >>> >>> On 09/21/2015 04:15 PM, Gilles wrote: Hi. On Sun, 20 Sep 2015 15:04:08 -0500, Ole Ersoy wrote: > On 09/20/2

Re: [Math] LeastSquaresOptimizer Design

2015-09-23 Thread Ole Ersoy
Luc, Just wanted to mention one more thing (On top of the other 325 :) ). The callback design does not bubble exceptions, but we can still get the same effect, and do better. For the app we would define a global error handler and make that handler part of each callback. So if are using: Foo

Re: [Math] LeastSquaresOptimizer Design

2015-09-23 Thread Ole Ersoy
HI Luc, On 09/23/2015 03:02 AM, luc wrote: Hi, Le 2015-09-22 02:55, Ole Ersoy a écrit : Hola, On 09/21/2015 04:15 PM, Gilles wrote: Hi. On Sun, 20 Sep 2015 15:04:08 -0500, Ole Ersoy wrote: On 09/20/2015 05:51 AM, Gilles wrote: On Sun, 20 Sep 2015 01:12:49 -0500, Ole Ersoy wrote: Wanted t

Re: [Math] LeastSquaresOptimizer Design

2015-09-23 Thread Gilles
Hello Luc. I obviously agree with your main conclusion in that exceptions are still a better alternative to what (we think) we understood from Ole's proposal. However I don't agree about what is a "mess" on the "exception front" and what is not, and which part of the library is more to blame

Re: [Math] LeastSquaresOptimizer Design

2015-09-23 Thread luc
Hi, Le 2015-09-22 02:55, Ole Ersoy a écrit : Hola, On 09/21/2015 04:15 PM, Gilles wrote: Hi. On Sun, 20 Sep 2015 15:04:08 -0500, Ole Ersoy wrote: On 09/20/2015 05:51 AM, Gilles wrote: On Sun, 20 Sep 2015 01:12:49 -0500, Ole Ersoy wrote: Wanted to float some ideas for the LeastSquaresOptimi

Re: [Math] LeastSquaresOptimizer Design

2015-09-22 Thread Ole Ersoy
One more thing - This is separate from the other stuff. The LMOptimizer has several configuration properties, with corresponding getters and a corresponding with() API. It would be good if these existed on their own class that used Lombok (https://projectlombok.org/) to generate (Byte code) t

Re: [Math] LeastSquaresOptimizer Design

2015-09-22 Thread Ole Ersoy
On 09/22/2015 06:46 AM, Gilles wrote: Hi. On Mon, 21 Sep 2015 19:55:15 -0500, Ole Ersoy wrote: Hola, On 09/21/2015 04:15 PM, Gilles wrote: Hi. On Sun, 20 Sep 2015 15:04:08 -0500, Ole Ersoy wrote: On 09/20/2015 05:51 AM, Gilles wrote: On Sun, 20 Sep 2015 01:12:49 -0500, Ole Ersoy wrote: Wa

Re: [Math] LeastSquaresOptimizer Design

2015-09-22 Thread Gilles
Hi. On Mon, 21 Sep 2015 19:55:15 -0500, Ole Ersoy wrote: Hola, On 09/21/2015 04:15 PM, Gilles wrote: Hi. On Sun, 20 Sep 2015 15:04:08 -0500, Ole Ersoy wrote: On 09/20/2015 05:51 AM, Gilles wrote: On Sun, 20 Sep 2015 01:12:49 -0500, Ole Ersoy wrote: Wanted to float some ideas for the LeastSq

Re: [Math] LeastSquaresOptimizer Design

2015-09-21 Thread Ole Ersoy
Hola, On 09/21/2015 04:15 PM, Gilles wrote: Hi. On Sun, 20 Sep 2015 15:04:08 -0500, Ole Ersoy wrote: On 09/20/2015 05:51 AM, Gilles wrote: On Sun, 20 Sep 2015 01:12:49 -0500, Ole Ersoy wrote: Wanted to float some ideas for the LeastSquaresOptimizer (Possibly General Optimizer) design. For e

Re: [Math] LeastSquaresOptimizer Design

2015-09-21 Thread Gilles
Hi. On Sun, 20 Sep 2015 15:04:08 -0500, Ole Ersoy wrote: On 09/20/2015 05:51 AM, Gilles wrote: On Sun, 20 Sep 2015 01:12:49 -0500, Ole Ersoy wrote: Wanted to float some ideas for the LeastSquaresOptimizer (Possibly General Optimizer) design. For example with the LevenbergMarquardtOptimizer we

Re: [Math] LeastSquaresOptimizer Design

2015-09-20 Thread Ole Ersoy
On 09/20/2015 05:51 AM, Gilles wrote: On Sun, 20 Sep 2015 01:12:49 -0500, Ole Ersoy wrote: Wanted to float some ideas for the LeastSquaresOptimizer (Possibly General Optimizer) design. For example with the LevenbergMarquardtOptimizer we would do: `LevenbergMarquardtOptimizer.optimize(Optimiza

Re: [Math] LeastSquaresOptimizer Design

2015-09-20 Thread Gilles
On Sun, 20 Sep 2015 01:12:49 -0500, Ole Ersoy wrote: Wanted to float some ideas for the LeastSquaresOptimizer (Possibly General Optimizer) design. For example with the LevenbergMarquardtOptimizer we would do: `LevenbergMarquardtOptimizer.optimize(OptimizationContext c);` Rough optimize() outlin

[Math] LeastSquaresOptimizer Design

2015-09-19 Thread Ole Ersoy
Wanted to float some ideas for the LeastSquaresOptimizer (Possibly General Optimizer) design. For example with the LevenbergMarquardtOptimizer we would do: `LevenbergMarquardtOptimizer.optimize(OptimizationContext c);` Rough optimize() outline: public static void optimise() { //perform the opt