secretflow.ml.boost.sgb_v.factory#

Classes:

SGBFactory()

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[源代码]#

基类:object

You 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:

SGBFactoryParams

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)

__init__()[源代码]#
set_params(params: dict)[源代码]#

Set params by a dictionary.

set_heu(heu: HEU)[源代码]#
get_params(detailed: bool = False) dict[源代码]#

get the params set

参数:

detailed (bool, optional) – If include default settings. Defaults to False.

返回:

current params.

返回类型:

dict

fit(dataset: Union[FedNdarray, VDataFrame], label: Union[FedNdarray, VDataFrame]) SgbModel[源代码]#
train(params: dict, dataset: Union[FedNdarray, VDataFrame], label: Union[FedNdarray, VDataFrame]) SgbModel[源代码]#

secretflow.ml.boost.sgb_v.factory.factory#

Classes:

TreeGrowingMethod(value)

An enumeration.

SGBFactoryParams(tree_growing_method)

SGBFactory()

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)[源代码]#

基类:Enum

An enumeration.

Attributes:

LEVEL

LEAF

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'>)[源代码]#

基类:object

Attributes:

tree_growing_method

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[源代码]#

基类:object

You 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:

SGBFactoryParams

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)

__init__()[源代码]#
set_params(params: dict)[源代码]#

Set params by a dictionary.

set_heu(heu: HEU)[源代码]#
get_params(detailed: bool = False) dict[源代码]#

get the params set

参数:

detailed (bool, optional) – If include default settings. Defaults to False.

返回:

current params.

返回类型:

dict

fit(dataset: Union[FedNdarray, VDataFrame], label: Union[FedNdarray, VDataFrame]) SgbModel[源代码]#
train(params: dict, dataset: Union[FedNdarray, VDataFrame], label: Union[FedNdarray, VDataFrame]) SgbModel[源代码]#