.. _f-onnxspeedup: module ``sklapi.onnx_speed_up`` =============================== .. inheritance-diagram:: mlprodict.sklapi.onnx_speed_up Short summary +++++++++++++ module ``mlprodict.sklapi.onnx_speed_up`` Speeding up :epkg:`scikit-learn` with :epkg:`onnx`. Classes +++++++ +---------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | class | truncated documentation | +=============================================================================================+==================================================================================================+ | :class:`_OnnxPipelineStepSpeedup ` | Speeds up inference by replacing methods *transform* or *predict* by a runtime for :epkg:`ONNX`. | +---------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :class:`OnnxSpeedupClassifier ` | Trains with :epkg:`scikit-learn`, transform with :epkg:`ONNX`. | +---------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :class:`OnnxSpeedupCluster ` | Trains with :epkg:`scikit-learn`, transform with :epkg:`ONNX`. | +---------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :class:`OnnxSpeedupRegressor ` | Trains with :epkg:`scikit-learn`, transform with :epkg:`ONNX`. | +---------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :class:`OnnxSpeedupTransformer ` | Trains with :epkg:`scikit-learn`, transform with :epkg:`ONNX`. | +---------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ Properties ++++++++++ +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | property | truncated documentation | +==============================================================================================+==================================================================================================================+ | :py:meth:`_repr_html_ ` | HTML representation of estimator. This is redundant with the logic of `_repr_mimebundle_`. The latter should ... | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_repr_html_ ` | HTML representation of estimator. This is redundant with the logic of `_repr_mimebundle_`. The latter should ... | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_repr_html_ ` | HTML representation of estimator. This is redundant with the logic of `_repr_mimebundle_`. The latter should ... | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_repr_html_ ` | HTML representation of estimator. This is redundant with the logic of `_repr_mimebundle_`. The latter should ... | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_repr_html_ ` | HTML representation of estimator. This is redundant with the logic of `_repr_mimebundle_`. The latter should ... | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`op_version ` | Returns the opset version. | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`op_version ` | Returns the opset version. | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`op_version ` | Returns the opset version. | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`op_version ` | Returns the opset version. | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`op_version ` | Returns the opset version. | +----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ Methods +++++++ +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +==========================================================================================================================================+==================================================================================================================+ | :py:meth:`__getstate__ ` | :epkg:`pickle` does not support functions. This method removes any link to function when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getstate__ ` | :epkg:`pickle` does not support functions. This method removes any link to function when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getstate__ ` | :epkg:`pickle` does not support functions. This method removes any link to function when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getstate__ ` | :epkg:`pickle` does not support functions. This method removes any link to function when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getstate__ ` | :epkg:`pickle` does not support functions. This method removes any link to function when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | :epkg:`pickle` does not support functions. This method restores the function created when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | :epkg:`pickle` does not support functions. This method restores the function created when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | :epkg:`pickle` does not support functions. This method restores the function created when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | :epkg:`pickle` does not support functions. This method restores the function created when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | :epkg:`pickle` does not support functions. This method restores the function created when the runtime is ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime ` | Returns an instance of :class:`OnnxTransformer` which executes the ONNX graph. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime ` | Returns an instance of :class:`OnnxTransformer` which executes the ONNX graph. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime ` | Returns an instance of :class:`OnnxTransformer` which executes the ONNX graph. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime ` | Returns an instance of :class:`OnnxTransformer` which executes the ONNX graph. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime ` | Returns an instance of :class:`OnnxTransformer` which executes the ONNX graph. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy ` | Builds a runtime based on numpy. Exports the ONNX graph into python code based on numpy and then dynamically ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy ` | Builds a runtime based on numpy. Exports the ONNX graph into python code based on numpy and then dynamically ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy ` | Builds a runtime based on numpy. Exports the ONNX graph into python code based on numpy and then dynamically ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy ` | Builds a runtime based on numpy. Exports the ONNX graph into python code based on numpy and then dynamically ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy ` | Builds a runtime based on numpy. Exports the ONNX graph into python code based on numpy and then dynamically ... | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy_compile ` | Second part of :meth:`_build_onnx_runtime_numpy`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy_compile ` | Second part of :meth:`_build_onnx_runtime_numpy`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy_compile ` | Second part of :meth:`_build_onnx_runtime_numpy`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy_compile ` | Second part of :meth:`_build_onnx_runtime_numpy`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_onnx_runtime_numpy_compile ` | Second part of :meth:`_build_onnx_runtime_numpy`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check_fitted_ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check_fitted_ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check_fitted_ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check_fitted_ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check_fitted_ ` | | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx ` | Converts an estimator inference into :epkg:`ONNX`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx ` | Converts an estimator inference into :epkg:`ONNX`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx ` | Converts an estimator inference into :epkg:`ONNX`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx ` | Converts an estimator inference into :epkg:`ONNX`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx ` | Converts an estimator inference into :epkg:`ONNX`. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`assert_almost_equal ` | Checks that ONNX and scikit-learn produces the same outputs. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`assert_almost_equal ` | Checks that ONNX and scikit-learn produces the same outputs. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`assert_almost_equal ` | Checks that ONNX and scikit-learn produces the same outputs. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`assert_almost_equal ` | Checks that ONNX and scikit-learn produces the same outputs. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`fit ` | Trains based estimator. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`fit ` | Trains based estimator. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`fit ` | Trains based estimator. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`fit ` | Trains based estimator. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`fit ` | Fits the estimator, converts to ONNX. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_converter ` | Returns a converter for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_converter ` | Returns a converter for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_converter ` | Returns a converter for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_converter ` | Returns a converter for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_converter ` | Returns a converter for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_parser ` | Returns a parser for this model. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_parser ` | Returns a parser for this model. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_parser ` | Returns a parser for this model. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_parser ` | Returns a parser for this model. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_parser ` | Returns a parser for this model. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_shape_calculator ` | Returns a shape calculator for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_shape_calculator ` | Returns a shape calculator for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_shape_calculator ` | Returns a shape calculator for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_shape_calculator ` | Returns a shape calculator for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`onnx_shape_calculator ` | Returns a shape calculator for this transform. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`predict ` | Transforms with *ONNX*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`predict ` | Transforms with *ONNX*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`predict ` | Transforms with *ONNX*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`predict_proba ` | Transforms with *ONNX*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`raw_predict ` | Transforms with *scikit-learn*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`raw_predict ` | Transforms with *scikit-learn*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`raw_predict ` | Transforms with *scikit-learn*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`raw_predict_proba ` | Transforms with *scikit-learn*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`raw_transform ` | Transforms with *scikit-learn*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`raw_transform ` | Transforms with *scikit-learn*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`transform ` | Transforms with *ONNX*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ | :meth:`transform ` | Transforms with *ONNX*. | +------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.sklapi.onnx_speed_up :members: :special-members: __init__ :show-inheritance: