Initializing playground…
← Back to roadmap

Numeric Utilities (digitize, histogram, linspace, arange, zscore…)

← back to index

digitize — bin values

Map each value to the index of the bin it falls into. Mirrors numpy.digitize. Indices are 0-based; values below the first edge return -1.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

histogram — frequency counts

Count how many values fall in each bin. Mirrors numpy.histogram.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

linspace & arange — number sequences

Generate evenly-spaced sequences, mirroring numpy.linspace and numpy.arange.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

percentileOfScore — percentile rank

Compute what percentile a given score falls at within a dataset. Mirrors scipy.stats.percentileofscore.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

zscore — standardisation

Transform values to zero mean and unit variance. Mirrors scipy.stats.zscore. Missing values are propagated; zero-variance data returns all NaN.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

minMaxNormalize — scale to [0, 1]

Scale all values to the interval [0, 1] (or a custom range). Mirrors sklearn MinMaxScaler.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

coefficientOfVariation — relative spread

Dimensionless measure of dispersion: std / |mean|. Useful for comparing spread across datasets with different units.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent