KPDF - 0.2

Kernel-based Probability Density Function Estimation.



The module contains functions for univariate and multivariate density function estimation using a kernel-based approach (Silverman, 1986). There are some other utility functions which provide simple estimations of the optimal bandwidth parameter.

It is entirely written in C to allow a fast execution, mainly for two and three dimensional estimations with several points.


To be able to use it, you will need:
  1.  Python ;-)
If you want to be able to run the tests for multivariate PDFs, you will also need:
  1.  netCDF library 3.4 or later
  2.  Scientific Python, by Konrad Hinsen


For UNIX platforms (the OLD way): should suffice. The last step will probably require root privileges.

Dec-2002. Michiel Jan Laurens de Hoon, University of Tokyo, Institute of Medical Science, has contributed a binary Windows port of the package and a script for the module and a new source distribution, which can now be compiled by the new method "python install". These files DO NOT hold additional testing files, so, python will NOT work unless you download the old distribution. For Windows, the testing of high-dimensional PDFs will not be posible unless you also install Scientific.IO.NetCDF at your own risk (it will not be easy, though). The fact that the test do not work does not mean that KPDF does not work. It simply means that the regression tests can not proceed due to the lack of access to netCDF files in this platform. Thanks, Michiel.

Feb-2004. Michiel de Hoon, University of Tokyo, Institute of Medical Science, Human Genome Center ( has contributed new installers for windows and a bugfix for the C module, so that it currently checks that an array is being passed to the code, instead of any other type of Python container. We have called this the 0.2 version of the code and here are the source distribution and the windows installers of version 0.2, kindly provided by Michiel. The source distribution contains the files for the tests:


A README file in the distribution provides information on the parameters to the functions. For mathematical details, refer to the original literature (Silverman, 1986). A thorough documentation in Postscript/PDF/Latex is under preparation.


VERSION 0.1: Europe, source tarball including a script but not tests. USA, source tarball including a script but not tests Europe (old source tarballs) USA (old source tarballs) Europe, Windows installer but no tests. USA, Windows installer but no tests.

VERSION 0.2 (see above):

Any feedback from the users of the module will be appreciated by the author.

Jon Saenz


It is released under the GNU Public License.



B. W. Silverman (1986) Density Estimation for Statistics and Data Analysis, 1st edition, Chapman and Hall, London, 175 pages.