Descriptive & Correlation
Computes the Pearson correlation coefficient matrix.
cov is exported by deepbox/stats.
kendalltau is exported by deepbox/stats.
Computes partial correlation between two variables controlling for confounders.
Pearson correlation coefficient.
Computes the covariance matrix.
Computes Spearman's rank correlation coefficient.
Non-parametric bootstrap: resample a statistic.
Compute Cohen's d effect size between two samples.
geometricMean is exported by deepbox/stats.
Computes the harmonic mean along specified axis.
Computes the interquartile range (IQR).
kurtosis is exported by deepbox/stats.
mean is exported by deepbox/stats.
Computes the median (50th percentile) along specified axes.
Computes the mode (most frequent value) along specified axis.
Computes the n-th central moment about the mean.
Computes percentiles along specified axes.
Computes quantiles along specified axes.
Computes the standard error of the mean (SEM).
skewness is exported by deepbox/stats.
std is exported by deepbox/stats.
Computes the trimmed mean (mean after removing outliers from both tails).
variance is exported by deepbox/stats.
Compute the z-score of each element relative to the sample mean and std.
import { corrcoef, mean, percentile, spearmanr, std, zscore } from "deepbox/stats";import { tensor } from "deepbox/ndarray";const x = tensor([1, 2, 3, 4, 5]);const y = tensor([2, 4, 3, 8, 7]);const paired = tensor([ [1, 2, 3, 4, 5], [2, 4, 3, 8, 7],]);console.log(mean(x).toString(), std(x).toString(), percentile(x, 90).toString());console.log(zscore(x).toString());console.log(corrcoef(paired).toString());console.log(spearmanr(x, y));