## View Item-based neighborhood approach (public)

- Summary
Method for collaborative-filtering tasks. We base the rating of item for user by checking ratings of users with similar tastes

- License
- CC-BY-SA 3.0
- Tags
- collaborative-filtering item-based neighborhood recommender systems
- Feature Processing
- No feature processing required, however standard outlier removal might be helpful.
- Parameters
- matrix of user/item ratings
- Operating System
- independent
- Code
function X = itembased( y,M,sizeX,swap,sim,neib) % Neighbour based regression algorithm % calculates similarities between items and than rating for u as % r_i(u) = sum_j sim(i,j) * r_j(u) / sqrt(sim(i,i) * sim(j,j)

% Output % X - matrix to be estimated % Input % y - sampled entries % M - masking operator, applied to vectorized form of X % sizeX - size of matrix to be reconstructed % swap - switch to ITEM-BASED (default = 1) % sim - similarity measure (0 - PC, 1 - WPC, 2 - cos sim, default = 0) % neib - percentage of neibours taken into sum

% Copyright (c) Lukasz Kidzinski 2011

`Y = reshape(M(y,2),sizeX); if nargin < 4 swap = 1; end if nargin < 5 sim = 0; end if nargin < 6 neib = 0.8; end if swap Y = Y'; end; if (sim < 2) corr = pearsonsim(Y,sim); else corr = cosinesim(Y); end; corr(corr < 0) = 0; rated = Y>0; usedcorr = corr * rated'; X = corr * Y'; X = X ./ usedcorr; X(usedcorr==0) = mean(y); X = X'; if (swap) X = X'; end;`

end

- Software Packages
matlab

- Description
(No information yet)

- URLs
- (No information yet)
- Publications

- revision 1
- by kidzik on 2011-09-13 19:58
- revision 2
- by kidzik on 2011-09-13 20:09

No one has posted any comments yet. Perhaps you would like to be the first?

### Leave a comment

To post a comment, please sign in.This item was downloaded 0 times and viewed 4404 times.

#### Disclaimer

We are acting in good faith to make datasets submitted for the use of the scientific community available to everybody, but if you are a copyright holder and would like us to remove a dataset please inform us and we will do it as soon as possible.

#### Acknowledgements

This project is supported by PASCAL (Pattern Analysis, Statistical Modelling and Computational Learning)

http://www.pascal-network.org/.