module onnxrt.ops_cpu.op_imputer
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_imputer
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
Imputer (ai.onnx.ml) ==================== Replaces inputs that equal one value with another, leaving all other elements … |
Properties#
property |
truncated documentation |
---|---|
|
Returns the list of arguments as well as the list of parameters with the default values (close to the signature). … |
|
Returns the list of modified parameters. |
|
Returns the list of optional arguments. |
|
Returns the list of optional arguments. |
|
Returns all parameters in a dictionary. |
Methods#
method |
truncated documentation |
---|---|
Documentation#
Runtime operator.
- class mlprodict.onnxrt.ops_cpu.op_imputer.Imputer(ai.onnx.ml)#
Bases:
OpRunUnaryNum
Replaces inputs that equal one value with another, leaving all other elements alone.
This operator is typically used to replace missing values in situations where they have a canonical representation, such as -1, 0, NaN, or some extreme value.
One and only one of imputed_value_floats or imputed_value_int64s should be defined – floats if the input tensor holds floats, integers if the input tensor holds integers. The imputed values must all fit within the width of the tensor element type. One and only one of the replaced_value_float or replaced_value_int64 should be defined, which one depends on whether floats or integers are being processed.
The imputed_value attribute length can be 1 element, or it can have one element per input feature. In other words, if the input tensor has the shape [*,F], then the length of the attribute array may be 1 or F. If it is 1, then it is broadcast along the last dimension and applied to each feature.
Attributes
imputed_value_floats: Value(s) to change to default value cannot be automatically retrieved (FLOATS)
imputed_value_int64s: Value(s) to change to. default value cannot be automatically retrieved (INTS)
replaced_value_float: A value that needs replacing. Default value is
namereplacedvaluefloatf0.0typeFLOAT
(FLOAT)replaced_value_int64: A value that needs replacing. Default value is
namereplacedvalueint64i0typeINT
(INT)
Inputs
X (heterogeneous)T: Data to be processed.
Outputs
Y (heterogeneous)T: Imputed output data
Type Constraints
T tensor(float), tensor(double), tensor(int64), tensor(int32): The input type must be a tensor of a numeric type, either [N,C] or [C]. The output type will be of the same tensor type and shape.
Version
Onnx name: Imputer
This version of the operator has been available since version 1 of domain ai.onnx.ml.
Runtime implementation:
Imputer
- __init__(onnx_node, desc=None, **options)#
- _run(x, attributes=None, verbose=0, fLOG=None)#
Should be overwritten.