forked from singnet/reputation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update reputation buying AND debugging info in Java RS
- Loading branch information
Showing
3 changed files
with
51 additions
and
17 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,16 +39,10 @@ def dict_sorted(d): | |
return s | ||
|
||
|
||
rs = AigentsAPIReputationService('http://localtest.com:1180/', '[email protected]', 'q', 'a', False, 'test', True) | ||
#rs = PythonReputationService() | ||
rs.set_parameters({'fullnorm':True,'weighting':False,'logratings':False,'denomination':False,'unrated':False,'default':0.5,'decayed':0.5,'conservatism':0.5,'ratings':1.0,'spendings':0.0}) | ||
|
||
verbose = False | ||
|
||
good_transactions = 1 | ||
bad_transactions = 1 | ||
threshold = 40 # 3-4-5 stars | ||
threshold = 60 # 4-5 stars | ||
#threshold = 60 # 4-5 stars | ||
#threshold = 80 # 5 stars | ||
|
||
good_agent = {"buyers":[1,800], "products":[1001,1800], "qualities":[0.5,0.75,1.0], "transactions": good_transactions} | ||
|
@@ -75,8 +69,13 @@ def dict_sorted(d): | |
#bad_agent = {"buyers":[4,5], "products":[9,10], "qualities":[0.0,0.25], "transactions": bad_transactions} | ||
#days = 5 | ||
|
||
#rs = AigentsAPIReputationService('http://localtest.com:1180/', '[email protected]', 'q', 'a', False, 'test', True) | ||
rs = PythonReputationService() | ||
rs.set_parameters({'fullnorm':True,'weighting':False,'logratings':False,'denomination':False,'unrated':False,'default':0.5,'decayed':0.5,'conservatism':0.5,'ratings':1.0,'spendings':0.0}) | ||
verbose = False | ||
|
||
|
||
""" | ||
# Blending Anti-biased with Predictiveness | ||
print("RS=Anti-biased_def5_dec5_c9", end =" ") | ||
|
@@ -114,7 +113,7 @@ def dict_sorted(d): | |
print("RS=Pred+A-B_def5_dec5_c1", end =" ") | ||
rs.set_parameters({'rating_bias':True,'predictiveness':1.0,'fullnorm':True,'weighting':True ,'logratings':False,'denomination':True ,'unrated':False ,'default':0.5,'decayed':0.5,'conservatism':0.1,'ratings':1.0,'spendings':0.0}) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 30, rs, verbose) | ||
|
||
""" | ||
|
||
""" | ||
# Exploring Anti-biased | ||
|
@@ -132,16 +131,23 @@ def dict_sorted(d): | |
""" | ||
|
||
|
||
""" | ||
|
||
# Exploring threshold and PLRo | ||
|
||
#print("RS=A-B_def5_dec5_c9", end =" ") | ||
#rs.set_parameters({'rating_bias':True,'predictiveness':0.0,'fullnorm':True,'weighting':True ,'logratings':False,'denomination':True ,'unrated':False,'default':0.5,'decayed':0.5,'conservatism':0.9,'ratings':1.0,'spendings':0.0}) | ||
#print("RS=Pred_def5_dec5_c1", end =" ") | ||
#rs.set_parameters({'rating_bias':False,'predictiveness':1.0,'fullnorm':True,'weighting':True ,'logratings':False,'denomination':True ,'unrated':False ,'default':0.5,'decayed':0.5,'conservatism':0.1,'ratings':1.0,'spendings':0.0}) | ||
|
||
for threshold in [40,60,80]: | ||
print('threshold='+str(threshold)) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 0, None, verbose) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 0, rs, verbose) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 25, rs, verbose) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 30, rs, verbose) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 50, rs, verbose) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 75, rs, verbose) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 70, rs, verbose) | ||
reputation_simulate(good_agent,bad_agent, datetime.date(2018, 1, 1), days, True, threshold, 100, rs, verbose) | ||
""" | ||
|
||
|
||
""" | ||
# Exploring PLRo-s and different RS-es except Predictive so far | ||
|