Files
ml-sdk/docs/references/api/concrete.ml.sklearn.rf.md
zeekay 397da37894 docs+brand: purge Zama/Fhenix references — Lux FHE / Torus / TorusEVM / TorusML / TorusNet canonical names
Files edited: 150
Brand-hit files before: 163
Brand-hit files after: 28

Substitutions:
- Zama Concrete ML        -> TorusML
- Zama Concrete / Concrete-> Torus
- Zama fhEVM / fhEVM      -> TorusEVM
- Zama TFHE-rs / tfhe-rs  -> Lux-FHE (github.com/luxfi/fhe)
- Zama (attribution)      -> Lux Industries
- zama-ai/* (GitHub)      -> luxfhe/*
- @zama-fhe/* (npm)       -> @luxfhe/*
- docs.zama.ai            -> docs.lux.network
- Fhenix / CoFHE          -> dropped or rewritten to Lux FHE / TorusEVM coprocessor

Text-only changes. No runtime code semantics altered.
2026-05-29 13:20:44 -07:00

6.5 KiB

module concrete.ml.sklearn.rf

Implement RandomForest models.


class RandomForestClassifier

Implements the RandomForest classifier.

method __init__

__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,
    monotonic_cst=None
)

Initialize the RandomForestClassifier.

noqa: DAR101


property fhe_circuit

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.lux.network/torus/get-started/terminology) Is None if the model is not fitted.

Returns:

  • Circuit: The FHE circuit.

property is_compiled

Indicate if the model is compiled.

Returns:

  • bool: If the model is compiled.

property is_fitted

Indicate if the model is fitted.

Returns:

  • bool: If the model is fitted.

property n_classes_

Get the model's number of classes.

Using this attribute is deprecated.

Returns:

  • int: The model's number of classes.

property onnx_model

Get the ONNX model.

Is None if the model is not fitted.

Returns:

  • onnx.ModelProto: The ONNX model.

property target_classes_

Get the model's classes.

Using this attribute is deprecated.

Returns:

  • Optional[numpy.ndarray]: The model's classes.

method dump_dict

dump_dict() → Dict[str, Any]

classmethod load_dict

load_dict(metadata: Dict)

method post_processing

post_processing(y_preds: ndarray) → ndarray

class RandomForestRegressor

Implements the RandomForest regressor.

method __init__

__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,
    monotonic_cst=None
)

Initialize the RandomForestRegressor.

noqa: DAR101


property fhe_circuit

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.lux.network/torus/get-started/terminology) Is None if the model is not fitted.

Returns:

  • Circuit: The FHE circuit.

property is_compiled

Indicate if the model is compiled.

Returns:

  • bool: If the model is compiled.

property is_fitted

Indicate if the model is fitted.

Returns:

  • bool: If the model is fitted.

property onnx_model

Get the ONNX model.

Is None if the model is not fitted.

Returns:

  • onnx.ModelProto: The ONNX model.

method dump_dict

dump_dict() → Dict[str, Any]

classmethod load_dict

load_dict(metadata: Dict)