Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: lorenz curve
Replies: 5   Last Post: May 13, 2013 7:38 AM

 Messages: [ Previous | Next ]
 Derek Goring Posts: 3,922 Registered: 12/7/04
Re: lorenz curve
Posted: Nov 25, 2005 1:56 AM

Here's my code snippet for calculating the Lorenz curve (for wavelet
detail coefficients D - used for determining a threshold for
denoising):
nD=length(D);
Dsort=sort(abs(D));
E=cumsum(Dsort.^2);
E=E/E(end);
p=[0:nD-1]'/(nD-1);
plot(p,E)

What is the "gini coefficient"? I'm not familiar with that.
Is it the point on the curve where gain in parsimony matches loss of
energy?
If so:
% Find point where tangent touches
dE=[0;(E(3:nD)-E(1:nD-2))/(2*p(2));inf];
[dE,indx]=unique(dE);
ide=round(interp1(dE,[1:length(dE)]',1));
% Denoising threshold
lamL=Dsort(indx(ide));

Date Subject Author
11/24/05 jacob muller
11/24/05 Roger Stafford
11/25/05 Derek Goring
11/25/05 Titus Edelhofer
11/30/05 jacob muller
5/13/13 Pardha