def svgd_kernel_inducedPoints(self, h=(- 1), uStat=True, regCoeff=0.1, adver=False, adverMaxIter=5, stepsize=0.001, alpha=0.9):
    (n, d) = self.theta.shape
    m = self.y.shape[0]
    if (adver == True):
        fudge_factor = 1e-06
        for adverIter in range(0, adverMaxIter):
            grad_y = self.svgd_kernel_grady(h=h, uStat=uStat, regCoeff=regCoeff)
            [update_y, hist_grad] = self.get_adamUpdate(adverIter, grad_y, self.y_historical_grad, stepsize=stepsize, alpha=alpha)
            self.y = (self.y + update_y)
            self.y_historical_grad = hist_grad
            grad_h = self.svgd_kernel_gradh(h=h, uStat=uStat)
            [update_h, hist_grad] = self.get_adamUpdate(adverIter, grad_h, self.h_historical_grad, stepsize=stepsize, alpha=alpha)
            h = (h + update_h)
            self.h_historical_grad = hist_grad
    pairwise_dists = (cdist(self.theta, self.y) ** 2)
    Kxy = np.exp((((- pairwise_dists) / (h ** 2)) / 2))
    innerTerm_1 = np.matmul(Kxy.T, (self.Sqx - (self.theta / (h ** 2))))
    sumkxy = np.sum(Kxy, axis=0)
    innerTerm_2 = np.multiply(np.tile(np.array([sumkxy]).T, (1, d)), (self.y / (h ** 2)))
    innerTerm = ((innerTerm_1 + innerTerm_2) / n)
    gradTheta = (np.matmul(Kxy, innerTerm) / m)
    return gradTheta
def svgd_kernel_inducedPoints(self, h=(- 1), uStat=True, regCoeff=0.1, adver=False, adverMaxIter=5, stepsize=0.001, alpha=0.9):
    (n, d) = self.theta.shape
    m = self.y.shape[0]
    if (adver == True):
        fudge_factor = 1e-06
        for adverIter in range(0, adverMaxIter):
            grad_y = self.svgd_kernel_grady(h=h, uStat=uStat, regCoeff=regCoeff)
            [update_y, hist_grad] = self.get_adamUpdate(adverIter, grad_y, self.y_historical_grad, stepsize=stepsize, alpha=alpha)
            self.y = (self.y + update_y)
            self.y_historical_grad = hist_grad
            grad_h = self.svgd_kernel_gradh(h=h, uStat=uStat)
            [update_h, hist_grad] = self.get_adamUpdate(adverIter, grad_h, self.h_historical_grad, stepsize=stepsize, alpha=alpha)
            h = (h + update_h)
            self.h_historical_grad = hist_grad
    pairwise_dists = (cdist(self.theta, self.y) ** 2)
    Kxy = np.exp((((- pairwise_dists) / (h ** 2)) / 2))
    innerTerm_1 = np.matmul(Kxy.T, (self.Sqx - (self.theta / (h ** 2))))
    sumkxy = np.sum(Kxy, axis=0)
    innerTerm_2 = np.multiply(np.tile(np.array([sumkxy]).T, (1, d)), (self.y / (h ** 2)))
    innerTerm = ((innerTerm_1 + innerTerm_2) / n)
    gradTheta = (np.matmul(Kxy, innerTerm) / m)
    return gradTheta