def set_global_params(self, hmodel=None, lamA=None, lamB=None, theta=None, **kwargs):
    ''' Set global params to provided values

        Params
        --------
        lamA and lamB: the global variational parameters for the stochastic block matrix
        theta: the global variational parameters for node-community memberships
    '''
    if hmodel is not None:
        self.K = hmodel.obsModel.K
        self.comp = copy.deepcopy(hmodel.obsModel.comp)
        return
    self.K = theta.shape[1]
    self.comp = list()

    # Initialize each community to have an equal amount of edges
    for k in range(self.K):
        lamAp = self.obsPrior.lamA + lamA[k]
        lamBp = self.obsPrior.lamB - lamB[k]
        self.comp.append(BetaDistr(lamAp, lamBp))


  ######################################################### Evidence
  #########################################################
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/obsmodel/BernRelObsModel.py/BernRelObsModel.set_global_params/operator `+` -> `-`