Compute the inverse of conditional cumulative distribution :math:`C(u|v)^-1`

        Args:
            y: `np.ndarray` value of :math:`C(u|v)`.
            v: `np.ndarray` given value of v.
13758
def percent_point(self, y, V):
        
        self.check_fit()

        if self.theta < 0:
            return V

        else:
            a = np.power(y, self.theta / (-1 - self.theta))
            b = np.power(V, self.theta)
            u = np.power((a + b - 1) / b, -1 / self.theta)
            return u
486388
def tnr(y_true, y_pred, round=True):
    
    y_true, y_pred = _mask_value_nan(y_true, y_pred)
    if round:
        y_true = np.round(y_true)
        y_pred = np.round(y_pred)
    c = skm.confusion_matrix(y_true, y_pred)
    return c[0, 0] / c[0].sum()
426018
def inverse_prediction(self, s_g):
        
        return self.infer(self.conf.s_dims, self.conf.m_dims, s_g)
531441
def obfn_cns(self):
        
        """

        Y = self.obfn_gvar()
        return np.linalg.norm((self.Pcn(Y) - Y))
580218
def f_nc(self,x):
        '''
        
        '''
        x = np.atleast_2d(x)
        xx = self.context_manager._expand_vector(x)
        if x.shape[0] == 1:
            return self.f(xx)[0]
        else:
            return self.f(xx)
709417
def _optm(x, alpha, mu, sigma):
    '''
    '''
    return ss.skewnorm.pdf(x, alpha, mu, sigma)
983863
def fpr(y, z):
    
    tp, tn, fp, fn = contingency_table(y, z)
    return fp / (fp + tn)
197653
def cat_acc(y_true, y_pred):
    
    return np.mean(y_true.argmax(axis=1) == y_pred.argmax(axis=1))
1316296
def _get_covariance(self, X):
        
        result = pd.DataFrame(index=range(len(X)))
        column_names = self.get_column_names(X)
        for column_name in column_names:
            column = self.get_column(X, column_name)
            distrib = self.distribs[column_name]

            # get original distrib's cdf of the column
            cdf = distrib.cumulative_distribution(column)

            if distrib.constant_value is not None:
                # This is to avoid np.inf in the case the column is constant.
                cdf = np.ones(column.shape) - EPSILON

            # get inverse cdf using standard normal
            result = self.set_column(result, column_name, stats.norm.ppf(cdf))

        # remove any rows that have infinite values
        result = result[(result != np.inf).all(axis=1)]
        return pd.DataFrame(data=result).cov().values
892733
def compute(self, x_arr, y_arr):
        '''
        
        '''
        x_arr = x_arr / np.linalg.norm(x_arr, ord=1)
        y_arr = y_arr / np.linalg.norm(y_arr, ord=1)
        mixture_arr = 0.5 * (x_arr + y_arr)
        return 0.5 * (super().compute(x_arr, mixture_arr) + super().compute(y_arr, mixture_arr))
1080716
def gaussianize(Y):
    
    N,P = Y.shape

    YY=toRanks(Y)
    quantiles=(sp.arange(N)+0.5)/N
    gauss = st.norm.isf(quantiles)
    Y_gauss=sp.zeros((N,P))
    for i in range(P):
        Y_gauss[:,i] = gauss[YY[:,i]]
    Y_gauss *= -1
    return Y_gauss
642929
def obfn_gvar(self):
        

        if self.opt['gEvalY']:
            return self.Y
        else:
            return self.cnst_A(self.X) - self.cnst_c()
1282811
def invcdf(x):
    """"""
    x_flat = np.ravel(x)
    x_trans = np.array([flib.ppnd16(y, 1) for y in x_flat])
    return np.reshape(x_trans, np.shape(x))
592423
def calc_uv(self, x, y, prev=False):
        """"""
        assert len(x) == self.N
        assert len(y) == self.N
        u = np.zeros(self.N, self.x.dtype)
        v = np.zeros(self.N, self.y.dtype)
        for n in xrange(self.N):
            # don't include self interaction
            if prev:
                x0 = self.xprev[np.r_[:n,n+1:self.N]]
                y0 = self.yprev[np.r_[:n,n+1:self.N]]
            else:
                x0 = self.x[np.r_[:n,n+1:self.N]]
                y0 = self.y[np.r_[:n,n+1:self.N]]
            s0 = self.s[np.r_[:n,n+1:self.N]]
            u0, v0 = self.uv_at_xy(x[n], y[n], x0, y0, s0)
            u[n] = u0.sum()
            v[n] = v0.sum()
        return u, v
363199
def obfn_g(self, Y):
        
        """

        return self.obfn_g0(self.obfn_g0var()) + \
            self.obfn_g1(self.obfn_g1var())
747818
def kappa(self, x, y, kwargs, diff=diff):
        
        f_xx, f_xy, f_yx, f_yy = self.hessian(x, y, kwargs, diff=diff)
        kappa = 1./2 * (f_xx + f_yy)
        return kappa
1131832
def TP0(dv, u):
    ''''''
    return np.linalg.norm(np.array(dv)) + np.linalg.norm(np.array(u))