# Classes¶

## Summary¶

class |
class parent |
truncated documentation |
---|---|---|

Abs === Absolute takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the absolute is, y = … |
||

Add === Performs element-wise binary addition (with Numpy-style broadcasting support). This operator supports **multidirectional … |
||

ArgMax ====== Computes the indices of the max elements of the input tensor’s element along the provided axis. The resulted … |
||

ArgMin ====== Computes the indices of the min elements of the input tensor’s element along the provided axis. The resulted … |
||

ArrayFeatureExtractor (ai.onnx.ml) ================================== Select elements of the input tensor based on the … |
||

Mocks an array without changing the data it receives. Notebooks Time processing for every ONNX nodes in a graph illustrates the weaknesses … |
||

Extends the API to automatically look for exporters. |
||

Extends the API to automatically look for exporters. |
||

Base class to |
||

Binarizer (ai.onnx.ml) ====================== Maps the values of the input tensor to either 0 or 1, element-wise, based … |
||

CDist (mlprodict) ================= |
||

Defines a schema for operators added in this package such as |
||

Cast ==== The operator casts the elements of a given input tensor to a data type specified by the ‘to’ argument and returns … |
||

Ceil ==== Ceil takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the ceil is, y = ceil(x), … |
||

Clip ==== Clip operator limits the given input within an interval. The interval is specified by the inputs ‘min’ and ‘max’. … |
||

Clip ==== Clip operator limits the given input within an interval. The interval is specified by the inputs ‘min’ and ‘max’. … |
||

Clip ==== Clip operator limits the given input within an interval. The interval is specified with arguments ‘min’ and … |
||

Defines a visitor which walks though the syntax tree of the code. |
||

Class which converts a Python function into something else. It must implements methods |
||

Raised when a compilation error was detected. |
||

Concat ====== Concatenate a list of tensors into a single tensor |
||

ConstantOfShape =============== Generate a tensor with given value and shape. |
||

Wraps a scoring function into a transformer. Function @see fn register_scorers must be called to register the converter … |
||

DictVectorizer (ai.onnx.ml) =========================== Uses an index mapping to convert a dictionary to an array. Given … |
||

One dimension of a shape. |
||

Div === Performs element-wise binary division (with Numpy-style broadcasting support). This operator supports **multidirectional … |
||

Equal ===== Returns the tensor resulted from performing the equal logical operation elementwise on the input tensors … |
||

Exp === Calculates the exponential of the given input tensor, element-wise. |
||

Very similar to |
||

