|
From: Luigi B. <lui...@gm...> - 2015-08-27 07:59:03
|
Do they have the same behavior? (That is, keep the statistics but discard the data?) If so, yes, it would probably make the code simpler. Luigi On Thu, Aug 27, 2015 at 9:17 AM Peter Caspers <pca...@gm...> wrote: > ... another idea would be to remove the core from > IncrementalStatistics and replace it with boost accumulators (they are > present since 1.36, so it should be ok), just leaving the interface in > place. Shall I do that ? > Peter > > On 20 August 2015 at 17:56, Peter Caspers <pca...@gm...> wrote: > > Hi, > > > > here > > > > > https://github.com/lballabio/quantlib/blob/master/QuantLib/ql/math/statistics/incrementalstatistics.cpp#L56 > > > > is a check for a negative variance estimation. Indeed I observe this > > happens due to numerical issues sometimes. However, if this is the > > only source for the exception to be thrown, couldn't we just omit the > > check and return the value or if you want max ( v, 0.0 ) ? > > > > In applications it is somewhat unexpected to get an exception when > > just asking for a variance estimation on valid data. > > > > Thank you > > Peter > > > ------------------------------------------------------------------------------ > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > -- <http://leanpub.com/implementingquantlib/> <http://implementingquantlib.com> <http://twitter.com/lballabio> |