Source code for glimix_core.link._link

from numpy import asarray, exp, log


def _value_doc(func):
    func.__doc__ = """Link function evaluated at the given points.

        Parameters
        ----------
        x : array_like
            Array of points.

        Returns
        -------
        ndarray
            Link function values.
        """
    return func


def _inv_doc(func):
    func.__doc__ = """Inverse of the link function evaluated at the given points.

        Parameters
        ----------
        x : array_like
            Array of points.

        Returns
        -------
        ndarray
            Inverse of the link function values.
        """
    return func














def _normal_cdf(x):
    import scipy.stats as st

    return st.norm.cdf(x)


def _normal_icdf(x):
    import scipy.stats as st

    return st.norm.isf(1 - x)