(self, data_instances, coef_, intercept_, batch_index=-1)
return host_forward
Compute W * X + b and (W * X + b)^2, where X is the input data, W is the coefficient of lr,
        and b is the interception
        Parameters
        ----------
        data_instances: Table of Instance, input data
        coef_: list, coefficient of lr
        intercept_: float, the interception of lr
Compute W * X + b and (W * X + b)^2, where X is the input data, W is the coefficient of lr,
        and b is the interception
        Parameters
        ----------
        data_instances: Table of Instance, input data
        coef_: list, coefficient of lr
        intercept_: float, the interception of lr
Compute W * X + b and ( W * X + b ) ^2 where X is the input data W is the coefficient of lr and b is the interception Parameters ---------- data_instances : Table of Instance input data coef_ : list coefficient of lr intercept_ : float the interception of lr
def compute_forward(self, data_instances, coef_, intercept_, batch_index=-1):
        """
        Compute W * X + b and (W * X + b)^2, where X is the input data, W is the coefficient of lr,
        and b is the interception
        Parameters
        ----------
        data_instances: Table of Instance, input data
        coef_: list, coefficient of lr
        intercept_: float, the interception of lr
        """
        wx = self.compute_wx(data_instances, coef_, intercept_)

        en_wx = self.encrypted_calculator[batch_index].encrypt(wx)
        wx_square = wx.mapValues(lambda v: np.square(v))
        en_wx_square = self.encrypted_calculator[batch_index].encrypt(wx_square)

        host_forward = en_wx.join(en_wx_square, lambda wx, wx_square: (wx, wx_square))

        # temporary resource recovery and will be removed in the future
        rubbish_list = [wx,
                        en_wx,
                        wx_square,
                        en_wx_square
                        ]
        rubbish_clear(rubbish_list)

        return host_forward
def compute_forward ( self , data_instances , coef_ , intercept_ , batch_index = - 1 ) : wx = self . compute_wx ( data_instances , coef_ , intercept_ ) en_wx = self . encrypted_calculator [ batch_index ] . encrypt ( wx ) wx_square = wx . mapValues ( lambda v : np . square ( v ) ) en_wx_square = self . encrypted_calculator [ batch_index ] . encrypt ( wx_square ) host_forward = en_wx . join ( en_wx_square , lambda wx , wx_square : ( wx , wx_square ) ) # temporary resource recovery and will be removed in the future rubbish_list = [ wx , en_wx , wx_square , en_wx_square ] rubbish_clear ( rubbish_list ) return host_forward