(self, data_inst)
return data_inst
:param data_inst: Table
        :return:
def fit(self, data_inst):
        """

        :param data_inst: Table
        :return:
        """
        # LOGGER.info("data count = {}".format(data_inst.count()))
        abnormal_detection.empty_table_detection(data_inst)
        self._update_target_indexes(data_inst.schema)
        match_data = data_inst
        if data_overview.check_with_inst_id(data_inst):
            match_data = self._recover_match_id(data_inst)

        # 0. Raw retrieval
        if self.model_param.raw_retrieval or self.security_level == 0:
            LOGGER.info("enter raw information retrieval host")
            # abnormal_detection.empty_table_detection(data_inst)
            self._raw_information_retrieval(match_data)
            self._display_result(block_num='N/A')
            self._sync_coverage(data_inst)
            return data_inst

        # 1. Data pre-processing
        LOGGER.info("enter secure information retrieval host")
        # abnormal_detection.empty_table_detection(data_inst)
        self._parse_security_level(match_data)
        if not self._check_oblivious_transfer_condition():
            self._failure_response()

        # 2. Guest find intersection
        self.intersection_obj.get_intersect_doubly_encrypted_id(match_data)
        id_list_host_first = self.intersection_obj.id_list_local_first

        # 3. Get the re-indexed doubly encrypted ID from guest
        id_blocks = self._iteratively_get_id_blocks()

        # 4. Restore value for the intersection
        id_blocks = _restore_value(id_list_host_first,
                                   id_blocks,
                                   self.target_indexes,
                                   self.need_label)      # List[(Ei, val)]
        LOGGER.info("interested values restored")

        # 8. Execute OT as sender
        LOGGER.info("enter oblivious transfer protocol as a sender")
        key_list = self.oblivious_transfer.key_derivation(self.block_num)
        LOGGER.info("oblivious transfer key derived")

        # 9. Encrypt and transmit
        self._non_committing_encrypt(id_blocks, key_list)       # List[(Ei, Eval)]
        LOGGER.info("non-committing encryption and transmission completed")

        # 10. Slack
        self._sync_coverage(data_inst)
        self._display_result()
        LOGGER.info("secure information retrieval finished")

        return data_inst
def fit ( self , data_inst ) : # LOGGER.info("data count = {}".format(data_inst.count())) abnormal_detection . empty_table_detection ( data_inst ) self . _update_target_indexes ( data_inst . schema ) match_data = data_inst if data_overview . check_with_inst_id ( data_inst ) : match_data = self . _recover_match_id ( data_inst ) # 0. Raw retrieval if self . model_param . raw_retrieval or self . security_level == 0 : LOGGER . info ( "enter raw information retrieval host" ) # abnormal_detection.empty_table_detection(data_inst) self . _raw_information_retrieval ( match_data ) self . _display_result ( block_num = 'N/A' ) self . _sync_coverage ( data_inst ) return data_inst # 1. Data pre-processing LOGGER . info ( "enter secure information retrieval host" ) # abnormal_detection.empty_table_detection(data_inst) self . _parse_security_level ( match_data ) if not self . _check_oblivious_transfer_condition ( ) : self . _failure_response ( ) # 2. Guest find intersection self . intersection_obj . get_intersect_doubly_encrypted_id ( match_data ) id_list_host_first = self . intersection_obj . id_list_local_first # 3. Get the re-indexed doubly encrypted ID from guest id_blocks = self . _iteratively_get_id_blocks ( ) # 4. Restore value for the intersection id_blocks = _restore_value ( id_list_host_first , id_blocks , self . target_indexes , self . need_label ) # List[(Ei, val)] LOGGER . info ( "interested values restored" ) # 8. Execute OT as sender LOGGER . info ( "enter oblivious transfer protocol as a sender" ) key_list = self . oblivious_transfer . key_derivation ( self . block_num ) LOGGER . info ( "oblivious transfer key derived" ) # 9. Encrypt and transmit self . _non_committing_encrypt ( id_blocks , key_list ) # List[(Ei, Eval)] LOGGER . info ( "non-committing encryption and transmission completed" ) # 10. Slack self . _sync_coverage ( data_inst ) self . _display_result ( ) LOGGER . info ( "secure information retrieval finished" ) return data_inst