secretflow.ml.boost.sgb_v.factory.components.gradient_encryptor#
Classes:
Manage all encryptions related to y, gradients, hessians |
- class secretflow.ml.boost.sgb_v.factory.components.gradient_encryptor.GradientEncryptor[源代码]#
基类:
Component
Manage all encryptions related to y, gradients, hessians
Methods:
__init__
()set_devices
(devices)get_params
(params)set_params
(params)pack
(g, h)encrypt
(gh, tree_index)cache_to_workers
(encrypted_gh, gh)get_move_config
(pyu)
secretflow.ml.boost.sgb_v.factory.components.gradient_encryptor.gradient_encryptor#
Classes:
'fixed_point_parameter': int. Any floating point number encoded by heu, |
|
Manage all encryptions related to y, gradients, hessians |
Functions:
|
|
|
- class secretflow.ml.boost.sgb_v.factory.components.gradient_encryptor.gradient_encryptor.GradientEncryptorParams(fixed_point_parameter: int = 20, batch_encoding_enabled: bool = True, audit_paths: dict = <factory>)[源代码]#
基类:
object
- ‘fixed_point_parameter’: int. Any floating point number encoded by heu,
will multiply a scale and take the round, scale = 2 ** fixed_point_parameter. larger value may mean more numerical accurate, but too large will lead to overflow problem. See HEU’s document for more details.
default: 20
- ‘batch_encoding_enabled’: bool. if use batch encoding optimization.
default: True.
‘audit_paths’: dict. {device : path to save log for audit}
Attributes:
Methods:
__init__
([fixed_point_parameter, ...])- fixed_point_parameter: int = 20#
- batch_encoding_enabled: bool = True#
- audit_paths: dict#
- __init__(fixed_point_parameter: int = 20, batch_encoding_enabled: bool = True, audit_paths: dict = <factory>) None #
- secretflow.ml.boost.sgb_v.factory.components.gradient_encryptor.gradient_encryptor.define_encoder(params: GradientEncryptorParams)[源代码]#
- class secretflow.ml.boost.sgb_v.factory.components.gradient_encryptor.gradient_encryptor.GradientEncryptor[源代码]#
基类:
Component
Manage all encryptions related to y, gradients, hessians
Methods:
__init__
()set_devices
(devices)get_params
(params)set_params
(params)pack
(g, h)encrypt
(gh, tree_index)cache_to_workers
(encrypted_gh, gh)get_move_config
(pyu)