(self, data_instances, delta_s, cipher_operator)
return sqn_forwards
To compute Hessian matrix, y, s are needed.
        g = (1/N)*∑(0.25 * wx - 0.5 * y) * x
        y = ∇2^F(w_t)s_t = g' * s = (1/N)*∑(0.25 * x * s) * x
        define forward_hess = ∑(0.25 * x * s)
To compute Hessian matrix, y, s are needed.
        g = (1/N)*∑(0.25 * wx - 0.5 * y) * x
        y = ∇2^F(w_t)s_t = g' * s = (1/N)*∑(0.25 * x * s) * x
        define forward_hess = ∑(0.25 * x * s)
To compute Hessian matrix y s are needed . g = ( 1 / N ) * ∑ ( 0 . 25 * wx - 0 . 5 * y ) * x y = ∇2^F ( w_t ) s_t = g * s = ( 1 / N ) * ∑ ( 0 . 25 * x * s ) * x define forward_hess = ∑ ( 0 . 25 * x * s )
def compute_sqn_forwards(self, data_instances, delta_s, cipher_operator):
        """
        To compute Hessian matrix, y, s are needed.
        g = (1/N)*∑(0.25 * wx - 0.5 * y) * x
        y = ∇2^F(w_t)s_t = g' * s = (1/N)*∑(0.25 * x * s) * x
        define forward_hess = ∑(0.25 * x * s)
        """
        sqn_forwards = data_instances.mapValues(
            lambda v: cipher_operator.encrypt(fate_operator.vec_dot(v.features, delta_s.coef_) + delta_s.intercept_))
        # forward_sum = sqn_forwards.reduce(reduce_add)
        return sqn_forwards
def compute_sqn_forwards ( self , data_instances , delta_s , cipher_operator ) : sqn_forwards = data_instances . mapValues ( lambda v : cipher_operator . encrypt ( fate_operator . vec_dot ( v . features , delta_s . coef_ ) + delta_s . intercept_ ) ) # forward_sum = sqn_forwards.reduce(reduce_add) return sqn_forwards