spox.opset.ai.onnx.ml.v5 module

spox.opset.ai.onnx.ml.v5.array_feature_extractor(X: Var, Y: Var) Var[source]

Select elements of the input tensor based on the indices passed. The indices are applied to the last axes of the tensor.

Parameters:
X

Type T. Data to be selected

Y

Type tensor(int64). The indices, based on 0 as the first index of any dimension.

Returns:
ZVar

Type T. Selected output data as an array

Notes

Signature: ai.onnx.ml@1::ArrayFeatureExtractor.

Type constraints:
  • T: tensor(double), tensor(float), tensor(int32), tensor(int64), tensor(string)

spox.opset.ai.onnx.ml.v5.binarizer(X: Var, *, threshold: float = 0.0) Var[source]

Maps the values of the input tensor to either 0 or 1, element-wise, based on the outcome of a comparison against a threshold value.

Parameters:
X

Type T. Data to be binarized

threshold

Attribute. Values greater than this are mapped to 1, others to 0.

Returns:
YVar

Type T. Binarized output data

Notes

Signature: ai.onnx.ml@1::Binarizer.

Type constraints:
  • T: tensor(double), tensor(float), tensor(int32), tensor(int64)

spox.opset.ai.onnx.ml.v5.cast_map(X: Var, *, cast_to: str = 'TO_FLOAT', map_form: str = 'DENSE', max_map: int = 1) Var[source]

Converts a map to a tensor.The map key must be an int64 and the values will be ordered in ascending order based on this key.The operator supports dense packing or sparse packing. If using sparse packing, the key cannot exceed the max_map-1 value.

Parameters:
X

Type T1. The input map that is to be cast to a tensor

cast_to

Attribute. A string indicating the desired element type of the output tensor, one of ‘TO_FLOAT’, ‘TO_STRING’, ‘TO_INT64’.

map_form

Attribute. Indicates whether to only output as many values as are in the input (dense), or position the input based on using the key of the map as the index of the output (sparse).One of ‘DENSE’, ‘SPARSE’.

max_map

Attribute. If the value of map_form is ‘SPARSE,’ this attribute indicates the total length of the output tensor.

Returns:
YVar

Type T2. A tensor representing the same data as the input map, ordered by their keys

Notes

Signature: ai.onnx.ml@1::CastMap.

Type constraints:
  • T1: map(int64,tensor(float)), map(int64,tensor(string))

  • T2: tensor(float), tensor(int64), tensor(string)

spox.opset.ai.onnx.ml.v5.category_mapper(X: Var, *, cats_int64s: Iterable[int] | None = None, cats_strings: Iterable[str] | None = None, default_int64: int = -1, default_string: str = '_Unused') Var[source]

Converts strings to integers and vice versa. Two sequences of equal length are used to map between integers and strings, with strings and integers at the same index detailing the mapping. Each operator converts either integers to strings or strings to integers, depending on which default value attribute is provided. Only one default value attribute should be defined. If the string default value is set, it will convert integers to strings. If the int default value is set, it will convert strings to integers.

Parameters:
X

Type T1. Input data

cats_int64s

Attribute. The integers of the map. This sequence must be the same length as the ‘cats_strings’ sequence.

cats_strings

Attribute. The strings of the map. This sequence must be the same length as the ‘cats_int64s’ sequence

default_int64

Attribute. An integer to use when an input string value is not found in the map.One and only one of the ‘default_*’ attributes must be defined.

default_string

Attribute. A string to use when an input integer value is not found in the map.One and only one of the ‘default_*’ attributes must be defined.

Returns:
YVar

Type T2. Output data. If strings are input, the output values are integers, and vice versa.

Notes

Signature: ai.onnx.ml@1::CategoryMapper.

Type constraints:
  • T1: tensor(int64), tensor(string)

  • T2: tensor(int64), tensor(string)

spox.opset.ai.onnx.ml.v5.dict_vectorizer(X: Var, *, int64_vocabulary: Iterable[int] | None = None, string_vocabulary: Iterable[str] | None = None) Var[source]

