concrete.ml.sklearn.tree_to_numpy.md
module concrete.ml.sklearn.tree_to_numpy
concrete.ml.sklearn.tree_to_numpy
Implements the conversion of a tree model to a numpy function.
Global Variables
MAX_BITWIDTH_BACKWARD_COMPATIBLE
OPSET_VERSION_FOR_ONNX_EXPORT
EXPECTED_NUMBER_OF_OUTPUTS_PER_TASK
function tree_to_numpy
tree_to_numpy
Convert the tree inference to a numpy functions using Hummingbird.
Args:
model
(onnx.ModelProto): The model to convert.x
(numpy.ndarray): The input data.framework
(str): The framework from which the onnx_model is generated.(options
: 'xgboost', 'sklearn')task
(Task): The task the model is solvingoutput_n_bits
(int): The number of bits of the output.
Returns:
Tuple[Callable, List[QuantizedArray], onnx.ModelProto]
: A tuple with a function that takes a numpy array and returns a numpy array, QuantizedArray object to quantize and dequantize the output of the tree, and the ONNX model.
class Task
Task
Task enumerate.
Last updated