Fix for spatial_neighbors breaks when transform='spectral'#1028
Fix for spatial_neighbors breaks when transform='spectral'#1028selmanozleyen merged 40 commits intomainfrom
Conversation
… describe what's happening
for more information, see https://pre-commit.ci
…quidpy into fix/spectral-transform
for more information, see https://pre-commit.ci
…quidpy into fix/spectral-transform
|
thanks for the feedback but |
|
@Intron7 should I merge this branch? |
flying-sheep
left a comment
There was a problem hiding this comment.
looks good to me, but @Intron7 should check if it works in his example.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1028 +/- ##
==========================================
+ Coverage 66.47% 66.60% +0.13%
==========================================
Files 45 45
Lines 7015 7017 +2
Branches 1184 1185 +1
==========================================
+ Hits 4663 4674 +11
+ Misses 1890 1880 -10
- Partials 462 463 +1
🚀 New features to boost your workflow:
|
| Length equals len(data). Entry-wise factors d_i * d_j * data[k] | ||
| """ | ||
|
|
||
| res = np.empty_like(data, dtype=np.float64) |
There was a problem hiding this comment.
because original function used np.float64. Didn't want to change old behaviour
There was a problem hiding this comment.
well I can't tell tbh because there was no tests for the spectral transform lol. We can just use float32 I guess. But the better way would be to ask ths users of spatial_neighbours
There was a problem hiding this comment.
@Intron7 ok the results seem similar when I checked them. I also added some numerical tests to ensure stability. Also when I recalled that this was just a normalization of weights in a graph so it should not be very sensitive to precision in theory.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
@timtreis could you merge this please? @Intron7 said he can't review it and @flying-sheep already had a look on this |
Fixes #1014