def estimation(self, y1, y2): """ Estimate Sharma-Mittal divergence. Parameters ---------- y1 : (number of samples1, dimension)-ndarray One row of y1 corresponds to one sample. y2 : (number of samples2, dimension)-ndarray One row of y2 corresponds to one sample. Returns ------- d : float Estimated Sharma-Mittal divergence. References ---------- Barnabas Poczos, Zoltan Szabo, Jeff Schneider. Nonparametric divergence estimators for Independent Subspace Analysis. European Signal Processing Conference (EUSIPCO), pages 1849-1853, 2011. Barnabas Poczos, Jeff Schneider. On the Estimation of alpha-Divergences. International conference on Artificial Intelligence and Statistics (AISTATS), pages 609-617, 2011. Marco Massi. A step beyond Tsallis and Renyi entropies. Physics Letters A, 338:217-224, 2005. (Sharma-Mittal divergence definition) Examples -------- d = co.estimation(y1,y2) """ # verification: self.verification_equal_d_subspaces(y1, y2) d_temp1 = estimate_d_temp1(y1, y2, self) d = (d_temp1**((1 - self.beta) / (1 - self.alpha)) - 1) /\ (self.beta - 1) return d
def estimation(self, y1, y2): """ Estimate Renyi divergence. Parameters ---------- y1 : (number of samples1, dimension)-ndarray One row of y1 corresponds to one sample. y2 : (number of samples2, dimension)-ndarray One row of y2 corresponds to one sample. Returns ------- d : float Estimated Renyi divergence. References ---------- Barnabas Poczos, Zoltan Szabo, Jeff Schneider. Nonparametric divergence estimators for Independent Subspace Analysis. European Signal Processing Conference (EUSIPCO), pages 1849-1853, 2011. Barnabas Poczos, Jeff Schneider. On the Estimation of alpha-Divergences. International conference on Artificial Intelligence and Statistics (AISTATS), pages 609-617, 2011. Barnabas Poczos, Liang Xiong, Jeff Schneider. Nonparametric Divergence: Estimation with Applications to Machine Learning on Distributions. Uncertainty in Artificial Intelligence (UAI), 2011. Examples -------- d = co.estimation(y1,y2) """ # verification: self.verification_equal_d_subspaces(y1, y2) d_temp1 = estimate_d_temp1(y1, y2, self) d = log(d_temp1) / (self.alpha - 1) return d