Flatten ======= Flattens the input tensor into a 2D matrix. If input tensor has shape (d_0, d_1, . |
||

Raised when a float is out of range and cannot be converted into a float32. |
||

Floor ===== Floor takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the floor is, y = floor(x), … |
||

GatherElements ============== GatherElements takes two inputs data and indices of the same rank r >= 1 and an optional … |
||

Gemm ==== General Matrix multiplication: https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms#Level_3 A’ = transpose(A) … |
||

Greater ======= Returns the tensor resulted from performing the greater logical operation elementwise on the input tensors … |
||

Identity ======== Identity operator |
||

Imputer (ai.onnx.ml) ==================== Replaces inputs that equal one value with another, leaving all other elements … |
||

LabelEncoder (ai.onnx.ml) ========================= Maps each element in the input tensor to another value. The mapping … |
||

Less ==== Returns the tensor resulted from performing the less logical operation elementwise on the input tensors A … |
||

LinearClassifier (ai.onnx.ml) ============================= Linear classifier |
||

LinearRegressor (ai.onnx.ml) ============================ Generalized linear regression evaluation. If targets is set … |
||

Log === Calculates the natural log of the given input tensor, element-wise. |
||

LpNormalization =============== Given a matrix, apply Lp-normalization along the provided axis. |
||

Base class for every action. |
||

Addition |
||

Any binary operation. |
||

Cast into another type. |
||

Concatenate number of arrays into an array. |
||

Constant |
||

A function. |
||

Any function call. |
||

Addition |
||

Returns a results. |
||

Sign of an expression: 1=positive, 0=negative. |
||

Tensor addition. |
||

Tensor division. |
||

Scalar product. |
||

Tensor multiplication. |
||

Tensor soustraction. |
||

Extracts an element of the tensor. |
||

Tensor operation. |
||

Operator |
||

Operator |
||

Any binary operation. |
||

Variable. The constant is only needed to guess the variable type. |
||

Base class for every machine learned model |
||

Base class for numerical types. |
||

A numpy.bool. |
||

A numpy.float32. |
||

A numpy.int32. |
||

int32 or float32 |
||

Defines a tensor with a dimension and a single type for what it contains. |
||

Base class for every type. |
||

MatMul ====== Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html … |
||

Max === Element-wise max of each of the input tensors (with Numpy-style broadcasting support). All inputs and outputs … |
||

Mean ==== Element-wise mean of each of the input tensors (with Numpy-style broadcasting support). All inputs and outputs … |
||

Min === Element-wise min of each of the input tensors (with Numpy-style broadcasting support). All inputs and outputs … |
||

Mul === Performs element-wise binary multiplication (with Numpy-style broadcasting support). This operator supports **multidirectional … |
||

Defines a schema for operators added in this package such as |
||

Normalizer (ai.onnx.ml) ======================= Normalize the input. There are three normalization modes, which have … |
||

Not === Returns the negation of the input tensor element-wise. |
||

ONNX specifications does not mention the possibility to change the output type, sparse, dense, float, double. … |
||

Loads an ONNX file or object or stream. Computes the output of the ONNX graph. |
||

Implements methods to export a instance of |
||

A node to execute. |
||

Defines magic commands to help with notebooks |
||

Calls onnxruntime inference following scikit-learn API so that it can be included in a scikit-learn … |
||

Class which converts a Python function into an ONNX function. It must implements methods |
||

Runs the prediction for a single ONNX, it lets the runtime handle the graph logic as well. |
||

Ancestor to all operators in this subfolder. The runtime for every node can checked into ONNX unit tests. … |
||

Ancestor to all unary operators in this subfolder and which produces posution of extremas. Checks that inputs type … |
||

Ancestor to all binary operators in this subfolder. Checks that inputs type are the same. |
||

Ancestor to all binary operators in this subfolder. Checks that inputs type are the same. |
||

Implements the inplaces logic. |
||

Ancestor to all binary operators in this subfolder. Checks that inputs type are the same. |
||

Unique operator which calls onnxruntime to compute predictions for one operator. |
||

Ancestor to all unary operators in this subfolder. Checks that inputs type are the same. |
||

Ancestor to all unary and numerical operators in this subfolder. Checks that inputs type are the same. |
||

Defines a schema for operators added in this package such as |
||

Pow === Pow takes input data (Tensor<T>) and exponent Tensor, and produces one output data (Tensor<T>) where the function … |
||

RNN === Computes an one-layer simple RNN. This operator is usually supported via some custom implementation such as CuDNN. … |
||

Reciprocal ========== Reciprocal takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the reciprocal … |
||

ReduceLogSumExp =============== Computes the log sum exponent of the input tensor’s element along the provided axes. The … |
||

ReduceMax ========= Computes the max of the input tensor’s element along the provided axes. The resulted tensor has the … |
||

ReduceMean ========== Computes the mean of the input tensor’s element along the provided axes. The resulted tensor has … |
||

ReduceMin ========= Computes the min of the input tensor’s element along the provided axes. The resulted tensor has the … |
||

ReduceProd ========== Computes the product of the input tensor’s element along the provided axes. The resulted tensor … |
||

ReduceSum ========= Computes the sum of the input tensor’s element along the provided axes. The resulted tensor has the … |
||

ReduceSumSquare =============== Computes the sum square of the input tensor’s element along the provided axes. The resulted … |
||

Relu ==== Relu takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the rectified linear function, … |
||

Reshape ======= Reshape the input tensor similar to numpy.reshape. First input is the data tensor, second input is a shape … |
||

Implements runtime for operator SVMClassifier. The code is inspired from svm_classifier.cc … |
||

Implements runtime for operator SVMRegressor. The code is inspired from svm_regressor.cc … |
||

Implements runtime for operator TreeEnsembleClassifier. The code is inspired from tree_ensemble_classifier.cc … |
||

Implements runtime for operator TreeEnsembleClassifier. The code is inspired from tree_ensemble_classifier.cc … |
||

Implements double runtime for operator TreeEnsembleRegressor. The code is inspired from tree_ensemble_regressor.cc … |
||

Implements float runtime for operator TreeEnsembleRegressor. The code is inspired from tree_ensemble_regressor.cc … |
||

Raised when a type of a variable is unexpected. |
||

SVMClassifier (ai.onnx.ml) ========================== Support Vector Machine classifier |
||

SVMRegressor (ai.onnx.ml) ========================= Support Vector Machine regression prediction and one-class SVM anomaly … |
||

Scaler (ai.onnx.ml) =================== Rescale input data, for example to standardize features by removing the mean and … |
||

Scan ==== Scan can be used to iterate over one or more scan_input tensors, constructing zero or more scan_output tensors. … |
||

Shape ===== Takes a tensor as input and outputs an 1D int64 tensor containing the shape of the input tensor. |
||

Base class for shape binary operator defined by a function. |
||

Base class for shape binary operator. |
||

Handles mathematical operations around shapes. It stores a type (numpy type), and a name to somehow have … |
||

Base class for all shapes operator. |
||

Shape addition. |
||

Shape multiplication. |
||

Shape multiplication. |
||

Sigmoid ======= Sigmoid takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the sigmoid function, … |
||

Sign ==== Calculate the sign of the given input tensor element-wise. If input > 0, output 1. if input < 0, output -1. … |
||

Sin === Calculates the sine of the given input tensor, element-wise. |
||

Slice ===== Produces a slice of the input tensor along multiple axes. Similar to numpy: https://docs.scipy.org/doc/numpy/reference/arrays.indexing.html … |
||

Softmax ======= The operator computes the softmax (normalized exponential) values for each layer in the batch of the … |
||

Sqrt ==== Square root takes one input data (Tensor<T>) and produces one output data (Tensor<T>) where the square root … |
||

Squeeze ======= Remove single-dimensional entries from the shape of a tensor. Takes a parameter axes with a list of … |
||

Sub === Performs element-wise binary subtraction (with Numpy-style broadcasting support). This operator supports **multidirectional … |
||

Sum === Element-wise sum of each of the input tensors (with Numpy-style broadcasting support). All inputs and outputs … |
||

TopK ==== Retrieve the top-K elements along a specified axis. Given an input tensor of shape [a_1, a_2, …, a_n, r] and … |
||

TopK ==== Retrieve the top-K largest or smallest elements along a specified axis. Given an input tensor of shape [a_1, … |
||

TopK ==== Retrieve the top-K largest or smallest elements along a specified axis. Given an input tensor of shape [a_1, … |
||

Transpose ========= Transpose the input tensor similar to numpy.transpose. For example, when perm=(1, 0, 2), given an … |
||

TreeEnsembleClassifier (ai.onnx.ml) =================================== Tree Ensemble classifier. Returns the top class … |
||

TreeEnsembleClassifierDouble (mlprodict) ======================================== |
||

Defines a schema for operators added in this package such as |
||

TreeEnsembleRegressor (ai.onnx.ml) ================================== Tree Ensemble regressor. Returns the regressed … |
||

TreeEnsembleRegressorDouble (mlprodict) ======================================= |
||

Defines a schema for operators added in this package such as |
||

Where ===== Return elements, either from X or Y, depending on condition (with Numpy-style broadcasting support). Where … |
||

converter for XGBClassifier |
||

common methods for converters |
||

converter class |
||

The class does not output a dictionary as specified in ONNX specifications but a |
||

Custom dictionary class much faster for this runtime, it implements a subet of the same methods. |
||