yobx.sklearn.preprocessing.robust_scaler#

yobx.sklearn.preprocessing.robust_scaler.sklearn_robust_scaler(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: RobustScaler, X: str, name: str = 'scaler') str[source]#

Converts a sklearn.preprocessing.RobustScaler into ONNX.

The implementation respects the with_centering and with_scaling flags:

X  ──Sub(center_)──►  centered  ──Div(scale_)──►  output
     (if with_centering)            (if with_scaling)

When with_centering=False the Sub node is skipped; when with_scaling=False the Div node is replaced by an Identity.

Parameters:
  • g – the graph builder to add nodes to

  • sts – shapes defined by scikit-learn

  • estimator – a fitted RobustScaler

  • outputs – desired output names

  • X – input name

  • name – prefix name for the added nodes

Returns:

output name