Implements XGBoost models.
Implements the XGBoost classifier.
See https://xgboost.readthedocs.io/en/stable/python/python_api.html#module-xgboost.sklearn for more information about the parameters used.
__init__(
n_bits: int = 6,
max_depth: Optional[int] = 3,
learning_rate: Optional[float] = None,
n_estimators: Optional[int] = 20,
objective: Optional[str] = 'binary:logistic',
booster: Optional[str] = None,
tree_method: Optional[str] = None,
n_jobs: Optional[int] = None,
gamma: Optional[float] = None,
min_child_weight: Optional[float] = None,
max_delta_step: Optional[float] = None,
subsample: Optional[float] = None,
colsample_bytree: Optional[float] = None,
colsample_bylevel: Optional[float] = None,
colsample_bynode: Optional[float] = None,
reg_alpha: Optional[float] = None,
reg_lambda: Optional[float] = None,
scale_pos_weight: Optional[float] = None,
base_score: Optional[float] = None,
missing: float = nan,
num_parallel_tree: Optional[int] = None,
monotone_constraints: Optional[Dict[str, int], str] = None,
interaction_constraints: Optional[str, List[Tuple[str]]] = None,
importance_type: Optional[str] = None,
gpu_id: Optional[int] = None,
validate_parameters: Optional[bool] = None,
predictor: Optional[str] = None,
enable_categorical: bool = False,
use_label_encoder: bool = False,
random_state: Optional[int] = None,
verbosity: Optional[int] = None
)
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)
Implements the XGBoost regressor.
See https://xgboost.readthedocs.io/en/stable/python/python_api.html#module-xgboost.sklearn for more information about the parameters used.
__init__(
n_bits: int = 6,
max_depth: Optional[int] = 3,
learning_rate: Optional[float] = None,
n_estimators: Optional[int] = 20,
objective: Optional[str] = 'reg:squarederror',
booster: Optional[str] = None,
tree_method: Optional[str] = None,
n_jobs: Optional[int] = None,
gamma: Optional[float] = None,
min_child_weight: Optional[float] = None,
max_delta_step: Optional[float] = None,
subsample: Optional[float] = None,
colsample_bytree: Optional[float] = None,
colsample_bylevel: Optional[float] = None,
colsample_bynode: Optional[float] = None,
reg_alpha: Optional[float] = None,
reg_lambda: Optional[float] = None,
scale_pos_weight: Optional[float] = None,
base_score: Optional[float] = None,
missing: float = nan,
num_parallel_tree: Optional[int] = None,
monotone_constraints: Optional[Dict[str, int], str] = None,
interaction_constraints: Optional[str, List[Tuple[str]]] = None,
importance_type: Optional[str] = None,
gpu_id: Optional[int] = None,
validate_parameters: Optional[bool] = None,
predictor: Optional[str] = None,
enable_categorical: bool = False,
use_label_encoder: bool = False,
random_state: Optional[int] = None,
verbosity: Optional[int] = None
)
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]
fit(X, y, *args, **kwargs) → Any
load_dict(metadata: Dict)
post_processing(y_preds: ndarray) → ndarray