6216ab7e4df306fc4bf0763e6bfbda6c2f659f8c,grakel/kernels/kernel.py,kernel,fit_transform,#kernel#Any#,163
Before Change
km = self._calculate_kernel_matrix()
self._X_diag = np.diagonal(km).reshape(km.shape[0], 1)
if self._normalize:
self._X_diag = np.copy(self._X_diag)
km /= np.sqrt(np.multiply(self._X_diag.T, self._X_diag))
return km
def _calculate_kernel_matrix(self, Y=None):
Calculate the kernel matrix given a target_graph and a kernel.
After Change
self._X_diag = np.diagonal(km).reshape(km.shape[0], 1)
if self._normalize:
return np.divide(km,
np.sqrt(np.multiply(self._X_diag.T,
self._X_diag)))
else:
return km
def _calculate_kernel_matrix(self, Y=None):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: ysig/GraKeL
Commit Name: 6216ab7e4df306fc4bf0763e6bfbda6c2f659f8c
Time: 2018-01-24
Author: y.siglidis@gmail.com
File Name: grakel/kernels/kernel.py
Class Name: kernel
Method Name: fit_transform
Project Name: ysig/GraKeL
Commit Name: 6216ab7e4df306fc4bf0763e6bfbda6c2f659f8c
Time: 2018-01-24
Author: y.siglidis@gmail.com
File Name: grakel/kernels/graphlet_sampling.py
Class Name: graphlet_sampling
Method Name: fit_transform
Project Name: ysig/GraKeL
Commit Name: 6216ab7e4df306fc4bf0763e6bfbda6c2f659f8c
Time: 2018-01-24
Author: y.siglidis@gmail.com
File Name: grakel/kernels/shortest_path.py
Class Name: shortest_path
Method Name: fit_transform