CIDDS-001 Graph Creation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- jupyter-notebook, numpy, python, pytorch
- Lĩnh vực
- data, machine-learning
Hướng nghiên cứu
Open the Chapter 16 notebook and trace get_connections, ip_map construction, and the assignment to batch['host'].x. Compare host node IDs with the feature-row source and destination IPs; done means the host features and edge indices refer to the same unique hosts, with the notebook still running consistently.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I noticed a possible issue in Chapter 16’s host–flow bipartite graph construction.
The code creates host node indices from unique source and destination IPs:
ip_map = {ip: index for index, ip in enumerate(np.unique(np.append(src_ip, dst_ip)))}
host_to_flow, flow_to_host = get_connections(ip_map, src_ip, dst_ip)
So the host node IDs in edge_index correspond to unique IP addresses.
However, the host feature matrix is assigned directly from the subgraph dataframe rows:
batch['host'].x = torch.Tensor(subgraph[features_host].to_numpy()).float()
where:
features_host = [f'ipsrc_{i}' for i in range(1, 17)] + [f'ipdst_{i}' for i in range(1, 17)]
This means batch['host'].x has one row per flow record, and each row contains:
source_ip_features || destination_ip_features
But the edge indices treat host rows as unique-IP nodes.
As a result, the graph can be valid tensor-wise, because the number of unique IPs is usually less than or equal to the number of flow rows, but the feature semantics may be misaligned:
edge_index host IDs: unique IP indices
batch['host'].x rows: flow-row endpoint-pair features
For example, host.x[3] may not actually contain the features for the unique IP mapped to host node 3; it may instead contain the source/destination IP features from dataframe row 3.
Would it be more consistent to build batch['host'].x with one row per unique IP in ip_map, e.g., by extracting features for each unique host individually, rather than assigning subgraph[features_host] directly?
Thanks again for the helpful notebook.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 1.1k
- Fork
- 300
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#20 ·
-
HTTP Error 404: Not FoundĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#19 · 2 bình luận ·
-
Book Cover image misallignedĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#18 ·
-
HAN -Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#16 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python#15 ·
Tất cả issue của PacktPublishing/Hands-On-Graph-Neural-Networks-Using-Python
Issue tương tự
-
Add: Rai 3 BISĐang mởcheck:passed streams:add
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Edit: ElyssaTV.tn@HDĐang mởcheck:passed feeds:edit
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
elder-plinius/V3R1T4S#634 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
neuromuscular obsolete
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
monarch-initiative/mondo#10816 ·
Maintainer thường phản hồi trong vòng 2 ngày