module onnxrt.ops_cpu.op_tree_ensemble_regressor_p_#

Short summary#

module mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_

Implements runtime for operator TreeEnsembleRegressor. The code is inspired from tree_ensemble_regressor.cc in onnxruntime.

source on GitHub

Classes#

class

truncated documentation

RuntimeTreeEnsembleRegressorPDouble

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

RuntimeTreeEnsembleRegressorPFloat

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

Properties#

property

truncated documentation

base_values_

See lpyort-TreeEnsembleRegressorDouble.

base_values_

See lpyort-TreeEnsembleRegressor.

has_missing_tracks_

Tells if the model handles missing values.

has_missing_tracks_

Tells if the model handles missing values.

n_targets_

See lpyort-TreeEnsembleRegressorDouble.

n_targets_

See lpyort-TreeEnsembleRegressor.

nodes_modes_

Returns the mode for every node.

nodes_modes_

Returns the mode for every node.

omp_N_

Number of observations above which the computation is parallelized.

omp_N_

Number of observations above which the computation is parallelized.

omp_tree_

Number of trees above which the computation is parallelized for one observation.

omp_tree_

Number of trees above which the computation is parallelized for one observation.

post_transform_

See lpyort-TreeEnsembleRegressorDouble.

post_transform_

See lpyort-TreeEnsembleRegressor.

roots_

Returns the roots indices.

roots_

Returns the roots indices.

same_mode_

Tells if all nodes applies the same rule for thresholds.

same_mode_

Tells if all nodes applies the same rule for thresholds.

Documentation#

Implements runtime for operator TreeEnsembleRegressor. The code is inspired from tree_ensemble_regressor.cc in onnxruntime.

class mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble, arg0: int, arg1: int, arg2: bool, arg3: bool)#

Bases: pybind11_object

Implements double runtime for operator TreeEnsembleRegressor. The code is inspired from tree_ensemble_regressor.cc in onnxruntime. Supports double only.

Parameters:
  • omp_tree – number of trees above which the runtime uses openmp to parallelize tree computation when the number of observations it 1

  • omp_N – number of observations above which the runtime uses openmp to parallelize the predictions

  • array_structure – (bool) different implementation for better performance

  • para_tree – (bool) parallelize the computation per tree instead of observations

__init__(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble, arg0: int, arg1: int, arg2: bool, arg3: bool) None#
__sizeof__(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble) int#

Returns the size of the object.

property base_values_#

See lpyort-TreeEnsembleRegressorDouble.

compute(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble, arg0: numpy.ndarray[numpy.float64]) numpy.ndarray[numpy.float64]#

Computes the predictions for the random forest.

compute_tree_outputs(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble, arg0: numpy.ndarray[numpy.float64]) numpy.ndarray[numpy.float64]#

Computes every tree output.

debug_threshold(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble, arg0: numpy.ndarray[numpy.float64]) numpy.ndarray[numpy.int32]#

Checks every features against every features against every threshold. Returns a matrix of boolean.

property has_missing_tracks_#

Tells if the model handles missing values.

init(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble, arg0: str, arg1: numpy.ndarray[numpy.float64], arg2: int, arg3: numpy.ndarray[numpy.int64], arg4: numpy.ndarray[numpy.int64], arg5: numpy.ndarray[numpy.float64], arg6: numpy.ndarray[numpy.int64], arg7: List[str], arg8: numpy.ndarray[numpy.int64], arg9: numpy.ndarray[numpy.int64], arg10: numpy.ndarray[numpy.int64], arg11: numpy.ndarray[numpy.float64], arg12: str, arg13: numpy.ndarray[numpy.int64], arg14: numpy.ndarray[numpy.int64], arg15: numpy.ndarray[numpy.int64], arg16: numpy.ndarray[numpy.float64]) None#

Initializes the runtime with the ONNX attributes in alphabetical order.

property n_targets_#

See lpyort-TreeEnsembleRegressorDouble.

property nodes_modes_#

Returns the mode for every node.

property omp_N_#

Number of observations above which the computation is parallelized.

omp_get_max_threads(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble) int#

