diff options
Diffstat (limited to 'src/cython/sktda/kernel_methods.py')
-rw-r--r-- | src/cython/sktda/kernel_methods.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cython/sktda/kernel_methods.py b/src/cython/sktda/kernel_methods.py index 6e3f6d5e..d90bf164 100644 --- a/src/cython/sktda/kernel_methods.py +++ b/src/cython/sktda/kernel_methods.py @@ -101,7 +101,7 @@ class PersistenceWeightedGaussianKernel(BaseEstimator, TransformerMixin): W = np.matmul(self.ws_[i][:,np.newaxis], self.ws_[j][np.newaxis,:]) E = (1./(np.sqrt(2*np.pi)*self.bandwidth)) * np.exp(-np.square(pairwise_distances(self.diagrams_[i], self.diagrams_[j]))/(2*np.square(self.bandwidth))) Xfit[i,j] = np.sum(np.multiply(W, E)) - Xfit[j,i] = X[i,j] + Xfit[j,i] = Xfit[i,j] else: ws = [ np.array([self.weight(Xp[i][j,:]) for j in range(Xp[i].shape[0])]) for i in range(len(Xp)) ] if self.kernel_approx is not None: |