ian09 / cf-nade Goto Github PK
View Code? Open in Web Editor NEWA implementation of CF-NADE. Yin Zheng, et. al. "A Neural Autoregressive Approach to Collaborative Filtering", accepted by ICML 2016.
A implementation of CF-NADE. Yin Zheng, et. al. "A Neural Autoregressive Approach to Collaborative Filtering", accepted by ICML 2016.
Hi sir, please give me equation to calculate MAE in Testing. i need it so much. Please tell me as soon as possible. Thanks a lot
When I use the code to generate hdf5 dataset, an IOError occurred.
This is the Traceback :
Traceback (most recent call last):
File "movielens_1m_shuffle_itermbased.py", line 192, in <module>
2341)
File "movielens_1m_shuffle_itermbased.py", line 183, in main
write_movie_data(ratings, data_path, output, seed)
File "movielens_1m_shuffle_itermbased.py", line 111, in write_movie_data
f = h5py.File(os.path.join(output, 'movielens-1m.hdf5'), 'w')
File "/usr/local/lib/python2.7/dist-packages/h5py/_hl/files.py", line 272, in __init__
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/usr/local/lib/python2.7/dist-packages/h5py/_hl/files.py", line 98, in make_fid
fid = h5f.create(name, h5f.ACC_TRUNC, fapl=fapl, fcpl=fcpl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2684)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2642)
File "h5py/h5f.pyx", line 96, in h5py.h5f.create (/tmp/pip-4rPeHA-build/h5py/h5f.c:2097)
IOError: Unable to create file (Unable to open file: name = '/home/path/nade/movielens1m-shuffle-itembased-1/movielens-1m.hdf5', errno = 2, error message = 'no such file or directory', flags = 13, o_flags = 242)
But when I use the same path and code in python, it can work.
>>> import h5py
>>> h5py.File('/home/path/nade/movielens1m-shuffle-itembased-1/movielens-1m.hdf5', 'w')
<HDF5 file "movielens-1m.hdf5" (mode r+)>
How can I fix it?
hi, can you provide your splits of movielens1m and movielens10m? thanks very much!!!@Ian09
These are error message:
MovieLens1M=/home/xlf/ml_datasets/MovieLens1M-shuffle-itembased-1 python learner_masked_ordinalcost_directly_itembased_newsoftmax_timing.py 512 10 60 0.001 0.1 0.001 1e-8 500 tanh 0 0.02 Adam 0 1 0.995 /home/xlf/CF-NADE
Epoch 0
Traceback (most recent call last):
File "learner_masked_ordinalcost_directly_itembased_newsoftmax_timing.py", line 729, in
cost_value = f_get_grad(inp_r, inp_m, out_r, out_m)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 871, in call
storage_map=getattr(self.fn, 'storage_map', None))
File "/usr/local/lib/python2.7/dist-packages/theano/gof/link.py", line 314, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py", line 859, in call
outputs = self.fn()
MemoryError:
Apply node that caused the error: CumsumOp{2}(rating_cost_sf_apply_output)
Toposort index: 112
Inputs types: [TensorType(float64, 3D)]
Inputs shapes: [(512, 6040, 5)]
Inputs strides: [(241600, 40, 8)]
Inputs values: ['not shown']
Outputs clients: [[Subtensor{::, ::, ::int64}(CumsumOp{2}.0, Constant{-1}), Elemwise{Composite{((i0 - log(i1)) * i2)}}[(0, 0)](Elemwise{log,no_inplace}.0, CumsumOp{2}.0, Subtensor{::, ::, ::int64}.0)]]
Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
File "learner_masked_ordinalcost_directly_itembased_newsoftmax_timing.py", line 651, in
cost, nll, nll_item_ratings, cost_ordinal_1N, cost_ordinal_N1, prob_item_ratings = rating_cost(y, output_ratings, input_masks, output_masks, D, d, alpha=alpha, std=std)
File "learner_masked_ordinalcost_directly_itembased_newsoftmax_timing.py", line 53, in rating_cost
accu_prob_1N = T.extra_ops.cumsum(prob_item_ratings, axis=2)
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.
Could you give me some help?Thanks a lot.
Hi,
Sorry to interupt you.
I got really impressed on your work of 'cafe-nade' and after reading the paper I found that the best rmse result on Movielen1M can reach down to 0.830,
however I can't make the result that good, and I wonder if there's something wrong with parameters or this is not the Cordinal input version?
Could you please tell me the parameters' set of the lowest RMSE and could you please tell me the sparse code version?
I really need your help, Thanks a ton!
from blocks.utils import shared_floatx_nans
from blocks.roles import add_role
pack is change. it is over.
can it run onwindows??
I was looking through the NADE code and found a strange weight matrix Q inside the TensorLinear class.
output_ = T.tensordot(input_, W, axes=[[1, 2], [0, 1]]) + b
input_mask = T.sum(input_, axis = 2)
output_masked = T.dot(input_mask, Q)
output = output_ + output_masked
Can anyone explain what this does cause I don't remember reading anything like this in the paper.
Hello,
I really interest of your model 'CF-NADE'.
However, when i test using my own dataset with h5py(like MovieLens1M), i get a memory error.
Could please release the code about sparse matrix version of code?
I think you maybe use sciply sparse matrix when experimenting with Netflix of MovieLens 10M data.
I need your help, thanks
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.