Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in MovieLens indices #190

Closed
CarloLucibello opened this issue Nov 25, 2022 · 1 comment · Fixed by #193
Closed

bug in MovieLens indices #190

CarloLucibello opened this issue Nov 25, 2022 · 1 comment · Fixed by #193

Comments

@CarloLucibello
Copy link
Member

Something is odd with the MovieLens dataset:

julia> d = MovieLens("100k")[1]
Heterogeneous Graph:
  node_types    =>    2-element Vector{String}
  edge_types    =>    1-element Vector{Tuple{String, String, String}}
  num_nodes     =>    Dict{String, Int64} with 2 entries
  num_edges     =>    Dict{Tuple{String, String, String}, Int64} with 1 entry
  edge_indices  =>    Dict{Tuple{String, String, String}, Tuple{Vector{Int64}, Vector{Int64}}} with 1 entry
  node_data     =>    Dict{String, Dict} with 2 entries
  edge_data     =>    Dict{Tuple{String, String, String}, Dict} with 1 entry

julia> d.num_nodes
Dict{String, Int64} with 2 entries:
  "movie" => 1682
  "user"  => 943

julia> d.num_edges   # THIS SHOULD BE 100k
Dict{Tuple{String, String, String}, Int64} with 1 entry:
  ("user", "rating", "movie") => 200000

julia> d.edge_indices[("user", "rating", "movie")][1] |> maximum # THIS SHOULD BE 943
1682

I suspect reverse edges are added, which is wrong since the relation goes in one direction. Is this the case @Dsantra92?

@Dsantra92
Copy link
Collaborator

Now that I look at it, the rating edge should be uni-directional. I will open a pr for this shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants