v2026.5.3
All Bundles
Bundle Machine learning library with linear regression, logistic regression, k-means clustering, and matrix operations. Designed for tabular data; supports training, prediction, and model evaluation. Compile with -lib ml.

FeatureScaler

Feature scaling and normalization utilities

Operations

MinMaxScaler # native

Scales features to a [0, 1] range (Min-Max normalization)

function : native : MinMaxScaler(data:Float[,]) ~ Float[,]

Parameters

NameTypeDescription
dataFloatinput matrix

Return

TypeDescription
Floatscaled matrix with values in [0, 1]

Normalize # native

Normalizes each row to unit norm (L2 normalization)

function : native : Normalize(data:Float[,]) ~ Float[,]

Parameters

NameTypeDescription
dataFloatinput matrix

Return

TypeDescription
Floatnormalized matrix where each row has L2 norm = 1

StandardScaler # native

Standardizes features by removing mean and scaling to unit variance (Z-score normalization)

function : native : StandardScaler(data:Float[,]) ~ Float[,]

Parameters

NameTypeDescription
dataFloatinput matrix

Return

TypeDescription
Floatstandardized matrix with mean=0 and std=1