

def set_global_params(self, hmodel=None, lamA=None, lamB=None, theta=None, **kwargs):
    ' Set global params to provided values\n\n        Params\n        --------\n        lamA and lamB: the global variational parameters for the stochastic block matrix\n        theta: the global variational parameters for node-community memberships\n    '
    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()
    for k in range(self.K):
        lamAp = (self.obsPrior.lamA + lamA[k])
        lamBp = (self.obsPrior.lamB + lamB[k])
        self.comp.append(BetaDistr(lamAp, lamBp))

dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/obsmodel/BernRelObsModel.py BernRelObsModel.set_global_params/original