Description Usage Arguments Details Value Author(s) References Examples
View source: R/Score_replace.R
The ratings of each user that has more similar to the active user are directly replaced in his unseen items.
1 | Score_replace(ratings, sim_index, ac)
|
ratings |
A rating matrix whose rows are items and columns are users. |
sim_index |
Descending sorted indexes based on similarity to the active user who is a vector of integers. |
ac |
The id of an active user as an integer (1≤ ac ≤ length of users). |
The unseen items of the active user are filled by the ratings of the similar users, respectively. Each element remains unchanged after one placement.
ratings2 |
A matrix the size of the original user-item matrix in which the active user's empty elements are filled. |
Farimah Houshmand Nanehkaran
Maintainer: Farimah Houshmand Nanehkaran <hoshmandcomputer@gmail.com>
Gadekula, S. K., Rao, U. P., Vyas, R. K., Dontula, A. L., & Gaikwad, S. V. (2019). Improved Pearson Similarity for Collaborative Filtering Recommendation System. In 2019 6th International Conference on Computing for Sustainable Global Development (INDIACom), pp. 1047-1054, IEEE.
1 2 3 4 5 6 7 8 9 10 | ratings <- matrix(c( 2, 5, NaN, NaN, NaN, 4,
NaN, NaN, NaN, 1, NaN, 5,
NaN, 4, 5, NaN, 4, NaN,
4, NaN, NaN, 5, NaN, NaN,
5, NaN, 2, NaN, NaN, NaN,
NaN, 1, NaN, 4, 2, NaN),nrow=6,byrow=TRUE)
sim <- simple_similarity(ratings, max_score=5, min_score=1, ac=1)
ratings2 <- Score_replace(ratings, sim_index= sim$sim_index, ac=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.