Skip to content

Instantly share code, notes, and snippets.

@danbri
Created June 23, 2011 07:54
Show Gist options
  • Save danbri/1042113 to your computer and use it in GitHub Desktop.
Save danbri/1042113 to your computer and use it in GitHub Desktop.
a few test runs
in mode 0, first run was with 0.8,
Final result. Obj=305652, TRAIN RMSE= 0.7663 VALIDATION RMSE= 1.2225.
then 0.9 train/test ratio
Final result. Obj=356242, TRAIN RMSE= 0.7842 VALIDATION RMSE= 1.1875.
then mode 1 at .9 ratio
Final result. Obj=821376, TRAIN RMSE= 1.2244 VALIDATION RMSE= 1.2988.
INFO: pmf.cpp(main:1285): PMF/ALS/SVD++/SGD Code written By Danny Bickson, CMU
Send bug reports and comments to [email protected]
WARNING: pmf.cpp(main:1287): Code compiled with GL_NO_MULT_EDGES flag - this mode does not support multiple edges between user and movie in different times
Setting run mode ALS_MATRIX
INFO: pmf.cpp(main:1335): ALS_MATRIX starting
loading data file 2010beebzbin
Loading 2010beebzbin TRAINING
Matrix size is: USERS 19500 MOVIES 12777 TIME BINS 1
Creating 958503 edges (observed ratings)...
.....loading data file 2010beebzbine
Loading 2010beebzbine VALIDATION
Matrix size is: USERS 19500 MOVIES 12777 TIME BINS 1
Creating 239626 edges (observed ratings)...
..loading data file 2010beebzbint
Loading 2010beebzbint TEST
skipping file
setting regularization weight to 0.065
ALS_MATRIX for matrix (19500, 12777, 1):958503. D=20
pU=0.065, pV=0.065, pT=1, muT=1, D=20
complete. Obj=3.21913e+07, TRAIN RMSE=8.1957 VALIDATION RMSE=8.1947.
max iterations = 10
step = 1
max_iterations = 10
INFO: asynchronous_engine.hpp(run:94): Worker 0 started.
INFO: asynchronous_engine.hpp(run:94): Worker 2 started.
INFO: asynchronous_engine.hpp(run:94): Worker 1 started.
INFO: asynchronous_engine.hpp(run:94): Worker 3 started.
INFO: asynchronous_engine.hpp(run:94): Worker 4 started.
INFO: asynchronous_engine.hpp(run:94): Worker 5 started.
INFO: asynchronous_engine.hpp(run:94): Worker 6 started.
INFO: asynchronous_engine.hpp(run:94): Worker 7 started.
Entering last iter with 1
2.32317) Iter ALS_MATRIX 1 Obj=8.55617e+06, TRAIN RMSE=4.1873 VALIDATION RMSE=2.3568.
Entering last iter with 2
4.69663) Iter ALS_MATRIX 2 Obj=4.54246e+06, TRAIN RMSE=3.0502 VALIDATION RMSE=1.4099.
Entering last iter with 3
7.05022) Iter ALS_MATRIX 3 Obj=1.03557e+06, TRAIN RMSE=1.4276 VALIDATION RMSE=1.3620.
Entering last iter with 4
9.71574) Iter ALS_MATRIX 4 Obj=672046, TRAIN RMSE=1.1433 VALIDATION RMSE=1.3318.
Entering last iter with 5
11.7241) Iter ALS_MATRIX 5 Obj=529501, TRAIN RMSE=1.0111 VALIDATION RMSE=1.2939.
Entering last iter with 6
14.0961) Iter ALS_MATRIX 6 Obj=445449, TRAIN RMSE=0.9261 VALIDATION RMSE=1.2766.
Entering last iter with 7
16.4428) Iter ALS_MATRIX 7 Obj=390646, TRAIN RMSE=0.8667 VALIDATION RMSE=1.2591.
Entering last iter with 8
18.6453) Iter ALS_MATRIX 8 Obj=356157, TRAIN RMSE=0.8273 VALIDATION RMSE=1.2463.
Entering last iter with 9
21.0598) Iter ALS_MATRIX 9 Obj=328914, TRAIN RMSE=0.7953 VALIDATION RMSE=1.2369.
Entering last iter with 10
23.2363) Iter ALS_MATRIX 10 Obj=310411, TRAIN RMSE=0.7727 VALIDATION RMSE=1.2231.
INFO: asynchronous_engine.hpp(run:102): Worker 1 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 6 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 2 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 7 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 3 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 0 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 4 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 5 finished.
Final result. Obj=305652, TRAIN RMSE= 0.7663 VALIDATION RMSE= 1.2225.
Finished in 23.355002
Performance counters are: 0) EDGE_TRAVERSAL, 30.6182
Performance counters are: 2) CALC_RMSE_Q, 0.008503
Performance counters are: 3) ALS_LEAST_SQUARES, 51.7636
Performance counters are: 6) CALC_OBJ, 0.106283
=== REPORT FOR core() ===
[Numeric]
ncpus: 8
[Other]
affinities: false
compile_flags:
engine: async
scheduler: round_robin
schedyield: true
scope: edge
=== REPORT FOR engine() ===
[Numeric]
num_edges: 958503
num_syncs: 0
num_vertices: 32277
updatecount: 322770
[Timings]
runtime: 23.3 s
[Other]
termination_reason: task depletion (natural)
[Numeric]
updatecount_vector: 322770 (count: 8, min: 37506, max: 43344, avg: 40346.2)
updatecount_vector.values: 38304,43344,43344,37506,40320,40320,40320,39312,
and again with 0.9 ie more training data,
TellyClub:danbri danbri$ cat go.sh
#!/bin/sh
pmf 2010beebzbin 0 --ncpus=8 --float=true --lambda=0.065 --scheduler="round_robin(max_iterations=10)"
TellyClub:danbri danbri$ ./go.sh
INFO: pmf.cpp(main:1285): PMF/ALS/SVD++/SGD Code written By Danny Bickson, CMU
Send bug reports and comments to [email protected]
WARNING: pmf.cpp(main:1287): Code compiled with GL_NO_MULT_EDGES flag - this mode does not support multiple edges between user and movie in different times
Setting run mode ALS_MATRIX
INFO: pmf.cpp(main:1335): ALS_MATRIX starting
loading data file 2010beebzbin
Loading 2010beebzbin TRAINING
Matrix size is: USERS 19500 MOVIES 12777 TIME BINS 1
Creating 1078316 edges (observed ratings)...
......loading data file 2010beebzbine
Loading 2010beebzbine VALIDATION
Matrix size is: USERS 19500 MOVIES 12777 TIME BINS 1
Creating 119813 edges (observed ratings)...
.loading data file 2010beebzbint
Loading 2010beebzbint TEST
skipping file
setting regularization weight to 0.065
ALS_MATRIX for matrix (19500, 12777, 1):1078316. D=20
pU=0.065, pV=0.065, pT=1, muT=1, D=20
complete. Obj=3.62124e+07, TRAIN RMSE=8.1954 VALIDATION RMSE=8.1965.
max iterations = 10
step = 1
max_iterations = 10
INFO: asynchronous_engine.hpp(run:94): Worker 0 started.
INFO: asynchronous_engine.hpp(run:94): Worker 1 started.
INFO: asynchronous_engine.hpp(run:94): Worker 2 started.
INFO: asynchronous_engine.hpp(run:94): Worker 3 started.
INFO: asynchronous_engine.hpp(run:94): Worker 4 started.
INFO: asynchronous_engine.hpp(run:94): Worker 5 started.
INFO: asynchronous_engine.hpp(run:94): Worker 6 started.
INFO: asynchronous_engine.hpp(run:94): Worker 7 started.
Entering last iter with 1
2.46273) Iter ALS_MATRIX 1 Obj=9.599e+06, TRAIN RMSE=4.1853 VALIDATION RMSE=2.4512.
Entering last iter with 2
5.0279) Iter ALS_MATRIX 2 Obj=5.14698e+06, TRAIN RMSE=3.0638 VALIDATION RMSE=1.4456.
Entering last iter with 3
7.68911) Iter ALS_MATRIX 3 Obj=1.1557e+06, TRAIN RMSE=1.4253 VALIDATION RMSE=1.3210.
Entering last iter with 4
10.4047) Iter ALS_MATRIX 4 Obj=781178, TRAIN RMSE=1.1661 VALIDATION RMSE=1.2854.
Entering last iter with 5
12.998) Iter ALS_MATRIX 5 Obj=610431, TRAIN RMSE=1.0282 VALIDATION RMSE=1.2554.
Entering last iter with 6
15.5638) Iter ALS_MATRIX 6 Obj=515583, TRAIN RMSE=0.9438 VALIDATION RMSE=1.2351.
Entering last iter with 7
18.2514) Iter ALS_MATRIX 7 Obj=452888, TRAIN RMSE=0.8840 VALIDATION RMSE=1.2211.
Entering last iter with 8
20.9628) Iter ALS_MATRIX 8 Obj=411440, TRAIN RMSE=0.8426 VALIDATION RMSE=1.2082.
Entering last iter with 9
23.7272) Iter ALS_MATRIX 9 Obj=379939, TRAIN RMSE=0.8099 VALIDATION RMSE=1.1997.
Entering last iter with 10
26.1217) Iter ALS_MATRIX 10 Obj=359368, TRAIN RMSE=0.7879 VALIDATION RMSE=1.1921.
INFO: asynchronous_engine.hpp(run:102): Worker 3 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 6 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 1 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 2 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 5 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 4 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 0 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 7 finished.
Final result. Obj=356242, TRAIN RMSE= 0.7842 VALIDATION RMSE= 1.1875.
Finished in 26.337415
Performance counters are: 0) EDGE_TRAVERSAL, 38.0618
Performance counters are: 2) CALC_RMSE_Q, 0.007834
Performance counters are: 3) ALS_LEAST_SQUARES, 62.4937
Performance counters are: 6) CALC_OBJ, 0.080001
=== REPORT FOR core() ===
[Numeric]
ncpus: 8
[Other]
affinities: false
compile_flags:
engine: async
scheduler: round_robin
schedyield: true
scope: edge
=== REPORT FOR engine() ===
[Numeric]
num_edges: 1.07832e+06
num_syncs: 0
num_vertices: 32277
updatecount: 322770
[Timings]
runtime: 26.3 s
[Other]
termination_reason: task depletion (natural)
[Numeric]
updatecount_vector: 322770 (count: 8, min: 38304, max: 43344, avg: 40346.2)
updatecount_vector.values: 39312,43344,40320,38304,41328,40320,40320,39522,
and again in another mode, 1
TellyClub:danbri danbri$ sh go.sh
INFO: pmf.cpp(main:1285): PMF/ALS/SVD++/SGD Code written By Danny Bickson, CMU
Send bug reports and comments to [email protected]
WARNING: pmf.cpp(main:1287): Code compiled with GL_NO_MULT_EDGES flag - this mode does not support multiple edges between user and movie in different times
Setting run mode SVD++
INFO: pmf.cpp(main:1335): SVD++ starting
ERROR: pmf.cpp(main:1358): Can not run required algorithm without GL_SVD_PP flag. Please define flag on pmf.h and recompile
TellyClub:danbri danbri$ nano go.sh
TellyClub:danbri danbri$ sh go.sh
INFO: pmf.cpp(main:1285): PMF/ALS/SVD++/SGD Code written By Danny Bickson, CMU
Send bug reports and comments to [email protected]
WARNING: pmf.cpp(main:1287): Code compiled with GL_NO_MULT_EDGES flag - this mode does not support multiple edges between user and movie in different times
Setting run mode BPTF_MATRIX
INFO: pmf.cpp(main:1335): BPTF_MATRIX starting
loading data file 2010beebzbin
Loading 2010beebzbin TRAINING
Matrix size is: USERS 19500 MOVIES 12777 TIME BINS 1
Creating 1078316 edges (observed ratings)...
......loading data file 2010beebzbine
Loading 2010beebzbine VALIDATION
Matrix size is: USERS 19500 MOVIES 12777 TIME BINS 1
Creating 119813 edges (observed ratings)...
.loading data file 2010beebzbint
Loading 2010beebzbint TEST
skipping file
setting regularization weight to 0.065
BPTF_MATRIX for matrix (19500, 12777, 1):1078316. D=20
pU=0.065, pV=0.065, pT=1, muT=1, D=20
nuAlpha=1, Walpha=1, mu=0, muT=1, nu=20, beta=1, W=1, WT=1 BURN_IN=10
complete. Obj=3.62124e+07, TRAIN RMSE=8.1954 VALIDATION RMSE=8.1965.
sampled alpha is 1.00191
max iterations = 10
step = 1
max_iterations = 10
INFO: asynchronous_engine.hpp(run:94): Worker 0 started.
INFO: asynchronous_engine.hpp(run:94): Worker 1 started.
INFO: asynchronous_engine.hpp(run:94): Worker 2 started.
INFO: asynchronous_engine.hpp(run:94): Worker 3 started.
INFO: asynchronous_engine.hpp(run:94): Worker 5 started.
INFO: asynchronous_engine.hpp(run:94): Worker 6 started.
INFO: asynchronous_engine.hpp(run:94): Worker 7 started.
INFO: asynchronous_engine.hpp(run:94): Worker 4 started.
Entering last iter with 1
3.68712) Iter BPTF_MATRIX 1 Obj=3.00105e+07, TRAIN RMSE=7.4606 VALIDATION RMSE=7.5836.
sampled alpha is 0.017951
Entering last iter with 2
7.45824) Iter BPTF_MATRIX 2 Obj=2.75293e+07, TRAIN RMSE=7.1453 VALIDATION RMSE=5.1945.
sampled alpha is 0.0195931
Entering last iter with 3
11.3544) Iter BPTF_MATRIX 3 Obj=9.87986e+06, TRAIN RMSE=4.2790 VALIDATION RMSE=2.2782.
sampled alpha is 0.0546689
Entering last iter with 4
15.4137) Iter BPTF_MATRIX 4 Obj=1.98435e+06, TRAIN RMSE=1.9130 VALIDATION RMSE=1.5121.
sampled alpha is 0.272499
Entering last iter with 5
19.2782) Iter BPTF_MATRIX 5 Obj=1.01961e+06, TRAIN RMSE=1.3667 VALIDATION RMSE=1.3328.
sampled alpha is 0.536882
Entering last iter with 6
23.1699) Iter BPTF_MATRIX 6 Obj=851561, TRAIN RMSE=1.2472 VALIDATION RMSE=1.3053.
sampled alpha is 0.642909
Entering last iter with 7
27.2852) Iter BPTF_MATRIX 7 Obj=826420, TRAIN RMSE=1.2282 VALIDATION RMSE=1.2982.
sampled alpha is 0.664127
Entering last iter with 8
31.8299) Iter BPTF_MATRIX 8 Obj=821087, TRAIN RMSE=1.2242 VALIDATION RMSE=1.2988.
sampled alpha is 0.668049
Entering last iter with 9
35.7247) Iter BPTF_MATRIX 9 Obj=821367, TRAIN RMSE=1.2243 VALIDATION RMSE=1.2974.
Finished burn-in period. starting to aggregate samples
sampled alpha is 0.666922
Entering last iter with 10
39.4087) Iter BPTF_MATRIX 10 Obj=821436, TRAIN RMSE=1.2244 VALIDATION RMSE=1.2987.
sampled alpha is 0.667033
INFO: asynchronous_engine.hpp(run:102): Worker 4 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 3 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 7 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 1 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 5 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 6 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 2 finished.
INFO: asynchronous_engine.hpp(run:102): Worker 0 finished.
Final result. Obj=821376, TRAIN RMSE= 1.2244 VALIDATION RMSE= 1.2988.
Finished in 39.663386
Performance counters are: 0) EDGE_TRAVERSAL, 44.4005
Performance counters are: 1) BPTF_SAMPLE_STEP, 1.73233
Performance counters are: 2) CALC_RMSE_Q, 0.005454
Performance counters are: 6) CALC_OBJ, 0.099321
Performance counters are: 7) BPTF_MVN_RNDEX, 30.5902
Performance counters are: 8) BPTF_LEAST_SQUARES2, 14.2635
=== REPORT FOR core() ===
[Numeric]
ncpus: 8
[Other]
affinities: false
compile_flags:
engine: async
scheduler: round_robin
schedyield: true
scope: edge
=== REPORT FOR engine() ===
[Numeric]
num_edges: 1.07832e+06
num_syncs: 0
num_vertices: 32277
updatecount: 322770
[Timings]
runtime: 39.6 s
[Other]
termination_reason: task depletion (natural)
[Numeric]
updatecount_vector: 322770 (count: 8, min: 39312, max: 41328, avg: 40346.2)
updatecount_vector.values: 40320,40320,39522,41328,41328,39312,39312,41328,
TellyClub:danbri danbri$ cat go.sh
#!/bin/sh
pmf 2010beebzbin 1 --ncpus=8 --float=true --lambda=0.065 --scheduler="round_robin(max_iterations=10)"
# 0 = Matrix factorization using alternating least squares
# 1 = Matrix factorization using MCMC procedure
# 2 = Tensor factorization using MCMC procedure, single edge exist between user and movies
# 3 = Tensor factorization, using MCMC procedure with support for multiple edges between user and movies in different times
# 4 = Tensor factorization using alternating least squars
# 5 = SVD++ algorithm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment