ó
áp7]c           @   s¯   d  Z  d d l m Z d d l m Z m Z d d l Z d d l m	 Z	 d d l
 m Z m Z m Z m Z m Z d d	 d
 g Z d e f d „  ƒ  YZ d	 e f d „  ƒ  YZ d S(   sZ  
Multivariate Conditional and Unconditional Kernel Density Estimation
with Mixed Data Types.

References
----------
[1] Racine, J., Li, Q. Nonparametric econometrics: theory and practice.
    Princeton University Press. (2007)
[2] Racine, Jeff. "Nonparametric Econometrics: A Primer," Foundation
    and Trends in Econometrics: Vol 3: No 1, pp1-88. (2008)
    http://dx.doi.org/10.1561/0800000009
[3] Racine, J., Li, Q. "Nonparametric Estimation of Distributions
    with Categorical and Continuous Data." Working Paper. (2000)
[4] Racine, J. Li, Q. "Kernel Estimation of Multivariate Conditional
    Distributions Annals of Economics and Finance 5, 211-235 (2004)
[5] Liu, R., Yang, L. "Kernel estimation of multivariate
    cumulative distribution function."
    Journal of Nonparametric Statistics (2008)
[6] Li, R., Ju, G. "Nonparametric Estimation of Multivariate CDF
    with Categorical and Continuous Data." Working Paper
[7] Li, Q., Racine, J. "Cross-validated local linear nonparametric
    regression" Statistica Sinica 14(2004), pp. 485-512
[8] Racine, J.: "Consistent Significance Testing for Nonparametric
        Regression" Journal of Business & Economics Statistics
[9] Racine, J., Hart, J., Li, Q., "Testing the Significance of
        Categorical Predictor Variables in Nonparametric Regression
        Models", 2006, Econometric Reviews 25, 523-544

iÿÿÿÿ(   t   division(   t   ranget   nextNi   (   t   kernels(   t
   GenericKDEt   EstimatorSettingst   gpket   LeaveOneOutt   _adjust_shapet   KDEMultivariatet   KDEMultivariateConditionalR   c           B   s_   e  Z d  Z d	 d	 d „ Z d „  Z d „  d „ Z d	 d „ Z d	 d „ Z d „  Z	 d „  Z
 RS(
   sª  
    Multivariate kernel density estimator.

    This density estimator can handle univariate as well as multivariate data,
    including mixed continuous / ordered discrete / unordered discrete data.
    It also provides cross-validated bandwidth selection methods (least
    squares, maximum likelihood).

    Parameters
    ----------
    data: list of ndarrays or 2-D ndarray
        The training data for the Kernel Density Estimation, used to determine
        the bandwidth(s).  If a 2-D array, should be of shape
        (num_observations, num_variables).  If a list, each list element is a
        separate observation.
    var_type: str
        The type of the variables:

            - c : continuous
            - u : unordered (discrete)
            - o : ordered (discrete)

        The string should contain a type specifier for each variable, so for
        example ``var_type='ccuo'``.
    bw: array_like or str, optional
        If an array, it is a fixed user-specified bandwidth.  If a string,
        should be one of:

            - normal_reference: normal reference rule of thumb (default)
            - cv_ml: cross validation maximum likelihood
            - cv_ls: cross validation least squares

    defaults: EstimatorSettings instance, optional
        The default values for (efficient) bandwidth estimation.

    Attributes
    ----------
    bw: array_like
        The bandwidth parameters.

    See Also
    --------
    KDEMultivariateConditional

    Examples
    --------
    >>> import statsmodels.api as sm
    >>> nobs = 300
    >>> np.random.seed(1234)  # Seed random generator
    >>> c1 = np.random.normal(size=(nobs,1))
    >>> c2 = np.random.normal(2, 1, size=(nobs,1))

    Estimate a bivariate distribution and display the bandwidth found:

    >>> dens_u = sm.nonparametric.KDEMultivariate(data=[c1,c2],
    ...     var_type='cc', bw='normal_reference')
    >>> dens_u.bw
    array([ 0.39967419,  0.38423292])
    c         C   sÔ   | |  _  t |  j  ƒ |  _ t | |  j ƒ |  _ | |  _ t j |  j ƒ \ |  _ |  _ |  j |  j k rx t	 d ƒ ‚ n  | d  k r t ƒ  n | } |  j | ƒ |  j s¾ |  j | ƒ |  _ n |  j | ƒ |  _ d  S(   NsG   The number of observations must be larger than the number of variables.(   t   var_typet   lent   k_varsR   t   datat	   data_typet   npt   shapet   nobst
   ValueErrort   NoneR   t   _set_defaultst	   efficientt   _compute_bwt   bwt   _compute_efficient(   t   selfR   R   R   t   defaults(    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   __init__h   s    			c         C   sj   d } | d t  |  j ƒ d 7} | d t  |  j ƒ d 7} | d |  j d 7} | d |  j d 7} | S(   s    Provide something sane to print.s   KDE instance
s   Number of variables: k_vars = s   
s   Number of samples:   nobs = s   Variable types:      s   BW selection method: (   t   strR   R   R   t
   _bw_method(   R   t   rpr(    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   __repr__x   s    c         C   s   |  S(   N(    (   t   x(    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   <lambda>   t    c      
   C   s}   t  |  j ƒ } d } x` t | ƒ D]R \ } } t | d | d |  j | d d … f d |  j ƒ} | | | ƒ 7} q" W| S(   sV  
        Returns the leave-one-out likelihood function.

        The leave-one-out likelihood function for the unconditional KDE.

        Parameters
        ----------
        bw: array_like
            The value for the bandwidth parameter(s).
        func: callable, optional
            Function to transform the likelihood values (before summing); for
            the log likelihood, use ``func=np.log``.  Default is ``f(x) = x``.

        Notes
        -----
        The leave-one-out kernel estimator of :math:`f_{-i}` is:

        .. math:: f_{-i}(X_{i})=\frac{1}{(n-1)h}
                    \sum_{j=1,j\neq i}K_{h}(X_{i},X_{j})

        where :math:`K_{h}` represents the generalized product kernel
        estimator:

        .. math:: K_{h}(X_{i},X_{j}) =
            \prod_{s=1}^{q}h_{s}^{-1}k\left(\frac{X_{is}-X_{js}}{h_{s}}\right)
        i    R   t   data_predictNR   (   R   R   t	   enumerateR   R   (   R   R   t   funct   LOOt   Lt   it   X_not_it   f_i(    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   loo_likelihood   s    *c         C   s¬   | d k r |  j } n t | |  j ƒ } g  } xf t t j | ƒ d ƒ D]K } | j t |  j	 d |  j d | | d d … f d |  j
 ƒ|  j ƒ qJ Wt j | ƒ } | S(   sR  
        Evaluate the probability density function.

        Parameters
        ----------
        data_predict: array_like, optional
            Points to evaluate at.  If unspecified, the training data is used.

        Returns
        -------
        pdf_est: array_like
            Probability density function evaluated at `data_predict`.

        Notes
        -----
        The probability density is given by the generalized product kernel
        estimator:

        .. math:: K_{h}(X_{i},X_{j}) =
            \prod_{s=1}^{q}h_{s}^{-1}k\left(\frac{X_{is}-X_{js}}{h_{s}}\right)
        i    R   R$   NR   (   R   R   R   R   R   R   R   t   appendR   R   R   R   t   squeeze(   R   R$   t   pdf_estR)   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   pdf¥   s     c         C   s¾   | d k r |  j } n t | |  j ƒ } g  } xx t t j | ƒ d ƒ D]] } | j t |  j	 d |  j d | | d d … f d |  j
 d d d d	 d
 d ƒ|  j ƒ qJ Wt j | ƒ } | S(   s¡  
        Evaluate the cumulative distribution function.

        Parameters
        ----------
        data_predict: array_like, optional
            Points to evaluate at.  If unspecified, the training data is used.

        Returns
        -------
        cdf_est: array_like
            The estimate of the cdf.

        Notes
        -----
        See http://en.wikipedia.org/wiki/Cumulative_distribution_function
        For more details on the estimation see Ref. [5] in module docstring.

        The multivariate CDF for mixed data (continuous and ordered/unordered
        discrete) is estimated by:

        .. math::

            F(x^{c},x^{d})=n^{-1}\sum_{i=1}^{n}\left[G(\frac{x^{c}-X_{i}}{h})\sum_{u\leq x^{d}}L(X_{i}^{d},x_{i}^{d}, \lambda)\right]

        where G() is the product kernel CDF estimator for the continuous
        and L() for the discrete variables.

        Used bandwidth is ``self.bw``.
        i    R   R$   NR   t   ckertypet   gaussian_cdft   ukertypet   aitchisonaitken_cdft   okertypet   wangryzin_cdf(   R   R   R   R   R   R   R   R-   R   R   R   R   R.   (   R   R$   t   cdf_estR)   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   cdfÉ   s     	c         C   se  d } t  d t j d t j d t j ƒ } |  j } |  j } |  j } t j	 g  | D] } | d k ^ qS ƒ } | | j
 ƒ  }	 t j | j ƒ }
 x§ t | ƒ D]™ } x^ t | ƒ D]P \ } } | | | | | d d … | f | | | f ƒ |
 d d … | f <q° W|
 j
 d d ƒ |	 } | j d d ƒ } | | 7} q Wt  d t j d t j d t j ƒ } t |  j ƒ } d } t j | j d d | j d f ƒ }
 x¨ t | ƒ D]š \ } } x_ t | ƒ D]Q \ } } | | | | | d d … | f | | | f ƒ |
 d d … | f <qÀW|
 j
 d d ƒ |	 } | | j d d ƒ 7} q§W| | d d | | | d S(	   sˆ  
        Returns the Integrated Mean Square Error for the unconditional KDE.

        Parameters
        ----------
        bw: array_like
            The bandwidth parameter(s).

        Returns
        -------
        CV: float
            The cross-validation objective function.

        Notes
        -----
        See p. 27 in [1]_ for details on how to handle the multivariate
        estimation with mixed data types see p.6 in [2]_.

        The formula for the cross-validation objective function is:

        .. math:: CV=\frac{1}{n^{2}}\sum_{i=1}^{n}\sum_{j=1}^{N}
            \bar{K}_{h}(X_{i},X_{j})-\frac{2}{n(n-1)}\sum_{i=1}^{n}
            \sum_{j=1,j\neq i}^{N}K_{h}(X_{i},X_{j})

        Where :math:`\bar{K}_{h}` is the multivariate product convolution
        kernel (consult [2]_ for mixed data types).

        References
        ----------
        .. [1] Racine, J., Li, Q. Nonparametric econometrics: theory and
                practice. Princeton University Press. (2007)
        .. [2] Racine, J., Li, Q. "Nonparametric Estimation of Distributions
                with Categorical and Continuous Data." Working Paper. (2000)
        i    t   ct   ot   uNt   axisi   i   (   t   dictR   t   gaussian_convolutiont   wang_ryzin_convolutiont   aitchison_aitken_convolutionR   R   R   R   t   arrayt   prodt   emptyR   R   R%   t   sumt   gaussiant
   wang_ryzint   aitchison_aitkenR   (   R   R   t   Ft   kertypesR   R   R   R9   t   ix_contt   _bw_cont_productt   KvalR)   t   iit   vtypet   denst	   k_bar_sumR'   R(   R*   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   imseù   s@    3		
	('	''c         C   s   d } |  j  f } | | f S(   s@   Helper method to be able to pass needed vars to _compute_subset.R	   (   R   (   R   t
   class_typet
   class_vars(    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   _get_class_vars_typeQ  s    N(   t   __name__t
   __module__t   __doc__R   R   R    R,   R0   R8   RQ   RT   (    (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyR	   ,   s   ;		$$0	Xc           B   sb   e  Z d  Z d	 d „ Z d „  Z d „  d „ Z d	 d	 d „ Z d	 d	 d „ Z d „  Z	 d „  Z
 RS(
   sv  
    Conditional multivariate kernel density estimator.

    Calculates ``P(Y_1,Y_2,...Y_n | X_1,X_2...X_m) =
    P(X_1, X_2,...X_n, Y_1, Y_2,..., Y_m)/P(X_1, X_2,..., X_m)``.
    The conditional density is by definition the ratio of the two densities,
    see [1]_.

    Parameters
    ----------
    endog: list of ndarrays or 2-D ndarray
        The training data for the dependent variables, used to determine
        the bandwidth(s).  If a 2-D array, should be of shape
        (num_observations, num_variables).  If a list, each list element is a
        separate observation.
    exog: list of ndarrays or 2-D ndarray
        The training data for the independent variable; same shape as `endog`.
    dep_type: str
        The type of the dependent variables:

            c : Continuous
            u : Unordered (Discrete)
            o : Ordered (Discrete)

        The string should contain a type specifier for each variable, so for
        example ``dep_type='ccuo'``.
    indep_type: str
        The type of the independent variables; specifed like `dep_type`.
    bw: array_like or str, optional
        If an array, it is a fixed user-specified bandwidth.  If a string,
        should be one of:

            - normal_reference: normal reference rule of thumb (default)
            - cv_ml: cross validation maximum likelihood
            - cv_ls: cross validation least squares

    defaults: Instance of class EstimatorSettings
        The default values for the efficient bandwidth estimation

    Attributes
    ----------
    bw: array_like
        The bandwidth parameters

    See Also
    --------
    KDEMultivariate

    References
    ----------
    .. [1] http://en.wikipedia.org/wiki/Conditional_probability_distribution

    Examples
    --------
    >>> import statsmodels.api as sm
    >>> nobs = 300
    >>> c1 = np.random.normal(size=(nobs,1))
    >>> c2 = np.random.normal(2,1,size=(nobs,1))

    >>> dens_c = sm.nonparametric.KDEMultivariateConditional(endog=[c1],
    ...     exog=[c2], dep_type='c', indep_type='c', bw='normal_reference')
    >>> dens_c.bw   # show computed bandwidth
    array([ 0.41223484,  0.40976931])
    c         C   s  | |  _  | |  _ | | |  _ t |  j  ƒ |  _ t |  j ƒ |  _ t | |  j ƒ |  _ t | |  j ƒ |  _ t	 j
 |  j ƒ \ |  _ |  _ t	 j |  j |  j f ƒ |  _ t	 j
 |  j ƒ d |  _ | d  k r× t ƒ  n | } |  j | ƒ |  j s|  j | ƒ |  _ n |  j | ƒ |  _ d  S(   Ni   (   t   dep_typet
   indep_typeR   R   t   k_dept   k_indepR   t   endogt   exogR   R   R   t   column_stackR   R   R   R   R   R   R   R   R   (   R   R\   R]   RX   RY   R   R   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyR   š  s    			c         C   sš   d } | d t  |  j ƒ d 7} | d t  |  j ƒ d 7} | d t  |  j ƒ d 7} | d |  j d 7} | d |  j d 7} | d |  j d 7} | S(	   s    Provide something sane to print.s$   KDEMultivariateConditional instance
s+   Number of independent variables: k_indep = s   
s'   Number of dependent variables: k_dep = s   Number of observations: nobs = s!   Independent variable types:      s   Dependent variable types:      s   BW selection method: (   R   R[   RZ   R   RY   RX   R   (   R   R   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyR    ­  s    c         C   s   |  S(   N(    (   R!   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyR"   º  R#   c      
   C   sì   t  |  j ƒ } t  |  j ƒ j ƒ  } d } xº t | ƒ D]¬ \ } } t | ƒ } t | d | d |  j | d d … f d |  j |  j ƒ}	 t | |  j	 d | d |  j | d d … f d |  j ƒ}
 |	 |
 } | | | ƒ 7} q7 W| S(   sï  
        Returns the leave-one-out conditional likelihood of the data.

        If `func` is not equal to the default, what's calculated is a function
        of the leave-one-out conditional likelihood.

        Parameters
        ----------
        bw: array_like
            The bandwidth parameter(s).
        func: callable, optional
            Function to transform the likelihood values (before summing); for
            the log likelihood, use ``func=np.log``.  Default is ``f(x) = x``.

        Returns
        -------
        L: float
            The value of the leave-one-out function for the data.

        Notes
        -----
        Similar to ``KDE.loo_likelihood`, but substitute ``f(y|x)=f(x,y)/f(x)``
        for ``f(x)``.
        i    R   R$   NR   (
   R   R   R]   t   __iter__R%   R   R   RX   RY   RZ   (   R   R   R&   t   yLOOt   xLOOR(   R)   t   Y_jR*   t   f_yxt   f_xR+   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyR,   º  s    *
c      
   C   s-  | d k r |  j } n t | |  j ƒ } | d k rB |  j } n t | |  j ƒ } g  } t j | | f ƒ } x® t t j	 | ƒ d ƒ D]“ } t
 |  j d |  j d | | d d … f d |  j |  j ƒ} t
 |  j |  j d |  j d | | d d … f d |  j ƒ} | j | | ƒ q‰ Wt j | ƒ S(   sN  
        Evaluate the probability density function.

        Parameters
        ----------
        endog_predict: array_like, optional
            Evaluation data for the dependent variables.  If unspecified, the
            training data is used.
        exog_predict: array_like, optional
            Evaluation data for the independent variables.

        Returns
        -------
        pdf: array_like
            The value of the probability density at `endog_predict` and `exog_predict`.

        Notes
        -----
        The formula for the conditional probability density is:

        .. math:: f(y|x)=\frac{f(x,y)}{f(x)}

        with

        .. math:: f(x)=\prod_{s=1}^{q}h_{s}^{-1}k
                            \left(\frac{x_{is}-x_{js}}{h_{s}}\right)

        where :math:`k` is the appropriate kernel for each variable.
        i    R   R$   NR   (   R   R\   R   RZ   R]   R[   R   R^   R   R   R   R   R   RX   RY   R-   R.   (   R   t   endog_predictt   exog_predictR/   R$   R)   Rc   Rd   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyR0   â  s"     c   
      C   s­  | d k r |  j } n t | |  j ƒ } | d k rB |  j } n t | |  j ƒ } t j | ƒ d } t j | ƒ } x0t	 | ƒ D]"} t
 |  j |  j d |  j d | | d d … f d |  j ƒ|  j } t j | ƒ } t
 |  j d |  j !d |  j d | | d d … f d |  j d d d d	 d
 d d t ƒ} t
 |  j |  j d |  j d | | d d … f d |  j d t ƒ} | | j d d ƒ }	 |	 |  j | | | <qƒ W| S(   sÛ  
        Cumulative distribution function for the conditional density.

        Parameters
        ----------
        endog_predict: array_like, optional
            The evaluation dependent variables at which the cdf is estimated.
            If not specified the training dependent variables are used.
        exog_predict: array_like, optional
            The evaluation independent variables at which the cdf is estimated.
            If not specified the training independent variables are used.

        Returns
        -------
        cdf_est: array_like
            The estimate of the cdf.

        Notes
        -----
        For more details on the estimation see [2]_, and p.181 in [1]_.

        The multivariate conditional CDF for mixed data (continuous and
        ordered/unordered discrete) is estimated by:

        .. math::

            F(y|x)=\frac{n^{-1}\sum_{i=1}^{n}G(\frac{y-Y_{i}}{h_{0}}) W_{h}(X_{i},x)}{\widehat{\mu}(x)}

        where G() is the product kernel CDF estimator for the dependent (y)
        variable(s) and W() is the product kernel CDF estimator for the
        independent variable(s).

        References
        ----------
        .. [1] Racine, J., Li, Q. Nonparametric econometrics: theory and
                practice. Princeton University Press. (2007)
        .. [2] Liu, R., Yang, L. "Kernel estimation of multivariate cumulative
                    distribution function." Journal of Nonparametric
                    Statistics (2008)
        i    R   R$   NR   R1   R2   R3   R4   R5   R6   t   tosumR<   (   R   R\   R   RZ   R]   R[   R   R   RC   R   R   R   RY   R   R.   RX   t   FalseRD   (
   R   Re   Rf   t   N_data_predictR7   R)   t   mu_xt	   cdf_endogt   cdf_exogt   S(    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyR8     s2    )	c         C   sl  t  |  j ƒ } d } t |  j ƒ } t j |  j d d f ƒ } x!t | ƒ D]\ } } | d d … |  j d … f } | d d … d |  j … f }	 t j |	 | ƒ }
 t j | |	 ƒ } t j | | ƒ } t j | | ƒ } t	 | |  j d | d |  j
 | d d … f d |  j d t ƒ} t	 | |  j d | d |  j
 | d d … f d |  j d t ƒ} t	 | d |  j !d |
 d | d |  j d d	 d
 d d d d t ƒ} | | | j ƒ  | d } t	 | d | d |  j | d d … f d |  j |  j ƒ| } t	 | |  j d | d |  j
 | d d … f d |  j ƒ| } | | | d d | | 7} qM W| | S(   s‰  
        The integrated mean square error for the conditional KDE.

        Parameters
        ----------
        bw: array_like
            The bandwidth parameter(s).

        Returns
        -------
        CV: float
            The cross-validation objective function.

        Notes
        -----
        For more details see pp. 156-166 in [1]_. For details on how to
        handle the mixed variable types see [2]_.

        The formula for the cross-validation objective function for mixed
        variable types is:

        .. math:: CV(h,\lambda)=\frac{1}{n}\sum_{l=1}^{n}
            \frac{G_{-l}(X_{l})}{\left[\mu_{-l}(X_{l})\right]^{2}}-
            \frac{2}{n}\sum_{l=1}^{n}\frac{f_{-l}(X_{l},Y_{l})}{\mu_{-l}(X_{l})}

        where

        .. math:: G_{-l}(X_{l}) = n^{-2}\sum_{i\neq l}\sum_{j\neq l}
                        K_{X_{i},X_{l}} K_{X_{j},X_{l}}K_{Y_{i},Y_{j}}^{(2)}

        where :math:`K_{X_{i},X_{l}}` is the multivariate product kernel and
        :math:`\mu_{-l}(X_{l})` is the leave-one-out estimator of the pdf.

        :math:`K_{Y_{i},Y_{j}}^{(2)}` is the convolution kernel.

        The value of the function is minimized by the ``_cv_ls`` method of the
        `GenericKDE` class to return the bw estimates that minimize the
        distance between the estimated and "true" probability density.

        References
        ----------
        .. [1] Racine, J., Li, Q. Nonparametric econometrics: theory and
                practice. Princeton University Press. (2007)
        .. [2] Racine, J., Li, Q. "Nonparametric Estimation of Distributions
                with Categorical and Continuous Data." Working Paper. (2000)
        i    i   NR   R$   R   Rg   R1   t   gauss_convolutionR5   t   wangryzin_convolutionR3   t   aitchisonaitken_convolutioni   (   R   R   t   floatR   R   t   onesR%   RZ   t   kronR   R]   RY   Rh   RX   RD   (   R   R   t   zLOOt   CVR   t   expanderRM   t   Zt   Xt   Yt   Ye_Lt   Ye_Rt   Xe_Lt   Xe_Rt   K_Xi_Xlt   K_Xj_Xlt   K2_Yi_Yjt   Gt   f_X_Yt   m_x(    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyRQ   ^  s>    /	*"c         C   s(   d } |  j  |  j |  j f } | | f S(   s@   Helper method to be able to pass needed vars to _compute_subset.R
   (   RZ   RX   RY   (   R   RR   RS   (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyRT   ®  s    N(   RU   RV   RW   R   R   R    R,   R0   R8   RQ   RT   (    (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyR
   X  s   @	(4H	P(   RW   t
   __future__R    t   statsmodels.compat.pythonR   R   t   numpyR   R#   R   t   _kernel_baseR   R   R   R   R   t   __all__R	   R
   (    (    (    sG   lib/python2.7/site-packages/statsmodels/nonparametric/kernel_density.pyt   <module>   s   (ÿ -