secretflow.ml.boost.sgb_v.core.preprocessing#

secretflow.ml.boost.sgb_v.core.preprocessing.params#

Classes:

RegType(value)

An enumeration.

LabelHolderInfo(seed, reg_lambda, gamma, ...)

SGBTrainParams(num_boost_round, max_depth, ...)

class secretflow.ml.boost.sgb_v.core.preprocessing.params.RegType(value)[源代码]#

基类:Enum

An enumeration.

Attributes:

Linear

Logistic

Linear = 'linear'#
Logistic = 'logistic'#
class secretflow.ml.boost.sgb_v.core.preprocessing.params.LabelHolderInfo(seed: int, reg_lambda: float, gamma: float, learning_rate: float, base_score: float, sample_num: int, subsample_rate: float, obj_type: secretflow.ml.boost.sgb_v.core.preprocessing.params.RegType)[源代码]#

基类:object

Attributes:

seed

reg_lambda

gamma

learning_rate

base_score

sample_num

subsample_rate

obj_type

Methods:

__init__(seed, reg_lambda, gamma, ...)

seed: int#
reg_lambda: float#
gamma: float#
learning_rate: float#
base_score: float#
sample_num: int#
subsample_rate: float#
obj_type: RegType#
__init__(seed: int, reg_lambda: float, gamma: float, learning_rate: float, base_score: float, sample_num: int, subsample_rate: float, obj_type: RegType) None#
class secretflow.ml.boost.sgb_v.core.preprocessing.params.SGBTrainParams(num_boost_round: int, max_depth: int, learning_rate: float, objective: secretflow.ml.boost.sgb_v.core.preprocessing.params.RegType, reg_lambda: float, gamma: float, subsample: float, colsample_by_tree: float, base_score: float, sketch_eps: float, seed: int, fixed_point_parameter: int)[源代码]#

基类:object

Attributes:

num_boost_round

max_depth

learning_rate

objective

reg_lambda

gamma

subsample

colsample_by_tree

base_score

sketch_eps

seed

fixed_point_parameter

Methods:

__init__(num_boost_round, max_depth, ...)

num_boost_round: int#
max_depth: int#
learning_rate: float#
objective: RegType#
reg_lambda: float#
gamma: float#
subsample: float#
colsample_by_tree: float#
base_score: float#
sketch_eps: float#
seed: int#
fixed_point_parameter: int#
__init__(num_boost_round: int, max_depth: int, learning_rate: float, objective: RegType, reg_lambda: float, gamma: float, subsample: float, colsample_by_tree: float, base_score: float, sketch_eps: float, seed: int, fixed_point_parameter: int) None#

secretflow.ml.boost.sgb_v.core.preprocessing.preprocessing#

Functions:

prepare_dataset(ds)

check data setting and get total shape.

validate_sgb_params_dict(params)

secretflow.ml.boost.sgb_v.core.preprocessing.preprocessing.prepare_dataset(ds: Union[FedNdarray, VDataFrame]) Tuple[FedNdarray, Tuple[int, int]][源代码]#

check data setting and get total shape.

参数:

ds – input dataset

返回:

dataset in unified type Second: shape concat all partition.

返回类型:

First

secretflow.ml.boost.sgb_v.core.preprocessing.preprocessing.validate_sgb_params_dict(params: dict) SGBTrainParams[源代码]#