From 1080c1543de1b2c2143ba7f6e23a22d045bcf222 Mon Sep 17 00:00:00 2001 From: Dimitris Tsapetis Date: Tue, 7 Mar 2023 10:07:08 -0500 Subject: [PATCH] Fixes failing import statements due to kernels restructuring --- src/UQpy/dimension_reduction/diffusion_maps/DiffusionMaps.py | 2 +- tests/unit_tests/dimension_reduction/test_dmaps.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UQpy/dimension_reduction/diffusion_maps/DiffusionMaps.py b/src/UQpy/dimension_reduction/diffusion_maps/DiffusionMaps.py index c03c2df3a..38762ed31 100644 --- a/src/UQpy/dimension_reduction/diffusion_maps/DiffusionMaps.py +++ b/src/UQpy/dimension_reduction/diffusion_maps/DiffusionMaps.py @@ -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") diff --git a/tests/unit_tests/dimension_reduction/test_dmaps.py b/tests/unit_tests/dimension_reduction/test_dmaps.py index edc2e6bb9..a677d4b40 100644 --- a/tests/unit_tests/dimension_reduction/test_dmaps.py +++ b/tests/unit_tests/dimension_reduction/test_dmaps.py @@ -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 @@ -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