Code Monkey home page Code Monkey logo

sigir16-eals's Issues

How to implement your code?

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.

There may be something wrong about ItemKNN.java

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

for (int j = 0; j < itemCount & j != i; j ++) {

How to test this algorithm on other data sets such as ml-1m?

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

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.