def __init__(self): super(HeteroLinRArbiter, self).__init__() self.gradient_loss_operator = hetero_linr_gradient_and_loss.Arbiter() self.model_param = LinearParam() self.n_iter_ = 0 self.header = None self.model_param_name = 'HeteroLinearRegressionParam' self.model_meta_name = 'HeteroLinearRegressionMeta' self.is_converged = False self.mode = consts.HETERO self.in_one_vs_rest = False
def __init__(self): super(HeteroLinRArbiter, self).__init__() self.gradient_loss_operator = hetero_linr_gradient_and_loss.Arbiter() self.model_param = LinearParam() self.n_iter_ = 0 self.header = None self.model_param_name = 'HeteroLinearRegressionParam' self.model_meta_name = 'HeteroLinearRegressionMeta' self.model_name = 'HeteroLinearRegression' self.is_converged = False self.mode = consts.HETERO self.need_call_back_loss = True self.transfer_variable = HeteroLinRTransferVariable()
def __init__(self): super(BaseLinearRegression, self).__init__() self.model_param = LinearParam() # attribute: self.n_iter_ = 0 self.feature_shape = None self.gradient_operator = None self.initializer = Initializer() self.transfer_variable = None self.loss_history = [] self.is_converged = False self.header = None self.model_name = 'LinearRegression' self.model_param_name = 'LinearRegressionParam' self.model_meta_name = 'LinearRegressionMeta' self.role = '' self.mode = '' self.schema = {} self.cipher_operator = PaillierEncrypt()