Implement RandomForest models.
Implements the RandomForest classifier.
__init__(
n_bits: Union[int, Dict[str, int]] = 6,
n_estimators=20,
criterion='gini',
max_depth=4,
min_samples_split=2,
min_samples_leaf=1,
min_weight_fraction_leaf=0.0,
max_features='sqrt',
max_leaf_nodes=None,
min_impurity_decrease=0.0,
bootstrap=True,
oob_score=False,
n_jobs=None,
random_state=None,
verbose=0,
warm_start=False,
class_weight=None,
ccp_alpha=0.0,
max_samples=None
)
Initialize the RandomForestClassifier.
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/get-started/terminology) 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 RandomForest regressor.
__init__(
n_bits: Union[int, Dict[str, int]] = 6,
n_estimators=20,
criterion='squared_error',
max_depth=4,
min_samples_split=2,
min_samples_leaf=1,
min_weight_fraction_leaf=0.0,
max_features=1.0,
max_leaf_nodes=None,
min_impurity_decrease=0.0,
bootstrap=True,
oob_score=False,
n_jobs=None,
random_state=None,
verbose=0,
warm_start=False,
ccp_alpha=0.0,
max_samples=None
)
Initialize the RandomForestRegressor.
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/get-started/terminology) 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)