module onnxrt.ops_cpu.op_linear_classifier#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_linear_classifier

Short summary#

module mlprodict.onnxrt.ops_cpu.op_linear_classifier

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

LinearClassifier

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

Properties#

property

truncated documentation

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default_modified

Returns the list of modified parameters.

args_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

nb_classes

Returns the number of expected classes.

Methods#

method

truncated documentation

__init__

_run

Documentation#

Runtime operator.

source on GitHub

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_nodeonnx node

  • desc – internal representation

  • expected_attributes – expected attributes for this node

  • options – runtime options

source on GitHub

__init__(onnx_node, desc=None, **options)#
Parameters
  • onnx_nodeonnx node

  • desc – internal representation

  • expected_attributes – expected attributes for this node

  • options – runtime options

source on GitHub

_run(x)#

Should be overwritten.

source on GitHub