barclayii / dgl-itemrec Goto Github PK
View Code? Open in Web Editor NEWItem embedding & item-based recsys with DGL
Item embedding & item-based recsys with DGL
In your main_knn file,
when I'm running the code below, I get an error. Can you share how to fix it? Thank you.
HG = dgl.heterograph({
('user', 'um', 'movie'): (ratings_train['user_idx'], ratings_train['movie_idx']),
('movie', 'mu', 'user'): (ratings_train['movie_idx'], ratings_train['user_idx'])})
error:
Traceback (most recent call last):
File "", line 3, in
('movie', 'mu', 'user'): (ratings_train['movie_idx'], ratings_train['user_idx'])})
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/convert.py", line 309, in heterograph
u, v, urange, vrange = utils.graphdata2tensors(data, idtype, bipartite=is_bipartite)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/utils/data.py", line 147, in graphdata2tensors
data = F.tensor(data[0]), F.tensor(data[1])
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/dgl/backend/pytorch/tensor.py", line 40, in tensor
return th.as_tensor(data, dtype=dtype)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/pandas/core/series.py", line 868, in getitem
result = self.index.get_value(self, key)
File "/home/hojun/anaconda3/envs/ai/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 4375, in get_value
tz=getattr(series.dtype, 'tz', None))
File "pandas/_libs/index.pyx", line 81, in pandas._libs.index.IndexEngine.get_value
File "pandas/_libs/index.pyx", line 89, in pandas._libs.index.IndexEngine.get_value
File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 987, in pandas._libs.hashtable.Int64HashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 993, in pandas._libs.hashtable.Int64HashTable.get_item
KeyError: 31
Hi I'm reproducing your model what is very useful things at my field.
and then happen 2 errors here , I can't even take results for evaluation stage.
I wonder how resolve these errors that is occurs at movie-lens.py
nlp = stanford isn't work now to me , stanford ->stanza ( change the library then work well )
at last session , build the interacted_movies data
the error message as follows gotten to me
[pandas couldn't support one function espeically, Passing list-likes to .loc or [] with any missing labels is no longer supported. The following labels were missing: Int64Index([550972], dtype='int64'). See https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike"]
thank you !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.