Customers
|
Movie 1
|
Movie 2
|
Movie 3
|
Movie 4
|
Movie 5
|
---|---|---|---|---|---|
User 1
|
4
|
4
|
4
|
||
User 2
|
1
|
1
|
|||
User 3
|
5
|
4
|
5
|
4
|
proc imstat; table mylasr.movierating; fetch / format to=5; run; table mylasr.movieprofile; fetch / format to=5; run; table mylasr.userprofile; fetch / format to=5; run; quit;
proc recommend port=&portNumber recom = rs.movielens; add rs.movielens /item = itemid user = userid rating = rating; 1 addtable mylasr.movierating / recom = rs.movielens type = rating vars=(itemid userid rating); 2 addtable mylasr.movieprofile / recom = rs.movielens type = item; addtable mylasr.userprofile / recom = rs.movielens type = user; run; method knn / label = "knn" k = 20 positive similarity = pc seed = 1234; 3 run; method slope1 /label = "slope1"; run; method svd / factors = 20 label = "svd" fconv = 1e-3 gconv = 1e-3 maxiter = 100 seed = 1234 MAXFEVAL = 5000 function=L2 lamda = 0.2 technique = lbfgs; run; method ensemble / methods =("svd","knn") label = "ensemble" details MAXFEVAL=5000 maxiter=100 seed=1234 hold=2 withhold=0.1; run; predict / method = knn label="knn" Num = 5 users = ("1","33","478","2035"); 4 run; info; 5 run; remove rs.movielens; 6 run;