Skip to content

Commit

Permalink
Fixes failing import statements due to kernels restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtsap committed Mar 7, 2023
1 parent 73b258c commit 1080c15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(
if kernel_matrix is not None:
self.kernel_matrix = kernel_matrix
elif data is not None and kernel is not None:
kernel.calculate_kernel_matrix(points=data)
kernel.calculate_kernel_matrix(x=data, s=data)
self.kernel_matrix = kernel.kernel_matrix
else:
raise ValueError("Either `kernel_matrix` or both `data` and `kernel` must be provided")
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/dimension_reduction/test_dmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_dmaps_swiss_roll():
Y0 = 1. / 6 * (phi + sigma * xi) * np.cos(phi)

swiss_roll = np.array([X0, Y0, Z0]).transpose()
dmaps = DiffusionMaps(data=swiss_roll, kernel=GaussianKernel(epsilon=0.5),
dmaps = DiffusionMaps(data=swiss_roll, kernel=GaussianKernel(kernel_parameter=0.5),
alpha=0.5, n_eigenvectors=3, is_sparse=True, n_neighbors=100)

evals = dmaps.eigenvalues
Expand Down Expand Up @@ -54,7 +54,7 @@ def test_dmaps_circular():
X = np.array([x, y, z]).transpose()

dmaps = DiffusionMaps(data=X, alpha=1, n_eigenvectors=3,
kernel=GaussianKernel(epsilon=0.3))
kernel=GaussianKernel(kernel_parameter=0.3))

evals = dmaps.eigenvalues
assert np.round(evals[0], 5) == 1.0
Expand Down

0 comments on commit 1080c15

Please sign in to comment.