hexiangnan / sigir16-eals Goto Github PK
View Code? Open in Web Editor NEWExperiments codes for SIGIR'16 paper "Fast Matrix Factorization for Online Recommendation with Implicit Feedback "
Experiments codes for SIGIR'16 paper "Fast Matrix Factorization for Online Recommendation with Implicit Feedback "
Hello,
I'm having problem implement your code.
The data we use is movieLens100k, and we would like to have the output of predicted rating matrix. Thank you very much.
Hi, Prof. He!
In the ItemKNN.java, the similarity matrix is a diagonal matrix but the method buildModel_items only seems to calculate the values in the lower triangular part and doesn't assign the values to the symmetry elements.
The experimental results show that there are some differences between using itemCount && j != i and itemCount in line 5 (line 71 of the original code).
protected void buildModel_items(int startItem, int endItem) {
// Build the similarity matrix for selected items.
for (int i = startItem; i < endItem; i++) {
HashMap<Integer, Double> map_item_score = new HashMap<Integer, Double>();
for (int j = 0; j < itemCount && j != i; j++) {
// Cosine similarity
double score = trainMatrix.getColRef(i).innerProduct(trainMatrix.getColRef(j));
if (score != 0) {
score /= (lengths[i] * lengths[j]);
map_item_score.put(j, score);
}
}
if (K <= 0) { // All neighbors
for (int j : map_item_score.keySet()) {
similarity.setValue(i, j, map_item_score.get(j));
}
} else { // Only K nearest neighbors
for (int j : CommonUtils.TopKeysByValue(map_item_score, K, null)) {
similarity.setValue(i, j, map_item_score.get(j));
}
} // end if
} // end for
sigir16-eals/src/algorithms/ItemKNN.java
Line 71 in 993d19f
Hi, Professor He. Recently I'm trying to test e-als on ml-1m and some other data sets, but I'm not so familiar with programming with JAVA. I've preprocessed the data sets in the same form as you shown in the yelp data set. However, without any modification, when I run main_MF.java to test the offline performance, I got an extremely bad result, i.e., 0.4xxx for HR and 0.01xx for NDCG. This is unacceptable since a simple MF algorithm can have much better performance. Do you have any suggestion about how to reproduce your results? (ml-1m is tested in your paper "Neural Collaborative Filtering" but I can't reproduce the same results) Or do I need to modify some critical parameters?
Thanks.
Here is the parameters I used:
Data data/ml-1m.rating
#Users 6040
#Items 3706
#Ratings 994169 (train), 6040(test)
FastALS: showProgress=false, factors=64, maxIter=500, reg=0.010000, w0=10.00, alpha=0.75
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.