Implement DecisionTree models.
Implements the sklearn DecisionTreeClassifier.
__init__(
criterion='gini',
splitter='best',
max_depth=None,
min_samples_split=2,
min_samples_leaf=1,
min_weight_fraction_leaf=0.0,
max_features=None,
random_state=None,
max_leaf_nodes=None,
min_impurity_decrease=0.0,
class_weight=None,
ccp_alpha: float = 0.0,
n_bits: int = 6
)
Initialize the DecisionTreeClassifier.
Get the FHE circuit.
The FHE circuit combines computational graph, mlir, client and server into a single object. More information available in Concrete documentation (https://docs.zama.ai/concrete/getting-started/terminology_and_structure) Is None if the model is not fitted.
Returns:
Circuit
: The FHE circuit.
Indicate if the model is compiled.
Returns:
bool
: If the model is compiled.
Indicate if the model is fitted.
Returns:
bool
: If the model is fitted.
Get the model's number of classes.
Using this attribute is deprecated.
Returns:
int
: The model's number of classes.
Get the ONNX model.
Is None if the model is not fitted.
Returns:
onnx.ModelProto
: The ONNX model.
Get the model's classes.
Using this attribute is deprecated.
Returns:
Optional[numpy.ndarray]
: The model's classes.
dump_dict() → Dict[str, Any]
load_dict(metadata: Dict)
post_processing(y_preds: ndarray) → ndarray
Implements the sklearn DecisionTreeClassifier.
__init__(
criterion='squared_error',
splitter='best',
max_depth=None,
min_samples_split=2,
min_samples_leaf=1,
min_weight_fraction_leaf=0.0,
max_features=None,
random_state=None,
max_leaf_nodes=None,
min_impurity_decrease=0.0,
ccp_alpha=0.0,
n_bits: int = 6
)
Initialize the DecisionTreeRegressor.
Get the FHE circuit.
The FHE circuit combines computational graph, mlir, client and server into a single object. More information available in Concrete documentation (https://docs.zama.ai/concrete/getting-started/terminology_and_structure) Is None if the model is not fitted.
Returns:
Circuit
: The FHE circuit.
Indicate if the model is compiled.
Returns:
bool
: If the model is compiled.
Indicate if the model is fitted.
Returns:
bool
: If the model is fitted.
Get the ONNX model.
Is None if the model is not fitted.
Returns:
onnx.ModelProto
: The ONNX model.
dump_dict() → Dict[str, Any]
load_dict(metadata: Dict)