(self, data_instances)
return predict_result
Prediction of lr
        Parameters
        ----------
        data_instances: Table of Instance, input data

        Returns
        ----------
        Table
            include input data label, predict probably, label
Prediction of lr
        Parameters
        ----------
        data_instances: Table of Instance, input data
Prediction of lr Parameters ---------- data_instances : Table of Instance input data
def predict(self, data_instances):
        """
        Prediction of lr
        Parameters
        ----------
        data_instances: Table of Instance, input data

        Returns
        ----------
        Table
            include input data label, predict probably, label
        """
        self._abnormal_detection(data_instances)
        data_instances = self.align_data_header(data_instances, self.header)
        if self.need_one_vs_rest:
            predict_result = self.one_vs_rest_obj.predict(data_instances)
            return predict_result
        LOGGER.debug(
            f"Before_predict_reveal_strategy: {self.model_param.reveal_strategy}, {self.is_respectively_reveal}")

        def _vec_dot(v, coef, intercept):
            return fate_operator.vec_dot(v.features, coef) + intercept

        f = functools.partial(_vec_dot,
                              coef=self.model_weights.coef_,
                              intercept=self.model_weights.intercept_)

        pred_prob = data_instances.mapValues(f)
        host_probs = self.transfer_variable.host_prob.get(idx=-1)

        LOGGER.info("Get probability from Host")

        # guest probability
        for host_prob in host_probs:
            if not self.is_respectively_reveal:
                host_prob = self.cipher.distribute_decrypt(host_prob)
            pred_prob = pred_prob.join(host_prob, lambda g, h: g + h)
        pred_prob = pred_prob.mapValues(lambda p: activation.sigmoid(p))
        threshold = self.model_param.predict_param.threshold
        predict_result = self.predict_score_to_output(data_instances, pred_prob, classes=[0, 1], threshold=threshold)

        return predict_result
def predict ( self , data_instances ) : self . _abnormal_detection ( data_instances ) data_instances = self . align_data_header ( data_instances , self . header ) if self . need_one_vs_rest : predict_result = self . one_vs_rest_obj . predict ( data_instances ) return predict_result LOGGER . debug ( f"Before_predict_reveal_strategy: {self.model_param.reveal_strategy}, {self.is_respectively_reveal}" ) def _vec_dot ( v , coef , intercept ) : return fate_operator . vec_dot ( v . features , coef ) + intercept f = functools . partial ( _vec_dot , coef = self . model_weights . coef_ , intercept = self . model_weights . intercept_ ) pred_prob = data_instances . mapValues ( f ) host_probs = self . transfer_variable . host_prob . get ( idx = - 1 ) LOGGER . info ( "Get probability from Host" ) # guest probability for host_prob in host_probs : if not self . is_respectively_reveal : host_prob = self . cipher . distribute_decrypt ( host_prob ) pred_prob = pred_prob . join ( host_prob , lambda g , h : g + h ) pred_prob = pred_prob . mapValues ( lambda p : activation . sigmoid ( p ) ) threshold = self . model_param . predict_param . threshold predict_result = self . predict_score_to_output ( data_instances , pred_prob , classes = [ 0 , 1 ] , threshold = threshold ) return predict_result