Uses an index mapping to convert a dictionary to an array. Given a dictionary, each key is looked up in the vocabulary attribute corresponding to the key type. The index into the vocabulary array at which the key is found is then used to index the output 1-D tensor ‘Y’ and insert into it the value found in the dictionary ‘X’. The key type of the input map must correspond to the element type of the defined vocabulary attribute. Therefore, the output array will be equal in length to the index mapping vector parameter. All keys in the input dictionary must be present in the index mapping vector. For each item in the input dictionary, insert its value in the output array. Any keys not present in the input dictionary, will be zero in the output array. For example: if the string_vocabulary parameter is set to ["a", "c", "b", "z"], then an input of {"a": 4, "c": 8} will produce an output of [4, 8, 0, 0].

Parameters:
X

Type T1. A dictionary.

int64_vocabulary

Attribute. An integer vocabulary array.One and only one of the vocabularies must be defined.

string_vocabulary

Attribute. A string vocabulary array.One and only one of the vocabularies must be defined.

Returns:
YVar

Type T2. A 1-D tensor holding values from the input dictionary.

Notes

Signature: ai.onnx.ml@1::DictVectorizer.

Type constraints:
  • T1: map(int64,tensor(double)), map(int64,tensor(float)), map(int64,tensor(string)), map(string,tensor(double)), map(string,tensor(float)), map(string,tensor(int64))

  • T2: tensor(double), tensor(float), tensor(int64), tensor(string)

spox.opset.ai.onnx.ml.v5.feature_vectorizer(X: Sequence[Var], *, inputdimensions: Iterable[int] | None = None) Var[source]

Concatenates input tensors into one continuous output. All input shapes are 2-D and are concatenated along the second dimension. 1-D tensors are treated as [1,C]. Inputs are copied to the output maintaining the order of the input arguments. All inputs must be integers or floats, while the output will be all floating point values.

Parameters:
X

Type T1. An ordered collection of tensors, all with the same element type.

inputdimensions

Attribute. The size of each input in the input list

Returns:
YVar

Type tensor(float). The output array, elements ordered as the inputs.

Notes

Signature: ai.onnx.ml@1::FeatureVectorizer.

Type constraints:
  • T1: tensor(double), tensor(float), tensor(int32), tensor(int64)

spox.opset.ai.onnx.ml.v5.imputer(X: Var, *, imputed_value_floats: Iterable[float] | None = None, imputed_value_int64s: Iterable[int] | None = None, replaced_value_float: float = 0.0, replaced_value_int64: int = 0) Var[source]

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.

Parameters:
X

Type T. Data to be processed.

imputed_value_floats

Attribute. Value(s) to change to

imputed_value_int64s

Attribute. Value(s) to change to.

replaced_value_float

Attribute. A value that needs replacing.

replaced_value_int64

Attribute. A value that needs replacing.

Returns:
YVar

Type T. Imputed output data

Notes

Signature: ai.onnx.ml@1::Imputer.

Type constraints:
  • T: tensor(double), tensor(float), tensor(int32), tensor(int64)

spox.opset.ai.onnx.ml.v5.label_encoder(X: Var, *, default_float: float = -0.0, default_int64: int = -1, default_string: str = '_Unused', default_tensor: ndarray | None = None, keys_floats: Iterable[float] | None = None, keys_int64s: Iterable[int] | None = None, keys_strings: Iterable[str] | None = None, keys_tensor: ndarray | None = None, values_floats: Iterable[float] | None = None, values_int64s: Iterable[int] | None = None, values_strings: Iterable[str] | None = None, values_tensor: ndarray | None = None) Var[source]

Maps each element in the input tensor to another value. The mapping is determined by the two parallel attributes, ‘keys_‘ and ‘values_’ attribute. The i-th value in the specified ‘keys_‘ attribute would be mapped to the i-th value in the specified ‘values_’ attribute. It implies that input’s element type and the element type of the specified ‘keys_‘ should be identical while the output type is identical to the specified ‘values_’ attribute. Note that the ‘keys_‘ and ‘values_’ attributes must have the same length. If an input element can not be found in the specified ‘keys_‘ attribute, the ‘default_’ that matches the specified ‘values_‘ attribute may be used as its output value. The type of the ‘default_’ attribute must match the ‘values_‘ attribute chosen. Let’s consider an example which maps a string tensor to an integer tensor. Assume and ‘keys_strings’ is [“Amy”, “Sally”], ‘values_int64s’ is [5, 6], and ‘default_int64’ is ‘-1’. The input [“Dori”, “Amy”, “Amy”, “Sally”, “Sally”] would be mapped to [-1, 5, 5, 6, 6]. Since this operator is an one-to-one mapping, its input and output shapes are the same. Notice that only one of ‘keys_’/’values_*’ can be set. Float keys with value ‘NaN’ match any input ‘NaN’ value regardless of bit value. If a key is repeated, the last key takes precedence.

