Skip to content

Commit

Permalink
Add comments to _bandwidth_inv_ and _normkernels_
Browse files Browse the repository at this point in the history
  • Loading branch information
GardevoirX committed Oct 7, 2024
1 parent a4aea47 commit 23043e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/neighbors/sparse-kde.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def rij(period: np.ndarray, xi: np.ndarray, xj: np.ndarray) -> np.ndarray:
print(f"RMSE_kde = {RMSE_kde:.2e}")

# %%
# We can see that the fitted model can perfectly capture the original one. Even though we
# have not specified the number of the Gaussians, it can still perform well. This
# We can see that the fitted model can perfectly capture the original one. Even though
# we have not specified the number of the Gaussians, it can still perform well. This
# allows us to fit distributions of the data automatically at a comparable quality
# within a much shorter time than scipy.
1 change: 1 addition & 0 deletions src/skmatter/neighbors/_sparsekde.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def fit(self, X, y=None, sample_weight=None):
self : object
Returns the instance itself.
"""
# Initialize/reset the cached properties, _bandwidth_inv and _normkernels
self._bandwidth_inv_ = None
self._normkernels_ = None
self._check_dimension(X)
Expand Down

0 comments on commit 23043e2

Please sign in to comment.