deepbox/preprocess
Scalers
Scaling, normalization, and power or quantile transforms for numerical features.
Scaling
MaxAbsScaler
Scale features by maximum absolute value.
MinMaxScaler
Scale features to a range [min, max].
Normalizer
Normalize samples to unit norm.
PowerTransformer
Apply power transform to make data more Gaussian-like.
QuantileTransformer
Transform features using quantiles.
RobustScaler
Robust scaler using median and IQR.
StandardScaler
Standardize features by removing mean and scaling to unit variance.
preprocess-scalers.ts
import { MinMaxScaler, RobustScaler, StandardScaler,} from "deepbox/preprocess";import { tensor } from "deepbox/ndarray";const X = tensor([[1, 10], [2, 20], [3, 30]]);console.log(new StandardScaler().fit(X).transform(X).toString());console.log(new MinMaxScaler().fit(X).transform(X).toString());console.log(new RobustScaler().fit(X).transform(X).toString());