secretflow.ml.boost.sgb_v.factory#
Classes:
You can customize your own boosting algorithms which are based on any combination of ideas of secureboost, XGB, and lightGBM. |
- class secretflow.ml.boost.sgb_v.factory.SGBFactory[source]#
Bases:
objectYou can customize your own boosting algorithms which are based on any combination of ideas of secureboost, XGB, and lightGBM. The parameters for the produced booster algorithm depends on what components it consists of. See components’ parameters.
- params_dict#
A dict contain params for the factory, booster and its components.
- Type:
dict
- factory_params#
validated params for the factory.
- Type:
- heu#
the device for HE computations. must be set before training.
Methods:
__init__()set_params(params)Set params by a dictionary.
set_heu(heu)get_params([detailed])get the params set
fit(dataset, label)train(params, dataset, label)- get_params(detailed: bool = False) dict[source]#
get the params set
- Parameters:
detailed (bool, optional) – If include default settings. Defaults to False.
- Returns:
current params.
- Return type:
dict
- fit(dataset: Union[FedNdarray, VDataFrame], label: Union[FedNdarray, VDataFrame]) SgbModel[source]#
- train(params: dict, dataset: Union[FedNdarray, VDataFrame], label: Union[FedNdarray, VDataFrame]) SgbModel[source]#
- secretflow.ml.boost.sgb_v.factory.booster
- secretflow.ml.boost.sgb_v.factory.components
OrderMapManagerGradientEncryptorSamplerLeafManagerDataPreprocessorModelBuilderLossComputerTreeTrainerNodeSelectorLevelWiseCacheShufflerBucketSumCalculatorSplitFinderSplitTreeBuilderLevelWiseTreeTrainer- secretflow.ml.boost.sgb_v.factory.components.bucket_sum_calculator
- secretflow.ml.boost.sgb_v.factory.components.cache
- secretflow.ml.boost.sgb_v.factory.components.data_preprocessor
- secretflow.ml.boost.sgb_v.factory.components.gradient_encryptor
- secretflow.ml.boost.sgb_v.factory.components.leaf_manager
- secretflow.ml.boost.sgb_v.factory.components.loss_computer
- secretflow.ml.boost.sgb_v.factory.components.model_builder
- secretflow.ml.boost.sgb_v.factory.components.node_selector
- secretflow.ml.boost.sgb_v.factory.components.order_map_manager
- secretflow.ml.boost.sgb_v.factory.components.sampler
- secretflow.ml.boost.sgb_v.factory.components.shuffler
- secretflow.ml.boost.sgb_v.factory.components.split_finder
- secretflow.ml.boost.sgb_v.factory.components.split_tree_builder
- secretflow.ml.boost.sgb_v.factory.components.tree_trainer
- secretflow.ml.boost.sgb_v.factory.components.component
secretflow.ml.boost.sgb_v.factory.factory#
Classes:
|
An enumeration. |
|
|
You can customize your own boosting algorithms which are based on any combination of ideas of secureboost, XGB, and lightGBM. |
- class secretflow.ml.boost.sgb_v.factory.factory.TreeGrowingMethod(value)[source]#
Bases:
EnumAn enumeration.
Attributes:
- LEVEL = 'level'#
- LEAF = 'leaf'#
- class secretflow.ml.boost.sgb_v.factory.factory.SGBFactoryParams(tree_growing_method: secretflow.ml.boost.sgb_v.factory.factory.TreeGrowingMethod = <TreeGrowingMethod.LEVEL: 'level'>)[source]#
Bases:
objectAttributes:
Methods:
__init__([tree_growing_method])- tree_growing_method: TreeGrowingMethod = 'level'#
- __init__(tree_growing_method: TreeGrowingMethod = TreeGrowingMethod.LEVEL) None#
- class secretflow.ml.boost.sgb_v.factory.factory.SGBFactory[source]#
Bases:
objectYou can customize your own boosting algorithms which are based on any combination of ideas of secureboost, XGB, and lightGBM. The parameters for the produced booster algorithm depends on what components it consists of. See components’ parameters.
- params_dict#
A dict contain params for the factory, booster and its components.
- Type:
dict
- factory_params#
validated params for the factory.
- Type:
- heu#
the device for HE computations. must be set before training.
Methods:
__init__()set_params(params)Set params by a dictionary.
set_heu(heu)get_params([detailed])get the params set
fit(dataset, label)train(params, dataset, label)- get_params(detailed: bool = False) dict[source]#
get the params set
- Parameters:
detailed (bool, optional) – If include default settings. Defaults to False.
- Returns:
current params.
- Return type:
dict
- fit(dataset: Union[FedNdarray, VDataFrame], label: Union[FedNdarray, VDataFrame]) SgbModel[source]#
- train(params: dict, dataset: Union[FedNdarray, VDataFrame], label: Union[FedNdarray, VDataFrame]) SgbModel[source]#