[Numpy-discussion] help creating a reversed cumulative histogram

Tim Michelsen timmichelsen at gmx-topmail.de
Thu Sep 3 16:01:15 EDT 2009


>> Again, would a function for the
>> "empirical inverse survival function" qualify for the
>> inclusion into numpy or scipy?
> 
> Sorry, I'm too distracted, correcting myself a second time
>  "this should *not* have inverse in it, using inverse was a cut and paste error"
> it's  empirical survival function
I think my fault not paying too much attention to the exact terms.
The pages you sent on "survial function" are marked as to-read.

> If it's just a one-liner with cumsum, then I don't think its necessary
> to have a function for it.
> 
> But following also the previous discussion, it would be useful to have
> the combination of histogram and empirical cdf, sf, and/or pdf to
> define an empirical distribution. As interpretation in terms of
> distribution, normed=True would be necessary, but it could also be an
> option.
And it seems that this is just one call in R.

> One question to your application, in the plot you draw lines and not
> histograms. Is there a reason to use histograms in the calculation
> instead of the full ecdf. (i.e. cumsum on original values instead of
> cumsum on histogrammed values) ?
Well, I was not aware of cumsum and a way to create ecdf with numpy.
I just sereach the list archives for cdf or ecdf.
As my inital version was created in a shreadsheet, I first tried to 
replicate that and get it validated.

Can you give an example of a full ecdf?

In the end I am interested in the points (x and y coordinates) where the 
ecdf intersects with a certain threshold value.
This is the next task:
Get x,y of the cut-point between a vertical or horizontal line and a 
curve with numpy and matplotlib.
Can you point out an example for that?

Best regards,
Timmie







More information about the NumPy-Discussion mailing list