Re: [Dhis2-devs] [Bug 1065014] Re: Min/Max generation goes into negative

2015-09-20 Thread Jason Pickering
Truncation was a poor choice of words. Let me explain what I mean. >From line of MinMaxOutlierAnalysisService.java we see what is happening. ... for ( Integer unit : averages.keySet() ) { Double stdDev = standardDeviations.get( unit

Re: [Dhis2-devs] [Bug 1065014] Re: Min/Max generation goes into negative

2015-09-20 Thread Calle Hedberg
Jason, "with all the truncation of data going on" - ?? Not sure what you mean by that, but I users don't regard min-max values as a kind of "hard" range - it has never been intended to be that, except (at least in DHIS 1.4) where you specify a min-max to be ABSOLUTE. For everything else, it is a

Re: [Dhis2-devs] [Bug 1065014] Re: Min/Max generation goes into negative

2015-09-19 Thread Jason Pickering
Hi Calle, The problem is the premise upon which this algorithm is based is flawed, I would say. There is really no reason to believe that the data is normally distributed, or should be, unless of course it has been proved to be a reliable and appropriate model. What we are seeking to do is to elimi

Re: [Dhis2-devs] [Bug 1065014] Re: Min/Max generation goes into negative

2015-09-18 Thread Calle Hedberg
Hi, Ah - bugger, I completely forgot about then zero or positive type, which provides the same effect (if set). my bad.. Jason's point is correct, but in my opinion less important for most types of routine data where the primary function of the min-max values is to highlight likely data capturing

Re: [Dhis2-devs] [Bug 1065014] Re: Min/Max generation goes into negative

2015-09-18 Thread Jason Pickering
Hi there. The current design is to take the mean, and calculate n-standard deviations away from the mean, for a given data element/orgunit/catcombo set of data values. If the data value is set to be zero or positive integer, and can never have a negative value and does not follow a normal distribut

[Dhis2-devs] [Bug 1065014] Re: Min/Max generation goes into negative

2015-09-18 Thread Lars Helge Ă˜verland
This is not a design flaw. It depends on the data element value type property. The default value type is "number", for which negative values are perfectly valid. One can set the value type to "Positive number", in this case the min-max values will never be less than zero. ** Changed in: dhis2

Re: [Dhis2-devs] [Bug 1065014] Re: Min/Max generation goes into negative

2015-09-18 Thread Calle Hedberg
Hi, Design flaw: Min-max values should never be negative - I think DHIS 1 had 0 as the lowest relevant value since the start back in the late 90's. Easy to implement... Regards Calle On 18 September 2015 at 12:18, jason.p.pickering <1065...@bugs.launchpad.net > wrote: > Not a bug per se, but as

[Dhis2-devs] [Bug 1065014] Re: Min/Max generation goes into negative

2015-09-18 Thread jason.p.pickering
Not a bug per se, but as you note but rather the nature of the min/max value generation algorithm, which is based on a number of standard deviations from the mean of the data values. Work around is to specify the min/max values your self according to your own custom algorithm. ** Changed in: dhis