Stats

Stats

best.stats.combine_gauss_distributions(mu1, std1, N1, mu2, std2, N2)

Recalculates a normal 1-D distribution given two subsets of data.

best.stats.combine_mvgauss_distributions(mu1, var1, N1, mu2, var2, N2)

Recalculates a normal n-D distribution given two subsets of data.

best.stats.compare_datasets(dataset, states=['AWAKE', 'N2', 'N3', 'REM'])

Compares dataset consistency using KDE and prec-recall curves

Parameters

dataset (dict) – dict where the key is name of dataset for comparison; each dataset is represented by dict with 2 variables X, Y

Returns

dataset

Return type

dict

best.stats.get_class_count(Y, classes=None)

Returns a number of class appearance in the labels

best.stats.kl_divergence(mu1, std1, mu2, std2)

Parametric KL-Divergence between 2 normal 1-D distributions.

Normal Distribution

best.stats.kl_divergence_mv(mu1, var1, mu2, var2)

Multidimensional parametric KL-Divergence between 2 normal distributions.

KL-Divergence

Trace

best.stats.kl_divergence_nonparametric(pk, qk)

Calculates non-parametric KL-Divergence between two 1-D distributions given by 2 histograms with same bins.