Skip to content

Commit f3d25ab

Browse files
committed
a few more changes
1 parent 1cf65e0 commit f3d25ab

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

experiment/experiment.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ def embedding_experiment(config, dataset):
9595
if __name__ == '__main__':
9696

9797
dataset = 'movie'
98-
max_iter = 500
98+
max_iter = 20000
9999
dist = 'binomial' # N=3 for binomial distribution
100-
nprint = 50
100+
nprint = 2000
101101

102102
config = dict(
103103
# the dimensionality of the embedding vectors

experiment/random_data.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import division
2+
13
import numpy as np
24
from scipy import sparse
35
import pickle
@@ -36,8 +38,8 @@ def rand_data():
3638

3739
feature = np.random.rand(n_rows, n_feat)
3840

39-
trainset = dict(scores=sparse.csr_matrix(score_mat[0:(n_rows / 2)]), atts=feature[0:(n_rows / 2)])
40-
testset = dict(scores=sparse.csr_matrix(score_mat[(n_rows / 2):]), atts=feature[(n_rows / 2):])
41+
trainset = dict(scores=sparse.csr_matrix(score_mat[0:(n_rows // 2)]), atts=feature[0:(n_rows // 2)])
42+
testset = dict(scores=sparse.csr_matrix(score_mat[(n_rows // 2):]), atts=feature[(n_rows // 2):])
4143

4244
return dict(trainset=trainset, testset=testset)
4345

0 commit comments

Comments
 (0)