API Reference

Independence

MaxMargin(indep_test[, compute_distkern, bias])

Maximal Margin test statistic and p-value.

KMERF([forest, ntrees, compute_distance, ...])

Kernel Mean Embedding Random Forest (KMERF) test statistic and p-value.

MGC([compute_distance])

Multiscale Graph Correlation (MGC) test statistic and p-value.

Dcorr([compute_distance, bias])

Distance Correlation (Dcorr) test statistic and p-value.

Hsic([compute_kernel, bias])

Hilbert Schmidt Independence Criterion (Hsic) test statistic and p-value.

HHG([compute_distance])

Heller Heller Gorfine (HHG) test statistic and p-value.

CCA()

Cannonical Correlation Analysis (CCA) test statistic and p-value.

RV()

Rank Value (RV) test statistic and p-value.

FriedmanRafsky(**kwargs)

Friedman-Rafksy (FR) test statistic and p-value.

D-Variate

dHsic([compute_kernel, bias])

\(d\)-variate Hilbert Schmidt Independence Criterion (dHsic) test statistic and p-value.

K-Sample

KSample(indep_test[, compute_distkern, bias])

Nonparametric K-Sample Testing test statistic and p-value.

Energy([compute_distance, bias])

Energy test statistic and p-value.

MMD([compute_kernel, bias])

Maximum Mean Discrepency (MMD) test statistic and p-value.

DISCO([compute_distance, bias])

Distance Components (DISCO) test statistic and p-value.

MANOVA()

Multivariate analysis of variance (MANOVA) test statistic and p-value.

Hotelling()

Hotelling \(T^2\) test statistic and p-value.

SmoothCFTest([num_randfreq])

Smooth Characteristic Function test statistic and p-value

MeanEmbeddingTest([num_randfreq])

Mean Embedding test statistic and p-value.

KSampleHHG([compute_distance])

HHG 2-Sample test statistic.

Time-Series

MGCX([compute_distance, max_lag])

Cross Multiscale Graph Correlation (MGCX) test statistic and p-value.

DcorrX([compute_distance, max_lag])

Cross Distance Correlation (DcorrX) test statistic and p-value.

LjungBox([max_lag])

Ljung-Box for Cross Correlation (CorrX) test statistic and p-value.

Discriminability

DiscrimOneSample([is_dist, remove_isolates])

One Sample Discriminability test statistic and p-value.

DiscrimTwoSample([is_dist, remove_isolates])

Two Sample Discriminability test statistic and p-value.

Conditional Independence

FCIT([model, cv_grid, num_perm, prop_test, ...])

Fast Conditional Independence test statistic and p-value

KCI(**kwargs)

Kernel Conditional Independence Test Statistic and P-Value.

Kernel Goodness-of-Fit

FSSD(p, k, V[, null_sim, alpha])

Goodness-of-fit test using The Finite Set Stein Discrepancy statistic.

Simulations

Independence Simulations

linear(n, p[, noise, low, high])

Linear simulation.

exponential(n, p[, noise, low, high])

Exponential simulation.

cubic(n, p[, noise, low, high, cubs, scale])

Cubic simulation.

joint_normal(n, p[, noise])

Joint Normal simulation.

step(n, p[, noise, low, high])

Step simulation.

quadratic(n, p[, noise, low, high])

Quadratic simulation.

w_shaped(n, p[, noise, low, high])

W-Shaped simulation.

spiral(n, p[, noise, low, high])

Spiral simulation.

uncorrelated_bernoulli(n, p[, noise, prob])

Uncorrelated Bernoulli simulation.

logarithmic(n, p[, noise])

Logarithmic simulation.

fourth_root(n, p[, noise, low, high])

Fourth Root simulation.

sin_four_pi(n, p[, noise, low, high])

Sine 4\(\pi\) simulation.

sin_sixteen_pi(n, p[, noise, low, high])

Sine 16\(\pi\) simulation.

square(n, p[, noise, low, high])

Square simulation.

two_parabolas(n, p[, noise, low, high, prob])

Two Parabolas simulation.

circle(n, p[, noise, low, high])

Circle simulation.

ellipse(n, p[, noise, low, high])

Ellipse simulation.

diamond(n, p[, noise, low, high])

Diamond simulation.

multiplicative_noise(n, p)

Multiplicative Noise simulation.

multimodal_independence(n, p[, prob, sep1, sep2])

Multimodal Independence data.

indep_sim(sim, n, p, **kwargs)

Independence simulation generator.

K-Sample Simulations

rot_ksamp(sim, n, p[, k, noise, degree, ...])

Rotates input simulations to produce a k-sample simulation.

gaussian_3samp(n[, epsilon, weight, case])

Generates 3 sample of gaussians corresponding to 5 cases.

Time-Series Simulations

indep_ar(n[, lag, phi, sigma])

2 independent, stationary, autoregressive time series simulation.

cross_corr_ar(n[, lag, phi, sigma])

2 linearly dependent time series simulation.

nonlinear_process(n[, lag, phi, sigma])

2 nonlinearly dependent time series simulation.

ts_sim(sim, n, **kwargs)

Time-series simulation generator.

Miscellaneous

independence.sim_matrix(model, x)

Computes the similarity matrix from a random forest.

ksample.k_sample_transform(inputs[, test_type])

Computes a k-sample transform of the inputs.

tools.compute_kern(x, y[, metric, workers])

Kernel similarity matrices for the inputs.

tools.multi_compute_kern(*args[, metric, ...])

Kernel similarity matrices for the input matrices.

tools.compute_dist(x, y[, metric, workers])

Distance matrices for the inputs.

tools.perm_test(calc_stat, x, y[, reps, ...])

Permutation test for the p-value of a nonparametric test.

tools.multi_perm_test(calc_stat, *args[, ...])

Permutation test for the p-value of a nonparametric test with multiple variables.

tools.chi2_approx(calc_stat, x, y)

Fast chi-squared approximation for the p-value.

tools.power(test, sim_type[, sim, n, alpha, ...])

Computes empircal power for hypothesis tests

ksample.smoothCF.smooth_cf_distance(difference)

Calculates the Smooth CF test statistic using the vector of differences.

ksample.mean_embedding.mean_embed_distance(...)

Calculates the Mean Embedding test statistic using the vector of differences.

Base Classes

independence.base.IndependenceTest([...])

A base class for an independence test.

d_variate.base.DVariateTest([compute_kernel])

A base class for a \(d\)-variate independence test.

ksample.base.KSampleTest([compute_distance, ...])

A base class for a k-sample test.

time_series.base.TimeSeriesTest([...])

A base class for a time-series test.

discrim.base.DiscriminabilityTest()

A base class for a discriminability test.

kgof.base.GofTest(p, alpha)

A base class for a discriminability test.