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[source]#

Bases: 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__()[source]#
set_params(params: dict)[source]#

Set params by a dictionary.

set_heu(heu: HEU)[source]#
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.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)[source]#

Bases: 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'>)[source]#

Bases: 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[source]#

Bases: 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__()[source]#
set_params(params: dict)[source]#

Set params by a dictionary.

set_heu(heu: HEU)[source]#
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]#