Scaler#
Domain:
ai.onnx.mlSince version: 1
Rescale input data, for example to standardize features by removing the mean and scaling to unit variance.
Inputs
X (T): Data to be scaled.
Outputs
Y (tensor(float)): Scaled output data.
Type Constraints
T: The input must be a tensor of a numeric type. Allowed types: tensor(double), tensor(float), tensor(int32), tensor(int64).
Examples#
test_cc_scaler_float
Node:
ai.onnx.ml.Scaler(x) -> (y)
Attributes:
offset = [0.5, 1.0, 1.5]
scale = [2.0, 0.5, 1.0]
Inputs:
x: shape=(2, 3), dtype=float32
[[0., 1., 2.],
[3., 4., 5.]]
Outputs:
y: shape=(2, 3), dtype=float32
[[-1. , 0. , 0.5],
[ 5. , 1.5, 3.5]]
test_cc_scaler_int64
Node:
ai.onnx.ml.Scaler(x) -> (y)
Attributes:
offset = [1.0]
scale = [0.5]
Inputs:
x: shape=(5,), dtype=int64
[0, 1, 2, 3, 4]
Outputs:
y: shape=(5,), dtype=float32
[-0.5, 0. , 0.5, 1. , 1.5]