nystrom-ncut 0.0.11__py3-none-any.whl → 0.0.12__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- nystrom_ncut/nystrom/nystrom.py +3 -1
- nystrom_ncut/visualize_utils.py +2 -2
- {nystrom_ncut-0.0.11.dist-info → nystrom_ncut-0.0.12.dist-info}/METADATA +1 -1
- {nystrom_ncut-0.0.11.dist-info → nystrom_ncut-0.0.12.dist-info}/RECORD +7 -7
- {nystrom_ncut-0.0.11.dist-info → nystrom_ncut-0.0.12.dist-info}/LICENSE +0 -0
- {nystrom_ncut-0.0.11.dist-info → nystrom_ncut-0.0.12.dist-info}/WHEEL +0 -0
- {nystrom_ncut-0.0.11.dist-info → nystrom_ncut-0.0.12.dist-info}/top_level.txt +0 -0
nystrom_ncut/nystrom/nystrom.py
CHANGED
@@ -276,5 +276,7 @@ def solve_eig(
|
|
276
276
|
eigen_vector = eigen_vector[:, indices]
|
277
277
|
|
278
278
|
# correct the random rotation (flipping sign) of eigenvectors
|
279
|
-
|
279
|
+
sign = torch.sum(eigen_vector, dim=0).sign()
|
280
|
+
sign[sign == 0] = 1.0
|
281
|
+
eigen_vector = eigen_vector * sign
|
280
282
|
return eigen_vector, eigen_value
|
nystrom_ncut/visualize_utils.py
CHANGED
@@ -195,8 +195,8 @@ def rgb_from_cosine_tsne_3d(
|
|
195
195
|
)
|
196
196
|
perplexity = num_sample // 2
|
197
197
|
|
198
|
-
def cosine_to_rbf(X: torch.Tensor) -> torch.Tensor:
|
199
|
-
dr = DistanceRealization(n_components=3, num_sample=20000, distance="cosine", eig_solver="
|
198
|
+
def cosine_to_rbf(X: torch.Tensor) -> torch.Tensor:
|
199
|
+
dr = DistanceRealization(n_components=3, num_sample=20000, distance="cosine", eig_solver="svd_lowrank")
|
200
200
|
return dr.fit_transform(X)
|
201
201
|
|
202
202
|
def rgb_from_cosine(X_3d: torch.Tensor, q: float) -> torch.Tensor:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: nystrom_ncut
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.12
|
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/
|
@@ -2,13 +2,13 @@ __init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
nystrom_ncut/__init__.py,sha256=JKfF6atok5T9V692RhlhgeRO5a2cN-bfAVa9irmTLfs,463
|
3
3
|
nystrom_ncut/common.py,sha256=RMPQvg9R2s7V-q7zAStN9YCZt7gpc5Ut-KSKtvELBQ4,1934
|
4
4
|
nystrom_ncut/propagation_utils.py,sha256=WeWKxRBm01ITILMgjsit5_fCe9oW1kJOPmAjjcmliMo,10340
|
5
|
-
nystrom_ncut/visualize_utils.py,sha256=
|
5
|
+
nystrom_ncut/visualize_utils.py,sha256=JkDyWML6k7k6S2Z7xnpbUvMWssEXcXqXu7gBy8wnids,16809
|
6
6
|
nystrom_ncut/nystrom/__init__.py,sha256=4EpxD3Cmc8Fif4vo8DG-6FpTfCnNanD5zCZxK3WrMwQ,121
|
7
7
|
nystrom_ncut/nystrom/distance_realization.py,sha256=MWSdfPfUnr7BdiKFkogjQvcGagvj7OzLQklnVp0fPx8,6000
|
8
8
|
nystrom_ncut/nystrom/normalized_cut.py,sha256=_U3zrbe6V-5TQ4uWmqckxs2JTIhygQlnRDTFBI1ghD4,7194
|
9
|
-
nystrom_ncut/nystrom/nystrom.py,sha256=
|
10
|
-
nystrom_ncut-0.0.
|
11
|
-
nystrom_ncut-0.0.
|
12
|
-
nystrom_ncut-0.0.
|
13
|
-
nystrom_ncut-0.0.
|
14
|
-
nystrom_ncut-0.0.
|
9
|
+
nystrom_ncut/nystrom/nystrom.py,sha256=nL-zxbEE_ygJEZEPmeNrUpVeffvxdrsTcbxFanFuXQY,12613
|
10
|
+
nystrom_ncut-0.0.12.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
11
|
+
nystrom_ncut-0.0.12.dist-info/METADATA,sha256=pM-WT6Ly-IKYJ3DV2d-oOyc--K4VOyArB0sT5gHfHL4,6059
|
12
|
+
nystrom_ncut-0.0.12.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
13
|
+
nystrom_ncut-0.0.12.dist-info/top_level.txt,sha256=gM8IWWHYysIRTCvCTcdS4RShOyl9pxpylgSwPUZR2XM,22
|
14
|
+
nystrom_ncut-0.0.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|