Guidance on how to best implement labeled graphs in this library
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng việc xem xét hàm loadgraphml hiện có và cấu trúc LabeledGraph được đề xuất. So sánh nó với GNNGraph của GNNGraphs.jl và cuộc thảo luận được liên kết của Graphs.jl về các chỉ mục cạnh. Bước tiếp theo là thống nhất API gắn nhãn với các maintainer trước khi chuẩn bị pull request cho một bộ phân tích GXL.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
As part of a project I am working, I needed to read in graph files in the GXL graph format, including their label data.
As this format is not yet supported in this library, I would like to contribute my parser (which I wrote by modifying the existing loadgraphml function). The issue is that, as far as I can tell, there is no existing concept on how to implement graph labels in this library, or even in Graphs.jl.
There is an implementation of a labeled graph in GNNGraphs.jl (the GNNGraph), but I don't think this is the correct implementation to use in this library for two reasons:
- As I understand the code they rely on edge indices for the edge labels, which I believe is not officially supported by Graphs.jl (see this issue)
- It introduces an external dependency that is not really connected to this project
Instead, I have used the following struct to implement labeled graphs, the usage of Dicts inspired by the DataStore in GNNGraphs.jl:
GraphLabels = Dict{String, Any}
struct LabeledGraph
g::AbstractGraph
nlabels::Vector{GraphLabels}
elabels::Matrix{Union{GraphLabels, Missing}}
end
I have used a matrix for the edgelabels to avoid having to index the edges. While it would clearly be more storage efficient to use a vector, I believe having to maintain an edge index list would be even more resource intensive than simply using a matrix. Additionally, one can easily extend this to use sparse matrices instead if the graph in question is sparse and large, and it neatly supports both directed and undirected graphs.
Since there is no precedent for this kind of structure, I propose that my parser for this library be split into two versions. One, which simply returns the underlying graph object, and thus conforms to the existing return structure. The other returns a LabeledGraph object as described above. In my opinion this is the best compromise between not parsing the extra label data at all and introducing a new graph object for everyone immediately.
The purpose of this issue is then to ask for opinions on this proposed implementation before I clean up my code for a pull request. Is this acceptable, or are there things I should do differently?
- Ngôn ngữ chính
- Julia
- Star
- 62
- Fork
- 30
- 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 JuliaGraphs/GraphIO.jl
-
Loading weighted graphsĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
JuliaGraphs/GraphIO.jl#64 · 1 reaction ·
-
Supporting XGMMLĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
JuliaGraphs/GraphIO.jl#62 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
JuliaGraphs/GraphIO.jl#61 · 1 bình luận · 5 reaction ·
-
Support NestedGraphs.jl ?Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
JuliaGraphs/GraphIO.jl#60 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
JuliaGraphs/GraphIO.jl#57 · 1 bình luận · 2 reaction ·
Tất cả issue của JuliaGraphs/GraphIO.jl
Issue tương tự
-
documentation invalid
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
JuliaPhysics/BeamletOptics.jl#190 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
mul! with a Symmetric or Hermitian factor throws for a matrix view whose columns are not contiguousĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
JuliaLang/LinearAlgebra.jl#1829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`EnsembleSummary` `ci_type = :SEM` ribbon is `sqrt(N)` too wide for scalar statesCó thể đã có người làm @isaacsas đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
SciML/SciMLBase.jl#1654 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MagneticResonanceImaging/MRIReco.jl#320 ·
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 78/100
rfordatascience/tidytuesday#1098 ·