Speed up sampling of kernel estimate

前端 未结 2 864
轮回少年
轮回少年 2020-12-11 03:25

Here\'s a MWE of a much larger code I\'m using. Basically, it performs a Monte Carlo integration over a KDE (kernel density estimate) for all values located bel

2条回答
  •  臣服心动
    2020-12-11 03:51

    The claim in the comments section of this article (link below) is

    "SciPy’s gaussian_kde doesn’t use FFT, while there is a statsmodels implementation that does"

    …which is a possible cause of the observed poor performance. It goes on to report orders of magnitude improvement using FFT. See @jseabold's reply.

    http://slendrmeans.wordpress.com/2012/05/01/will-it-python-machine-learning-for-hackers-chapter-2-part-1-summary-stats-and-density-estimators/

    Disclaimer: I have no experience with statsmodels or scipy.

提交回复
热议问题