secretflow.ml.boost.sgb_v.factory.components.split_tree_builder#
Classes:
- class secretflow.ml.boost.sgb_v.factory.components.split_tree_builder.SplitTreeBuilder[源代码]#
基类:
ComponentMethods:
__init__()set_params(_)get_params(_)set_devices(devices)reset()set_col_choices_and_buckets(col_choices, ...)split_bucket_to_partition(split_buckets)map split bucket to position in the partition or -1 if not in partition
map the unmasked split buckets to feature and split point
insert split points to split trees
do_split(split_buckets, sampled_rows, ...)- set_col_choices_and_buckets(col_choices: List[PYUObject], total_buckets: List[PYUObject], feature_buckets: List[PYUObject])[源代码]#
- split_bucket_to_partition(split_buckets: PYUObject) List[PYUObject][源代码]#
map split bucket to position in the partition or -1 if not in partition
- get_split_feature_list_wise_each_party(un_shuffled_split_buckets_each_party: List[PYUObject]) List[PYUObject][源代码]#
map the unmasked split buckets to feature and split point
- do_split_list_wise_each_party(split_features: List[PYUObject], split_points: List[PYUObject], left_child_selects: List[PYUObject], gain_is_cost_effective: List[bool], node_indices: Union[List[int], PYUObject]) List[List[int]][源代码]#
insert split points to split trees
- 参数:
split_features (List[PYUObject]) – party wise. each PYUObject is List[Tuple[int, int]]. len = node indices length.
split_points (List[PYUObject]) – : party wise. each PYUObject is List[float]. len = node indices length.
left_child_selects (List[PYUObject]) – party wise. each PYUObject is List[np.ndarray]
gain_is_cost_effective (List[bool]) – if gain is cost effective
node_indices (Union[List[int], PYUObject]) – node indices.
- 返回:
left child selects for the new split nodes.
- 返回类型:
left_child_selects
- do_split(split_buckets: List[int], sampled_rows: List[int], gain_is_cost_effective: List[bool], node_indices: Union[List[int], PYUObject], shuffler: Shuffler, order_map_manager: OrderMapManager) List[PYUObject][源代码]#
- insert_split_trees_into_distributed_tree(distributed_tree: DistributedTree, leaf_node_indices: PYUObject)[源代码]#
secretflow.ml.boost.sgb_v.factory.components.split_tree_builder.split_tree_actor#
Classes:
|
- secretflow.ml.boost.sgb_v.factory.components.split_tree_builder.split_tree_actor.SplitTreeBuilderActor[源代码]#
ActorProxy(SplitTreeBuilderActor)的别名 Methods:__init__(*args, **kwargs)Abstraction device object base class.
reset()set_buckets_count(buckets_count)save how many buckets in each partition's all features.
set_feature_bucket(feature_bucket)set_col_choices(col_choices)predict_leaf_selects(x)tree_finish(leaf_indices)find_split_bucket(split_bucket)check if this partition contains split bucket.
split_buckets_to_paritition(split_buckets)get_split_feature(split_bucket)find split bucket is belong to which feature.
get_split_feature_list_wise(split_buckets)do_split_list_wise(split_features, ...)record split info and generate next level's left children select.
do_split(split_buckets, sampled_rows, ...)record split info and generate next level's left children select.
secretflow.ml.boost.sgb_v.factory.components.split_tree_builder.split_tree_builder#
Classes:
- class secretflow.ml.boost.sgb_v.factory.components.split_tree_builder.split_tree_builder.SplitTreeBuilder[源代码]#
基类:
ComponentMethods:
__init__()set_params(_)get_params(_)set_devices(devices)reset()set_col_choices_and_buckets(col_choices, ...)split_bucket_to_partition(split_buckets)map split bucket to position in the partition or -1 if not in partition
map the unmasked split buckets to feature and split point
insert split points to split trees
do_split(split_buckets, sampled_rows, ...)- set_col_choices_and_buckets(col_choices: List[PYUObject], total_buckets: List[PYUObject], feature_buckets: List[PYUObject])[源代码]#
- split_bucket_to_partition(split_buckets: PYUObject) List[PYUObject][源代码]#
map split bucket to position in the partition or -1 if not in partition
- get_split_feature_list_wise_each_party(un_shuffled_split_buckets_each_party: List[PYUObject]) List[PYUObject][源代码]#
map the unmasked split buckets to feature and split point
- do_split_list_wise_each_party(split_features: List[PYUObject], split_points: List[PYUObject], left_child_selects: List[PYUObject], gain_is_cost_effective: List[bool], node_indices: Union[List[int], PYUObject]) List[List[int]][源代码]#
insert split points to split trees
- 参数:
split_features (List[PYUObject]) – party wise. each PYUObject is List[Tuple[int, int]]. len = node indices length.
split_points (List[PYUObject]) – : party wise. each PYUObject is List[float]. len = node indices length.
left_child_selects (List[PYUObject]) – party wise. each PYUObject is List[np.ndarray]
gain_is_cost_effective (List[bool]) – if gain is cost effective
node_indices (Union[List[int], PYUObject]) – node indices.
- 返回:
left child selects for the new split nodes.
- 返回类型:
left_child_selects
- do_split(split_buckets: List[int], sampled_rows: List[int], gain_is_cost_effective: List[bool], node_indices: Union[List[int], PYUObject], shuffler: Shuffler, order_map_manager: OrderMapManager) List[PYUObject][源代码]#
- insert_split_trees_into_distributed_tree(distributed_tree: DistributedTree, leaf_node_indices: PYUObject)[源代码]#