Returns omp_get_max_threads from openmp library.

property omp_tree_#

Number of trees above which the computation is parallelized for one observation.

property post_transform_#

See lpyort-TreeEnsembleRegressorDouble.

property roots_#

Returns the roots indices.

runtime_options(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPDouble) str#

Returns indications about how the runtime was compiled.

property same_mode_#

Tells if all nodes applies the same rule for thresholds.

class mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat, arg0: int, arg1: int, arg2: bool, arg3: bool)#

Bases: pybind11_object

Implements float runtime for operator TreeEnsembleRegressor. The code is inspired from tree_ensemble_regressor.cc in onnxruntime. Supports float only.

Parameters:
  • omp_tree – number of trees above which the runtime uses openmp to parallelize tree computation when the number of observations it 1

  • omp_N – number of observations above which the runtime uses openmp to parallelize the predictions

  • array_structure – (bool) different implementation for better performance

  • para_tree – (bool) parallelize the computation per tree instead of observations

__init__(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat, arg0: int, arg1: int, arg2: bool, arg3: bool) None#
__sizeof__(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat) int#

Returns the size of the object.

property base_values_#

See lpyort-TreeEnsembleRegressor.

compute(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat, arg0: numpy.ndarray[numpy.float32]) numpy.ndarray[numpy.float32]#

Computes the predictions for the random forest.

compute_tree_outputs(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat, arg0: numpy.ndarray[numpy.float32]) numpy.ndarray[numpy.float32]#

Computes every tree output.

debug_threshold(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat, arg0: numpy.ndarray[numpy.float32]) numpy.ndarray[numpy.int32]#

Checks every features against every features against every threshold. Returns a matrix of boolean.

property has_missing_tracks_#

Tells if the model handles missing values.

init(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat, arg0: str, arg1: numpy.ndarray[numpy.float32], arg2: int, arg3: numpy.ndarray[numpy.int64], arg4: numpy.ndarray[numpy.int64], arg5: numpy.ndarray[numpy.float32], arg6: numpy.ndarray[numpy.int64], arg7: List[str], arg8: numpy.ndarray[numpy.int64], arg9: numpy.ndarray[numpy.int64], arg10: numpy.ndarray[numpy.int64], arg11: numpy.ndarray[numpy.float32], arg12: str, arg13: numpy.ndarray[numpy.int64], arg14: numpy.ndarray[numpy.int64], arg15: numpy.ndarray[numpy.int64], arg16: numpy.ndarray[numpy.float32]) None#

Initializes the runtime with the ONNX attributes in alphabetical order.

property n_targets_#

See lpyort-TreeEnsembleRegressor.

property nodes_modes_#

Returns the mode for every node.

property omp_N_#

Number of observations above which the computation is parallelized.

omp_get_max_threads(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat) int#

Returns omp_get_max_threads from openmp library.

property omp_tree_#

Number of trees above which the computation is parallelized for one observation.

property post_transform_#

See lpyort-TreeEnsembleRegressor.

property roots_#

Returns the roots indices.

runtime_options(self: mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.RuntimeTreeEnsembleRegressorPFloat) str#

Returns indications about how the runtime was compiled.

property same_mode_#

Tells if all nodes applies the same rule for thresholds.

mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.test_tree_regressor_multitarget_average(arg0: int, arg1: int, arg2: bool, arg3: bool, arg4: bool, arg5: bool, arg6: bool) None#

Test the runtime (average).

mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.test_tree_regressor_multitarget_max(arg0: int, arg1: int, arg2: bool, arg3: bool, arg4: bool, arg5: bool, arg6: bool) None#

Test the runtime (max).

mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.test_tree_regressor_multitarget_min(arg0: int, arg1: int, arg2: bool, arg3: bool, arg4: bool, arg5: bool, arg6: bool) None#

Test the runtime (min).

mlprodict.onnxrt.ops_cpu.op_tree_ensemble_regressor_p_.test_tree_regressor_multitarget_sum(arg0: int, arg1: int, arg2: bool, arg3: bool, arg4: bool, arg5: bool, arg6: bool) None#

Test the runtime (sum).