yobx.sklearn.category_encoders.quantile_encoder#
- yobx.sklearn.category_encoders.quantile_encoder.category_encoders_quantile_encoder(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: QuantileEncoder, X: str, name: str = 'quantile_encoder') str[source]#
Converts a
category_encoders.QuantileEncoderinto ONNX.The encoder replaces each categorical column with the quantile of the target distribution conditioned on that category value. Non-categorical columns pass through unchanged.
X ──col_j (categorical)──► Equal(val_i)?──► quantile_i ... IsNaN?──────────► nan_quantile default──────────► unknown_quantile X ──col_k (numerical)──► unchangedThe conversion pre-computes a combined lookup table (original category value → quantile) from the fitted
ordinal_encoderandmappingattributes. Unknown categories and NaN inputs are handled via separateWherenodes that override the default value.- Parameters:
g – the graph builder to add nodes to
sts – shapes defined by scikit-learn
estimator – a fitted
QuantileEncoderoutputs – desired output names
X – input name (shape
(N, F))name – prefix name for the added nodes
- Returns:
output name