Skip to content

Commit 04ff89a

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 2b06bc8 + d0cec53 commit 04ff89a

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
![SDLib](http://i2.muimg.com/1949/a23f0509950f23f1.png)
2-
</br>
1+
<img src="http://upload.ouliu.net/i/20171229203635lwns3.png" width="250" height="75" />
2+
33
**Founder**: [@Coder-Yu ](https://github.com/Coder-Yu)</br>
44
**Main Contributors**: [@somnussyq](https://github.com/somnussyq) [@hustzhoutian](https://github.com/hustzhoutian) [@DouTong](https://github.com/DouTong)<br>
55
**Code Reviewer**: [@mingaoo](https://github.com/mingaoo)<br>

config/CoDetector.conf

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ratings=../dataset/AverageAttack0.10.1/profiles.txt
1+
ratings=../dataset/amazon/profiles.txt
22
ratings.setup=-columns 0 1 2
3-
label=../dataset/AverageAttack0.10.1/labels.txt
3+
label=../dataset/amazon/labels.txt
44
methodName=CoDetector
55
evaluation.setup=-ap 0.3
66
item.ranking=on -topN 50
77
num.max.iter=200
88
learnRate=-init 0.01 -max 0.01
9-
reg.lambda=-u 0.03 -i 0.01
9+
reg.lambda=-u 0.8 -i 0.4
1010
CoDetector=-k 10 -negCount 256 -gamma 1 -filter 4
11-
output.setup=on -dir ../results/
11+
output.setup=on -dir ../results/amazon/

main/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
conf = -1
2121
order = input('please enter the num of the method to run it:')
2222
import time
23-
s = time.clock()
23+
s = time.time()
2424
# if order == 0:
2525
# try:
2626
# import seaborn as sns
@@ -50,5 +50,5 @@
5050
exit(-1)
5151
sd = SDLib(conf)
5252
sd.execute()
53-
e = time.clock()
53+
e = time.time()
5454
print "Run time: %f s" % (e - s)

method/CoDetector.py

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def buildModel(self):
115115

116116
for user in self.SPPMI:
117117
u = self.dao.all_User[user]
118+
p = self.P[u]
118119
for context in self.SPPMI[user]:
119120
v = self.dao.all_User[context]
120121
m = self.SPPMI[user][context]

0 commit comments

Comments
 (0)