DataPipeline/Processing.py
def percentile(self, x, y, percent=0.95):
        """Find the percentile of a list of y values.
        
        @parameter percent - a float value from 0.0 to 1.0.
        @return - the percentile of the values
        adapted from http://code.activestate.com/recipes/511478/ """

        key=lambda x:x
        y = sorted(y)
        if not y:
            return None
        k = (len(y)-1) * percent
        f = math.floor(k)
        c = math.ceil(k)
        if f == c:
            return key(y[int(k)])
        d0 = key(y[int(f)]) * (c-k)
        d1 = key(y[int(c)]) * (k-f)        
        return d0+d1
Find the percentile of a list of y values.
        
        @parameter percent - a float value from 0.0 to 1.0.
        @return - the percentile of the values
        adapted from http://code.activestate.com/recipes/511478/ 
Find the percentile of a list of y values.
@parameter percent - a float value from 0.0 to 1.0.
Find the percentile of a list of y values . @parameter percent - a float value from 0 . 0 to 1 . 0 .
def percentile(self, x, y, percent=0.95):
        key=lambda x:x
        y = sorted(y)
        if not y:
            return None
        k = (len(y)-1) * percent
        f = math.floor(k)
        c = math.ceil(k)
        if f == c:
            return key(y[int(k)])
        d0 = key(y[int(f)]) * (c-k)
        d1 = key(y[int(c)]) * (k-f)        
        return d0+d1
def percentile ( self , x , y , percent = 0.95 ) : key = lambda x : x y = sorted ( y ) if not y : return None k = ( len ( y ) - 1 ) * percent f = math . floor ( k ) c = math . ceil ( k ) if f == c : return key ( y [ int ( k ) ] ) d0 = key ( y [ int ( f ) ] ) * ( c - k ) d1 = key ( y [ int ( c ) ] ) * ( k - f ) return d0 + d1
Find the percentile of a list of y values.
Find the percentile of a list of y values .
"""Find the percentile of a list of y values.
        
        @parameter percent - a float value from 0.0 to 1.0.
        @return - the percentile of the values
        adapted from http://code.activestate.com/recipes/511478/ """
self
x
y
percent