nystrom-ncut 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {nystrom_ncut-0.2.1/src/nystrom_ncut.egg-info → nystrom_ncut-0.2.2}/PKG-INFO +1 -1
  2. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/pyproject.toml +1 -1
  3. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/nystrom/nystrom_utils.py +1 -0
  4. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/transformer/axis_align.py +1 -0
  5. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/transformer/transformer_mixin.py +2 -0
  6. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2/src/nystrom_ncut.egg-info}/PKG-INFO +1 -1
  7. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/LICENSE +0 -0
  8. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/MANIFEST.in +0 -0
  9. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/README.md +0 -0
  10. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/requirements.txt +0 -0
  11. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/setup.cfg +0 -0
  12. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/__init__.py +0 -0
  13. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/__init__.py +0 -0
  14. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/common.py +0 -0
  15. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/distance_utils.py +0 -0
  16. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/nystrom/__init__.py +0 -0
  17. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/nystrom/distance_realization.py +0 -0
  18. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/nystrom/normalized_cut.py +0 -0
  19. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/sampling_utils.py +0 -0
  20. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/transformer/__init__.py +0 -0
  21. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut/visualize_utils.py +0 -0
  22. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut.egg-info/SOURCES.txt +0 -0
  23. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut.egg-info/dependency_links.txt +0 -0
  24. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/src/nystrom_ncut.egg-info/top_level.txt +0 -0
  25. {nystrom_ncut-0.2.1 → nystrom_ncut-0.2.2}/tests/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nystrom_ncut
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Normalized Cut and Nyström Approximation
5
5
  Author-email: Huzheng Yang <huze.yann@gmail.com>, Wentinn Liao <wentinn.liao@gmail.com>
6
6
  Project-URL: Documentation, https://github.com/JophiArcana/Nystrom-NCUT/
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nystrom_ncut"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  authors = [
9
9
  { name = "Huzheng Yang", email = "huze.yann@gmail.com" },
10
10
  { name = "Wentinn Liao", email = "wentinn.liao@gmail.com" },
@@ -93,6 +93,7 @@ class OnlineNystrom(TorchTransformerMixin):
93
93
 
94
94
  self.transform_matrix = (U / L)[:, :self.n_components] # [n x n_components]
95
95
  self.eigenvalues_ = L[:self.n_components] # [n_components]
96
+ self.is_fitted = True
96
97
  return U[:, :self.n_components] # [n x n_components]
97
98
 
98
99
  def update(self, features: torch.Tensor) -> torch.Tensor:
@@ -70,6 +70,7 @@ class AxisAlign(TorchTransformerMixin):
70
70
  raise ValueError(f"Invalid sort method {self.sort_method}.")
71
71
 
72
72
  self.R = self.R[torch.argsort(sort_metric, dim=0, descending=True)]
73
+ self.is_fitted = True
73
74
  return self
74
75
 
75
76
  def transform(self, X: torch.Tensor, normalize: bool = True, hard: bool = False) -> torch.Tensor:
@@ -36,6 +36,8 @@ class TorchTransformerMixin:
36
36
  >>> transformer.fit_transform(X)
37
37
  array([1, 1, 1])
38
38
  """
39
+ def __init__(self):
40
+ self.is_fitted: bool = False
39
41
 
40
42
  @abstractmethod
41
43
  def fit(self, X: torch.Tensor, **fit_kwargs: Any) -> "TorchTransformerMixin":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nystrom_ncut
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Normalized Cut and Nyström Approximation
5
5
  Author-email: Huzheng Yang <huze.yann@gmail.com>, Wentinn Liao <wentinn.liao@gmail.com>
6
6
  Project-URL: Documentation, https://github.com/JophiArcana/Nystrom-NCUT/
File without changes
File without changes
File without changes
File without changes
File without changes