dstats

Convenience module that simply publicly imports everything else.

Modules

alloc
module dstats.alloc

Stuff having to do with memory management. Mostly a copy of RegionAllocator for now until it gets into Phobos, as well as some RegionAllocator-specific data structures.

base
module dstats.base

Relatively low-level primitives on which to build higher-level math/stat functionality. Some are used internally, some are just things that may be useful to users of this library. This module is starting to take on the appearance of a small utility library.

cor
module dstats.cor

Pearson, Spearman and Kendall correlations, covariance.

distrib
module dstats.distrib

Probability distribution CDFs, PDFs/PMFs, and a few inverse CDFs.

infotheory
module dstats.infotheory

Basic information theory. Joint entropy, mutual information, conditional mutual information. This module uses the base 2 definition of these quantities, i.e, entropy, mutual info, etc. are output in bits.

kerneldensity
module dstats.kerneldensity

This module contains a small but growing library for performing kernel density estimation.

pca
module dstats.pca

This module contains a basic implementation of principal component analysis, based on the NIPALS algorithm. This is fast when you only need the first few components (which is usually the case since PCA's main uses are visualization and dimensionality reduction). However, convergence slows drastically after the first few components have been removed and most of the matrix is just noise.

random
module dstats.random

Generates random samples from a various probability distributions. These are mostly D ports of the NumPy random number generators.

regress
module dstats.regress

A module for performing linear regression. This module has an unusual interface, as it is range-based instead of matrix based. Values for independent variables are provided as either a tuple or a range of ranges. This means that one can use, for example, map, to fit high order models and lazily evaluate certain values. (For details, see examples below.)

sort
module dstats.sort

A comprehensive sorting library for statistical functions. Each function takes N arguments, which are arrays or array-like objects, sorts the first and sorts the rest in lockstep. For merge and insertion sort, if the last argument is a ulong*, increments the dereference of this ulong* by the bubble sort distance between the first argument and the sorted version of the first argument. This is useful for some statistical calculations.

summary
module dstats.summary

Summary statistics such as mean, median, sum, variance, skewness, kurtosis. Except for median and median absolute deviation, which cannot be calculated online, all summary statistics have both an input range interface and an output range interface.

tests
module dstats.tests

Hypothesis testing beyond simple CDFs. All functions work with input ranges with elements implicitly convertible to double unless otherwise noted.

Meta