Parameters:
X

Type T1. Input data. It must have the same element type as the keys_* attribute set.

default_float

Attribute. A float.

default_int64

Attribute. An integer.

default_string

Attribute. A string.

default_tensor

Attribute. A default tensor. {”Unused”} if values* has string type, {-1} if values_* has integral type, and {-0.f} if values_* has float type.

keys_floats

Attribute. A list of floats.

keys_int64s

Attribute. A list of ints.

keys_strings

Attribute. A list of strings.

keys_tensor

Attribute. Keys encoded as a 1D tensor. One and only one of ‘keys_*’s should be set.

values_floats

Attribute. A list of floats.

values_int64s

Attribute. A list of ints.

values_strings

Attribute. A list of strings.

values_tensor

Attribute. Values encoded as a 1D tensor. One and only one of ‘values_*’s should be set.

Returns:
YVar

Type T2. Output data. This tensor’s element type is based on the values_* attribute set.

Notes

Signature: ai.onnx.ml@4::LabelEncoder.

Type constraints:
  • T1: tensor(double), tensor(float), tensor(int16), tensor(int32), tensor(int64), tensor(string)

  • T2: tensor(double), tensor(float), tensor(int16), tensor(int32), tensor(int64), tensor(string)

spox.opset.ai.onnx.ml.v5.linear_classifier(X: Var, *, classlabels_ints: Iterable[int] | None = None, classlabels_strings: Iterable[str] | None = None, coefficients: Iterable[float], intercepts: Iterable[float] | None = None, multi_class: int = 0, post_transform: str = 'NONE') tuple[Var, Var][source]

Linear classifier

Parameters:
X

Type T1. Data to be classified.

classlabels_ints

Attribute. Class labels when using integer labels. One and only one ‘classlabels’ attribute must be defined.

classlabels_strings

Attribute. Class labels when using string labels. One and only one ‘classlabels’ attribute must be defined.

coefficients

Attribute. A collection of weights of the model(s).

intercepts

Attribute. A collection of intercepts.

multi_class

Attribute. Indicates whether to do OvR or multinomial (0=OvR is the default).

post_transform

Attribute. Indicates the transform to apply to the scores vector.One of ‘NONE,’ ‘SOFTMAX,’ ‘LOGISTIC,’ ‘SOFTMAX_ZERO,’ or ‘PROBIT’

Returns:
YVar

Type T2. Classification outputs (one class per example).

ZVar

