Esempio n. 1
0
    def __init__(self):
        super(HeteroSecureBoostingTreeHost, self).__init__()
        self.use_missing = False
        self.zero_as_missing = False
        self.grad_and_hess = None
        self.tree_param = DecisionTreeParam()  # decision tree param
        self.model_param = HeteroSecureBoostParam()
        self.complete_secure = False
        self.model_name = 'HeteroSecureBoost'
        self.enable_goss = False
        self.cipher_compressing = False
        self.max_sample_weight = None
        self.round_decimal = None
        self.new_ver = True

        self.boosting_strategy = consts.STD_TREE

        # fast sbt param
        self.tree_num_per_party = 1
        self.guest_depth = 0
        self.host_depth = 0
        self.init_tree_plan = False
        self.tree_plan = []
        self.feature_importances_ = {}

        # EINI predict param
        self.EINI_inference = False
        self.EINI_random_mask = False
        self.EINI_complexity_check = False

        self.multi_mode = consts.SINGLE_OUTPUT

        self.hetero_sbt_transfer_variable = HeteroSecureBoostTransferVariable()
Esempio n. 2
0
    def __init__(self):
        super(HeteroSecureBoostingTreeGuest, self).__init__()

        self.tree_param = DecisionTreeParam()  # decision tree param
        self.use_missing = False
        self.zero_as_missing = False
        self.cur_epoch_idx = -1
        self.grad_and_hess = None
        self.feature_importances_ = {}
        self.model_param = HeteroSecureBoostParam()
        self.complete_secure = False
        self.data_alignment_map = {}
        self.hetero_sbt_transfer_variable = HeteroSecureBoostTransferVariable()
        self.model_name = 'HeteroSecureBoost'
        self.max_sample_weight = 1
        self.max_sample_weight_computed = False
        self.re_compute_goss_sample_weight = False
        self.cipher_compressing = False

        self.enable_goss = False  # GOSS
        self.top_rate = None
        self.other_rate = None
        self.new_ver = True

        self.boosting_strategy = consts.STD_TREE  # default work mode is std

        # fast sbt param
        self.tree_num_per_party = 1
        self.guest_depth = 0
        self.host_depth = 0
        self.init_tree_plan = False
        self.tree_plan = []

        # multi-classification mode
        self.multi_mode = consts.SINGLE_OUTPUT

        # EINI predict param
        self.EINI_inference = False
        self.EINI_random_mask = False
    def __init__(self):
        super(HeteroSecureBoostingTreeHost, self).__init__()
        self.use_missing = False
        self.zero_as_missing = False
        self.cur_epoch_idx = -1
        self.grad_and_hess = None
        self.tree_param = DecisionTreeParam()  # decision tree param
        self.model_param = HeteroSecureBoostParam()
        self.complete_secure = False
        self.model_name = 'HeteroSecureBoost'
        self.enable_goss = False
        self.cipher_compressing = False
        self.max_sample_weight = None
        self.round_decimal = None
        self.new_ver = True

        # for fast hist
        self.sparse_opt_para = False
        self.run_sparse_opt = False
        self.has_transformed_data = False
        self.data_bin_dense = None
        self.predict_transfer_inst = HeteroSecureBoostTransferVariable()
Esempio n. 4
0
    def __init__(self):
        super(HeteroSecureBoostingTreeGuest, self).__init__()

        self.tree_param = DecisionTreeParam()  # decision tree param
        self.use_missing = False
        self.zero_as_missing = False
        self.cur_epoch_idx = -1
        self.grad_and_hess = None
        self.feature_importances_ = {}
        self.model_param = HeteroSecureBoostParam()
        self.complete_secure = False
        self.data_alignment_map = {}
        self.predict_transfer_inst = HeteroSecureBoostTransferVariable()
        self.model_name = 'HeteroSecureBoost'
        self.max_sample_weight = 1
        self.max_sample_weight_computed = False
        self.cipher_compressing = False

        self.enable_goss = False  # GOSS
        self.top_rate = None
        self.other_rate = None
        self.new_ver = True