def _kr3(y, alpha=5.0, beta=50.0):
 perc = (alpha, (100.0 - alpha), beta, (100.0 - beta))
 (lower_alpha, upper_alpha, lower_beta, upper_beta) = np.percentile(y, perc)
 l_alpha = np.mean(y[(y < lower_alpha)])
 u_alpha = np.mean(y[(y > upper_alpha)])
 l_beta = np.mean(y[(y < lower_beta)])
 u_beta = np.mean(y[(y > upper_beta)])
 return ((u_alpha - l_alpha) / (u_beta - l_beta))

def _kr3 ( y , alpha = 5.0 , beta = 50.0 ) : perc = ( alpha , ( 100.0 - alpha ) , beta , ( 100.0 - beta ) ) ( lower_alpha , upper_alpha , lower_beta , upper_beta ) = np . percentile ( y , perc ) l_alpha = np . mean ( y [ ( y < lower_alpha ) ] ) u_alpha = np . mean ( y [ ( y > upper_alpha ) ] ) l_beta = np . mean ( y [ ( y < lower_beta ) ] ) u_beta = np . mean ( y [ ( y > upper_beta ) ] ) return ( ( u_alpha - l_alpha ) / ( u_beta - l_beta ) )
kr3 estimator from kim & white parameters y : array-like .