Scale transform changes aggregate results
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu với ví dụ Python được cung cấp và xem lại các tutorial đề cập đến hệ tọa độ, phép biến đổi và phép tổng hợp. Xác nhận cách Scale thay đổi các kết quả tổng hợp đối với sum và mean, sau đó cập nhật tutorial liên quan để tác động của hệ tọa độ đích được thể hiện rõ ràng và kiểm tra rằng ví dụ vẫn dễ hiểu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hey everyone,
as mentioned on Zulip I am using macsima data, where the macsima reader by default adds the Scale transformation to the coordinate system. I noticed that when I remove this my aggregation results are slightly different. This is most prominent for small signals, for larger signals it is not so pronounced. My original use case was for the mean intensity. For sum its very obvious that the absolute values change due to the transform, but the ratios stay similar.
Of course I understand that it makes sense to apply the transform before doing the aggregation, since they are intended for example for aligning my labels with the image. Still it was a bit unintuitive for me that this happens as a new user. Maybe this could be highlighted also a bit more in the tutorials. As requested below is a small example.
import spatialdata as sd
from spatialdata.datasets import blobs
from spatialdata.transformations import set_transformation, Scale
sdata = blobs()
# set scale transformation to new coordinate system. global coord system has Identity transform
scale_transform = Scale([0.1, 0.1], ("x", "y"))
set_transformation(sdata["blobs_image"], transformation=scale_transform, to_coordinate_system="scaled")
set_transformation(sdata["blobs_labels"], transformation=scale_transform, to_coordinate_system="scaled")
global_sum = sdata.aggregate(values="blobs_image", by="blobs_labels", target_coordinate_system="global")
print(global_sum["table"].X[:1])
#<Compressed Sparse Row sparse matrix of dtype 'float64'
# with 3 stored elements and shape (1, 3)>
# Coords Values
# (0, 0) 1309.3692551660652
# (0, 1) 1587.8641823936478
# (0, 2) 3125.1190857645483
scaled_sum = sdata.aggregate(values="blobs_image", by="blobs_labels", target_coordinate_system="scaled")
print(scaled_sum["table"].X[:1])
#<Compressed Sparse Row sparse matrix of dtype 'float64'
# with 3 stored elements and shape (1, 3)>
# Coords Values
# (0, 0) 12.758250581405642
# (0, 1) 15.427204091295
# (0, 2) 31.23271691509622
global_mean = sdata.aggregate(values="blobs_image", by="blobs_labels", agg_func="mean", target_coordinate_system="global")
print(global_mean["table"].X[:1])
#<Compressed Sparse Row sparse matrix of dtype 'float64'
# with 3 stored elements and shape (1, 3)>
# Coords Values
# (0, 0) 0.08696083251418378
# (0, 1) 0.10545687603066001
# (0, 2) 0.20755257260839133
scaled_mean = sdata.aggregate(values="blobs_image", by="blobs_labels", agg_func="mean", target_coordinate_system="scaled")
print(scaled_mean["table"].X[:1])
#<Compressed Sparse Row sparse matrix of dtype 'float64'
# with 3 stored elements and shape (1, 3)>
# Coords Values
# (0, 0) 0.08449172570467313
# (0, 1) 0.10216691451188742
# (0, 2) 0.2068391848681869
- Ngôn ngữ chính
- Python
- Star
- 399
- Fork
- 100
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của scverse/spatialdata
-
SpatialData 0.8.0 permits Zarr versions that do not provide ArrayNotFoundErrorCó thể đã có người làm @Darlokt đã nhận 21 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
scverse/spatialdata#1256 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug 🚨 element: labels 🏷️ method: aggregation 🔢 needs: triage priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
scverse/spatialdata#1249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug 🚨 element: images 🌌 element: labels 🏷️ needs: triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
scverse/spatialdata#1239 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug 🚨 element: shapes ▲ models needs: triage priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
scverse/spatialdata#1234 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug 🚨 element: labels 🏷️ method: aggregation 🔢 needs: triage priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
scverse/spatialdata#1230 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của scverse/spatialdata
Issue tương tự
-
fix(accounts): Balance Sheet and Profit and Loss crash on PostgreSQL due to MySQL force_indexĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Discord webhook notifications fail with HTTP 403 (Cloudflare blocks default urllib User-Agent)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
tharje/spooler-v2#20 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bump version of azure-servicebusCó thể đã có người làm @joostlek đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
home-assistant/core#186275 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100