Comments (3)
Can you post the code where you load the data, and then compute SVD?
Thanks
On Tuesday, April 1, 2014, xiaoerlyl [email protected] wrote:
I have tried some data set, but if I call the functions svd.similarity()
or svd.recommend(), the ouput of the console is :Traceback (most recent call last):
File "recsys_data.py", line 20, in
svd.compute(k=k, min_values=5, pre_normalize=None, mean_center=True,
post_normalize=True,savefile=None)
File
"/usr/local/lib/python2.7/dist-packages/python_recsys-0.2-py2.7.egg/recsys/algorithm/factorize.py",
line 244, in compute
super(SVD, self).compute(min_values)
File
"/usr/local/lib/python2.7/dist-packages/python_recsys-0.2-py2.7.egg/recsys/algorithm/baseclass.py",
line 126, in compute
raise ValueError('No data set. Matrix is empty!')
ValueError: No data set. Matrix is empty!I want to konw why ?
Reply to this email directly or view it on GitHubhttps://github.com//issues/6
.
from python-recsys.
According to the python-recsys v1.0 documentation Algorithms,i put movielens-1M ratiing.dat in /usr/local/python-recsys-master/recsys/data/movielens/,
,then i load data,!!!
but when i comput,ValueError: No data set. Matrix is empty!I want to konw why ?
from recsys.algorithm.factorize import SVD
filename = '/usr/local/python-recsys-master/recsys/data/movielens/ratings.dat'
svd = SVD()
svd.load_data(filename=filename, sep='::', format={'col':0, 'row':1, 'value':2, 'ids':int})
from recsys.datamodel.data import Data
from recsys.algorithm.factorize import SVD
filename = '/usr/local/python-recsys-master/recsys/data/movielens/ratings.dat'
data = Data()
format = {'col':0, 'row':1, 'value':2, 'ids': int}
data.load(filename, sep='::', format=format)
train, test = data.split_train_test(percent=80)
svd = SVD()
svd.set_data(train)
from recsys.utils.svdlibc import SVDLIBC
svdlibc = SVDLIBC('/usr/local/python-recsys-master/recsys/data/movielens/ratings.dat')
svdlibc.to_sparse_matrix(sep='::', format={'col':0, 'row':1, 'value':2, 'ids': int})
svdlibc.compute(k=100)
svd = svdlibc.export()
!!!
but when i comput,ValueError: No data set. Matrix is empty!I want to konw why ?
K=100
svd.compute(k=K, min_values=10, pre_normalize=None, mean_center=True, post_normalize=True,
savefile=None)
Traceback (most recent call last):
File "", line 3, in
File "recsys/algorithm/factorize.py", line 244, in compute
super(SVD, self).compute(min_values)
File "recsys/algorithm/baseclass.py", line 126, in compute
raise ValueError('No data set. Matrix is empty!')
ValueError: No data set. Matrix is empty!
from python-recsys.
Duplicated issue #8
from python-recsys.
Related Issues (20)
- SVD.compute() kernel fail on Windows HOT 4
- SVD.similar() user or item HOT 2
- Python 3 support HOT 1
- replace csc-pyparse with SciPy HOT 3
- Multiple Values HOT 1
- Can't install csc HOT 2
- How to increase the number of similarity/recommending item results HOT 2
- Getting error while laoding the data. HOT 2
- RuntimeWarning: invalid value encountered in divide ----Special characters in user_id HOT 4
- x Neighbours in svd.recommend HOT 1
- ImportError: No module named algorithm HOT 1
- IndexError: Error creating second index list HOT 2
- Can we load data using pandas dataframe? HOT 1
- AveragePrecision in recsys.evaluation.ranking HOT 1
- Storing results for all dataset in json file HOT 1
- Working with csv HOT 1
- how to install in python3? HOT 2
- Divisi2 what/where is it ? HOT 1
- Which version of Python is used HOT 2
- `recsys` package ownership on PyPI
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 python-recsys.