def meanfieldupdate_kappa_v(self, data=[], minibatchfrac=1.0, stepsize=1.0):
        """
        Update the variational weight distributions
        :return:
        """
        exp_ss = sum([d.compute_exp_weight_ss() for d in data])

        # kappa' = kappa + \sum_t \sum_b z[t,k,k',b]
        kappa0_hat = self.kappa_0 + exp_ss[0] / minibatchfrac
        kappa1_hat = self.network.kappa + exp_ss[0] / minibatchfrac
        self.mf_kappa_0 = (1.0 - stepsize) * self.mf_kappa_0 + stepsize * kappa0_hat
        self.mf_kappa_1 = (1.0 - stepsize) * self.mf_kappa_1 + stepsize * kappa1_hat

        # v_0'[k,k'] = self.nu_0 + N[k]
        v0_hat = self.nu_0 * np.ones((self.K, self.K)) + exp_ss[1] / minibatchfrac
        self.mf_v_0 = (1.0 - stepsize) * self.mf_v_0 + stepsize * v0_hat

        # v_1'[k,k'] = E[v[k,k']] + N[k]
        v1_hat = self.network.expected_v() + exp_ss[1] / minibatchfrac
        self.mf_v_1 = (1.0 - stepsize) * self.mf_v_1 + stepsize * v1_hat
dataset/ETHPy150Open slinderman/pyhawkes/pyhawkes/internals/weights.py/GammaMixtureWeights.meanfieldupdate_kappa_v/original