Comments (13)
Can you:
- Check where it's looking for the data (the
zip_path
above)? - Check that the file at that path is a valid zip file?
- Try deleting that file and its directory and run the command again.
My first suspicion is that there might have been a problem with the download and you have a partially completed file cached in the data directory.
from lightfm.
Any luck?
from lightfm.
?
from lightfm.
You need to update zip_path in lightfm/datasets/movielens.py
from lightfm.
Are you saying that the code doesn't work? Could you post the trace for the error you encountered?
from lightfm.
I was stuck in a similar issue, which I posted here.
All I had to do was replace this:
zip_path = _common.get_data(data_home,
('https://github.com/maciejkula/'
'lightfm_datasets/releases/'
'download/v0.1.0/movielens.zip'),
'movielens100k',
'movielens.zip',
download_if_missing)
with
zip_path = _common.get_data(data_home,
('https://github.com/maciejkula/
lightfm_datasets/releases/
download/v0.1.0/movielens.zip'),
'movielens100k',
'movielens.zip',
download_if_missing)
from lightfm.
Can you point out the difference between the two? I don't quite see it!
from lightfm.
The 4 extra apostrophes(') in the URL were creating problem for me.
from lightfm.
Are you use? Python uses what's called implicit string concatenation; these quotes are simply dropped in the final string. Your changed code is syntactically identical.
from lightfm.
It didn't work for me, I am using Python3.6
from lightfm.
Thanks @anshulg8, for pointing url. While my problem not solved by the help of above solution. What I tried written below.
- Copy path and download zip file
- Replace below code
data = fetch_movielens(min_rating=4.0)
with
def _read_raw_data(path):
with zipfile.ZipFile(path) as datafile:
return (datafile.read('ml-100k/ua.base').decode().split('\n'),
datafile.read('ml-100k/ua.test').decode().split('\n'),
datafile.read('ml-100k/u.item').decode(errors='ignore').split('\n'),
datafile.read('ml-100k/u.genre').decode(errors='ignore').split('\n'))
data=_read_raw_data('movielens.zip')
I know this is not right way but I tried it and it works perfect.
from lightfm.
This is not a bug in the code. Your download was corrupted for some reason. Delete the downloaded file and the code should work again. The advice above (wrt changing paths) is incorrect.
from lightfm.
This problem is solved in the newest release, 1.14.
from lightfm.
Related Issues (20)
- How to reproduce the evaluation score in the paper.
- Recommender System with RFM ratings to put into Interaction matrix HOT 9
- Feature Request: Support for Freezing Item Embeddings while Updating User Embeddings During Training
- Incorporating item and user biases in LightFM embeddings for accurate recommendations in Vespa HOT 1
- Item and User Normalization
- Is there a way to save Dataset()? HOT 1
- How to get clusters of users from trained lightfm model on implicit rating model?
- Evaluate AUC on a subset of items
- Auc evalutation return always nan
- Can't install on Python 3.10.6 in Ubuntu HOT 1
- Implementing Incremental Training and Feedback loop using Lightfm
- LightFM kills Jupyter Kernel when fitting model
- Does calculating precision@k for one user makes sense? HOT 1
- Creating recommendations for single users without leveraging user identity features
- Can't install on Python 3.12 HOT 6
- Can't seem to install with with poetry HOT 3
- ModuleNotFoundError: No module named 'lightfm._lightfm_fast_no_openmp'
- Recommendation model with text embedding as item feature HOT 1
- Same precision@k with different item embeddings?
- Recommending documents to users based on keywords in the absence of interactions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightfm.