module onnxrt.ops_cpu.op_linear_classifier
#
Short summary#
module mlprodict.onnxrt.ops_cpu.op_linear_classifier
Runtime operator.
Classes#
class |
truncated documentation |
---|---|
LinearClassifier (ai.onnx.ml) ============================= Linear classifier Attributes |
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. |
|
Returns the number of expected classes. |
Methods#
method |
truncated documentation |
---|---|
Documentation#
Runtime operator.
- class mlprodict.onnxrt.ops_cpu.op_linear_classifier.LinearClassifier(ai.onnx.ml)#
Bases:
mlprodict.onnxrt.ops_cpu._op.OpRunClassifierProb
,mlprodict.onnxrt.ops_cpu._op_classifier_string._ClassifierCommon
Linear classifier
Attributes
classlabels_ints: Class labels when using integer labels. One and only one ‘classlabels’ attribute must be defined. default value cannot be automatically retrieved (INTS)
classlabels_strings: Class labels when using string labels. One and only one ‘classlabels’ attribute must be defined. default value cannot be automatically retrieved (STRINGS)
coefficients (required): A collection of weights of the model(s). default value cannot be automatically retrieved (FLOATS)
intercepts: A collection of intercepts. default value cannot be automatically retrieved (FLOATS)
multi_class: Indicates whether to do OvR or multinomial (0=OvR is the default). Default value is
namemulticlassi0typeINT
(INT)post_transform: Indicates the transform to apply to the scores vector. One of ‘NONE,’ ‘SOFTMAX,’ ‘LOGISTIC,’ ‘SOFTMAX_ZERO,’ or ‘PROBIT’ Default value is
nameposttransformsNONEtypeSTRING
(STRING)
Inputs
X (heterogeneous)T1: Data to be classified.
Outputs
Y (heterogeneous)T2: Classification outputs (one class per example).
Z (heterogeneous)tensor(float): Classification scores ([N,E] - one score for each class and example
Type Constraints
T1 tensor(float), tensor(double), tensor(int64), tensor(int32): The input must be a tensor of a numeric type, and of of shape [N,C] or [C]. In the latter case, it will be treated as [1,C]
T2 tensor(string), tensor(int64): The output will be a tensor of strings or integers.
Version
Onnx name: LinearClassifier
This version of the operator has been available since version 1 of domain ai.onnx.ml.
Runtime implementation:
LinearClassifier
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- __init__(onnx_node, desc=None, **options)#
- Parameters
onnx_node – onnx node
desc – internal representation
expected_attributes – expected attributes for this node
options – runtime options
- _run(x)#
Should be overwritten.