yobx.sklearn.preprocessing.min_max_scaler#
- yobx.sklearn.preprocessing.min_max_scaler.sklearn_min_max_scaler(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: MinMaxScaler, X: str, name: str = 'scaler') str[source]#
Converts a
sklearn.preprocessing.MinMaxScalerinto ONNX.The transformation is decomposed into two mandatory steps mirroring
sklearn_standard_scaler():X ──Sub(data_min_)──► shifted ──Div(data_range_)──► normalized
followed by an optional rescaling to the requested
feature_range:normalized ──Mul(feature_width)──► scaled ──Add(feature_min)──► output (if feature_range != (0, 1))When
feature_rangeis the default(0, 1)the last two nodes are replaced by a singleIdentity.- Parameters:
g – the graph builder to add nodes to
sts – shapes defined by scikit-learn
estimator – a fitted
MinMaxScaleroutputs – desired output names
X – input name
name – prefix name for the added nodes
- Returns:
output name