yobx.sklearn.preprocessing.standard_scaler#
- yobx.sklearn.preprocessing.standard_scaler.sklearn_standard_scaler(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: StandardScaler, X: str, name: str = 'scaler') str[source]#
Converts a
sklearn.preprocessing.StandardScalerinto ONNX.The implementation respects the
with_meanandwith_stdflags:X ──Sub(mean)──► centered ──Div(scale)──► output (if with_mean) (if with_std)When
with_mean=FalsetheSubnode is skipped; whenwith_std=FalsetheDivnode is replaced by anIdentity.- Parameters:
g – the graph builder to add nodes to
sts – shapes defined by scikit-learn
estimator – a fitted
StandardScaleroutputs – desired names (scaled inputs)
X – inputs
name – prefix name for the added nodes
- Returns:
output