Open In Colab

Convergence Testing

This notebook demonstrates convergence of fastKDE using convergences tests in fastkde.convergence_tests.

The available tests are:

  • testNormal1D

  • testNormal2D

  • testNormalND

  • testMixtureModel

  • testTransitionPDF

  • testConditional

Additional tests can be created by creating a subclass of fastkde.convergence_tests.testDistribution and overriding the sampleDistributions() and pdfStandard() methods.

""" Install libraries if needed. """
try:
    import fastkde
except:
    # install fastkde
    !pip install --upgrade fastkde
    import fastkde
import fastkde.convergence_tests
""" Run the 1D normal test. """
test1d = fastkde.convergence_tests.testNormal1D()
test1d.doTesting()
""" Plot the 1D test results. """

test1d.generatePlots()
../_images/fcfae39e1266199a4f7241cf3a89f118647ee0449f790993984a784a40c26096.png