Type tensor(float). Classification scores ([N,E] - one score for each class and example

Notes

Signature: ai.onnx.ml@1::LinearClassifier.

Type constraints:
  • T1: tensor(double), tensor(float), tensor(int32), tensor(int64)

  • T2: tensor(int64), tensor(string)

spox.opset.ai.onnx.ml.v5.linear_regressor(X: Var, *, coefficients: Iterable[float] | None = None, intercepts: Iterable[float] | None = None, post_transform: str = 'NONE', targets: int = 1) Var[source]

Generalized linear regression evaluation. If targets is set to 1 (default) then univariate regression is performed. If targets is set to M then M sets of coefficients must be passed in as a sequence and M results will be output for each input n in N. The coefficients array is of length n, and the coefficients for each target are contiguous. Intercepts are optional but if provided must match the number of targets.

Parameters:
X

Type T. Data to be regressed.

coefficients

Attribute. Weights of the model(s).

intercepts

Attribute. Weights of the intercepts, if used.

post_transform

Attribute. Indicates the transform to apply to the regression output vector.One of ‘NONE,’ ‘SOFTMAX,’ ‘LOGISTIC,’ ‘SOFTMAX_ZERO,’ or ‘PROBIT’

targets

Attribute. The total number of regression targets, 1 if not defined.

Returns:
YVar

Type tensor(float). Regression outputs (one per target, per example).

Notes

Signature: ai.onnx.ml@1::LinearRegressor.

Type constraints:
  • T: tensor(double), tensor(float), tensor(int32), tensor(int64)

spox.opset.ai.onnx.ml.v5.normalizer(X: Var, *, norm: str = 'MAX') Var[source]

Normalize the input. There are three normalization modes, which have the corresponding formulas, defined using element-wise infix operators ‘/’ and ‘^’ and tensor-wide functions ‘max’ and ‘sum’: Max: Y = X / max(X) L1: Y = X / sum(X) L2: Y = sqrt(X^2 / sum(X^2)} In all modes, if the divisor is zero, Y == X. For batches, that is, [N,C] tensors, normalization is done along the C axis. In other words, each row of the batch is normalized independently.

Parameters:
X

Type T. Data to be encoded, a tensor of shape [N,C] or [C]

norm

Attribute. One of ‘MAX,’ ‘L1,’ ‘L2’

Returns:
YVar

Type tensor(float). Encoded output data

Notes

Signature: ai.onnx.ml@1::Normalizer.

Type constraints:
  • T: tensor(double), tensor(float), tensor(int32), tensor(int64)

spox.opset.ai.onnx.ml.v5.one_hot_encoder(X: Var, *, cats_int64s: Iterable[int] | None = None, cats_strings: Iterable[str] | None = None, zeros: int = 1) Var[source]

Replace each input element with an array of ones and zeros, where a single one is placed at the index of the category that was passed in. The total category count will determine the size of the extra dimension of the output array Y. For example, if we pass a tensor with a single value of 4, and a category count of 8, the output will be a tensor with [0,0,0,0,1,0,0,0]. This operator assumes every input feature is from the same set of categories. If the input is a tensor of float, int32, or double, the data will be cast to integers and the cats_int64s category list will be used for the lookups.

Parameters:
X

Type T. Data to be encoded.

cats_int64s

Attribute. List of categories, ints.One and only one of the ‘cats_*’ attributes must be defined.

cats_strings

Attribute. List of categories, strings.One and only one of the ‘cats_*’ attributes must be defined.

zeros

Attribute. If true and category is not present, will return all zeros; if false and a category if not found, the operator will fail.

Returns:
YVar

Type tensor(float). Encoded output data, having one more dimension than X.

Notes

Signature: ai.onnx.ml@1::OneHotEncoder.

Type constraints:
  • T: tensor(double), tensor(float), tensor(int32), tensor(int64), tensor(string)

spox.opset.ai.onnx.ml.v5.scaler(X: Var, *, offset: Iterable[float] | None = None, scale: Iterable[float] | None = None) Var[source]

Rescale input data, for example to standardize features by removing the mean and scaling to unit variance.

Parameters:
X

Type T. Data to be scaled.

offset

Attribute. First, offset by this.Can be length of features in an [N,F] tensor or length 1, in which case it applies to all features, regardless of dimension count.

scale

Attribute. Second, multiply by this.Can be length of features in an [N,F] tensor or length 1, in which case it applies to all features, regardless of dimension count.Must be same length as ‘offset’

Returns:
YVar

Type tensor(float). Scaled output data.

Notes

Signature: ai.onnx.ml@1::Scaler.

Type constraints:
  • T: tensor(double), tensor(float), tensor(int32), tensor(int64)

spox.opset.ai.onnx.ml.v5.svmclassifier(X: Var, *, classlabels_ints: Iterable[int] | None = None, classlabels_strings: Iterable[str] | None = None, coefficients: Iterable[float] | None = None, kernel_params: Iterable[float] | None = None, kernel_type: str = 'LINEAR', post_transform: str = 'NONE', prob_a: Iterable[float] | None = None, prob_b: Iterable[float] | None = None, rho: Iterable[float] | None = None, support_vectors: Iterable[float] | None = None, vectors_per_class: Iterable[int] | None = None) tuple[Var, Var][source]

Support Vector Machine classifier

Parameters:
X

Type T1. Data to be classified.

classlabels_ints

Attribute. Class labels if using integer labels.One and only one of the ‘classlabels_*’ attributes must be defined.

classlabels_strings

Attribute. Class labels if using string labels.One and only one of the ‘classlabels_*’ attributes must be defined.

coefficients

Attribute.

kernel_params

Attribute. List of 3 elements containing gamma, coef0, and degree, in that order. Zero if unused for the kernel.

kernel_type

Attribute. The kernel type, one of ‘LINEAR,’ ‘POLY,’ ‘RBF,’ ‘SIGMOID’.

post_transform

Attribute. Indicates the transform to apply to the score. One of ‘NONE,’ ‘SOFTMAX,’ ‘LOGISTIC,’ ‘SOFTMAX_ZERO,’ or ‘PROBIT’

prob_a

Attribute. First set of probability coefficients.

prob_b

Attribute. Second set of probability coefficients. This array must be same size as prob_a.If these are provided then output Z are probability estimates, otherwise they are raw scores.

rho

Attribute.

support_vectors

Attribute.

vectors_per_class

Attribute.

Returns:
YVar

Type T2. Classification outputs (one class per example).

ZVar

Type tensor(float). Class scores (one per class per example), if prob_a and prob_b are provided they are probabilities for each class, otherwise they are raw scores.

Notes

Signature: ai.onnx.ml@1::SVMClassifier.

Type constraints:
  • T1: tensor(double), tensor(float), tensor(int32), tensor(int64)

  • T2: tensor(int64), tensor(string)

spox.opset.ai.onnx.ml.v5.svmregressor(X: Var, *, coefficients: Iterable[float] | None = None, kernel_params: Iterable[float] | None = None, kernel_type: str = 'LINEAR', n_supports: int = 0, one_class: int = 0, post_transform: str = 'NONE', rho: Iterable[float] | None = None, support_vectors: Iterable[float] | None = None) Var[source]

Support Vector Machine regression prediction and one-class SVM anomaly detection.

Parameters:
X

Type T. Data to be regressed.

coefficients

Attribute. Support vector coefficients.

kernel_params

Attribute. List of 3 elements containing gamma, coef0, and degree, in that order. Zero if unused for the kernel.

kernel_type

Attribute. The kernel type, one of ‘LINEAR,’ ‘POLY,’ ‘RBF,’ ‘SIGMOID’.

n_supports

Attribute. The number of support vectors.

one_class

Attribute. Flag indicating whether the regression is a one-class SVM or not.

post_transform

Attribute. Indicates the transform to apply to the score. One of ‘NONE,’ ‘SOFTMAX,’ ‘LOGISTIC,’ ‘SOFTMAX_ZERO,’ or ‘PROBIT.’

rho

Attribute.

support_vectors

Attribute. Chosen support vectors

Returns:
YVar

Type tensor(float). Regression outputs (one score per target per example).

Notes

Signature: ai.onnx.ml@1::SVMRegressor.

Type constraints:
  • T: tensor(double), tensor(float), tensor(int32), tensor(int64)

spox.opset.ai.onnx.ml.v5.tree_ensemble(X: Var, *, aggregate_function: int = 1, leaf_targetids: Iterable[int], leaf_weights: ndarray, membership_values: ndarray | None = None, n_targets: int | None = None, nodes_falseleafs: Iterable[int], nodes_falsenodeids: Iterable[int], nodes_featureids: Iterable[int], nodes_hitrates: ndarray | None = None, nodes_missing_value_tracks_true: Iterable[int] | None = None, nodes_modes: ndarray, nodes_splits: ndarray, nodes_trueleafs: Iterable[int], nodes_truenodeids: Iterable[int], post_transform: int = 0, tree_roots: Iterable[int]) Var[source]

Tree Ensemble operator. Returns the regressed values for each input in a batch. Inputs have dimensions [N, F] where N is the input batch size and F is the number of input features. Outputs have dimensions [N, num_targets] where N is the batch size and num_targets is the number of targets, which is a configurable attribute.

The encoding of this attribute is split along interior nodes and the leaves of the trees. Notably, attributes with the prefix `nodes_*` are associated with interior nodes, and attributes with the prefix `leaf_*` are associated with leaves.
The attributes `nodes_*` must all have the same length and encode a sequence of tuples, as defined by taking all the `nodes_*` fields at a given position.

All fields prefixed with `leaf_*` represent tree leaves, and similarly define tuples of leaves and must have identical length.

This operator can be used to implement both the previous `TreeEnsembleRegressor` and `TreeEnsembleClassifier` nodes.
The `TreeEnsembleRegressor` node maps directly to this node and requires changing how the nodes are represented.
The `TreeEnsembleClassifier` node can be implemented by adding a `ArgMax` node after this node to determine the top class.
To encode class labels, a `LabelEncoder` or `GatherND` operator may be used.
Parameters:
X

Type T. Input of shape [Batch Size, Number of Features]

aggregate_function

Attribute. Defines how to aggregate leaf values within a target. One of ‘AVERAGE’ (0) ‘SUM’ (1) ‘MIN’ (2) ‘MAX (3) defaults to ‘SUM’ (1)

leaf_targetids

Attribute. The index of the target that this leaf contributes to (this must be in range [0, n_targets)).

leaf_weights

Attribute. The weight for each leaf.

membership_values

Attribute. Members to test membership of for each set membership node. List all of the members to test again in the order that the ‘BRANCH_MEMBER’ mode appears in node_modes, delimited by NaNs. Will have the same number of sets of values as nodes with mode ‘BRANCH_MEMBER’. This may be omitted if the node doesn’t contain any ‘BRANCH_MEMBER’ nodes.

n_targets

Attribute. The total number of targets.

nodes_falseleafs

Attribute. 1 if false branch is leaf for each node and 0 if an interior node. To represent a tree that is a leaf (only has one node), one can do so by having a single nodes_* entry with true and false branches referencing the same leaf_* entry

nodes_falsenodeids

Attribute. If nodes_falseleafs is false at an entry, this represents the position of the false branch node. This position can be used to index into a nodes_* entry. If nodes_falseleafs is false, it is an index into the leaf_* attributes.

nodes_featureids

Attribute. Feature id for each node.

nodes_hitrates

Attribute. Popularity of each node, used for performance and may be omitted.

nodes_missing_value_tracks_true

Attribute. For each node, define whether to follow the true branch (if attribute value is 1) or false branch (if attribute value is 0) in the presence of a NaN input feature. This attribute may be left undefined and the default value is false (0) for all nodes.

nodes_modes

Attribute. The comparison operation performed by the node. This is encoded as an enumeration of 0 (‘BRANCH_LEQ’), 1 (‘BRANCH_LT’), 2 (‘BRANCH_GTE’), 3 (‘BRANCH_GT’), 4 (‘BRANCH_EQ’), 5 (‘BRANCH_NEQ’), and 6 (‘BRANCH_MEMBER’). Note this is a tensor of type uint8.

nodes_splits

Attribute. Thresholds to do the splitting on for each node with mode that is not ‘BRANCH_MEMBER’.

nodes_trueleafs

Attribute. 1 if true branch is leaf for each node and 0 an interior node. To represent a tree that is a leaf (only has one node), one can do so by having a single nodes_* entry with true and false branches referencing the same leaf_* entry

nodes_truenodeids

Attribute. If nodes_trueleafs is false at an entry, this represents the position of the true branch node. This position can be used to index into a nodes_* entry. If nodes_trueleafs is false, it is an index into the leaf_* attributes.

post_transform

Attribute. Indicates the transform to apply to the score. One of ‘NONE’ (0), ‘SOFTMAX’ (1), ‘LOGISTIC’ (2), ‘SOFTMAX_ZERO’ (3) or ‘PROBIT’ (4), defaults to ‘NONE’ (0)

tree_roots

Attribute. Index into nodes_* for the root of each tree. The tree structure is derived from the branching of each node.

Returns:
YVar

Type T. Output of shape [Batch Size, Number of targets]

Notes

Signature: ai.onnx.ml@5::TreeEnsemble.

Type constraints:
  • T: tensor(double), tensor(float), tensor(float16)

spox.opset.ai.onnx.ml.v5.zip_map(X: Var, *, classlabels_int64s: Iterable[int] | None = None, classlabels_strings: Iterable[str] | None = None) Var[source]

Creates a map from the input and the attributes. The values are provided by the input tensor, while the keys are specified by the attributes. Must provide keys in either classlabels_strings or classlabels_int64s (but not both). The columns of the tensor correspond one-by-one to the keys specified by the attributes. There must be as many columns as keys.

Parameters:
X

Type tensor(float). The input values

classlabels_int64s

Attribute. The keys when using int keys.One and only one of the ‘classlabels_*’ attributes must be defined.

classlabels_strings

Attribute. The keys when using string keys.One and only one of the ‘classlabels_*’ attributes must be defined.

Returns:
ZVar

Type T. The output map

Notes

Signature: ai.onnx.ml@1::ZipMap.

Type constraints:
  • T: seq(map(int64,tensor(float))), seq(map(string,tensor(float)))