GithubHelp home page GithubHelp logo

Comments (3)

ocelma avatar ocelma commented on May 26, 2024

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.

cycchao avatar cycchao commented on May 26, 2024

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.

ocelma avatar ocelma commented on May 26, 2024

Duplicated issue #8

from python-recsys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.