The following Python code (based on https://github.com/singnet/reputation) is showing the individual ratings by period as well as predictiveness values used for blending are being rounded up to 1.0, which have to be fixed eventually:
import unittest
from datetime import datetime, date
import time
import logging
import pandas as pd
import numpy as np
from reputation_service_api import
from reputation_calculation import
from reputation_base_api import *
from aigents_reputation_api import AigentsAPIReputationService
The following Python code (based on https://github.com/singnet/reputation) is showing the individual ratings by period as well as predictiveness values used for blending are being rounded up to 1.0, which have to be fixed eventually:
import unittest from datetime import datetime, date import time import logging import pandas as pd import numpy as np from reputation_service_api import from reputation_calculation import from reputation_base_api import * from aigents_reputation_api import AigentsAPIReputationService
rs = AigentsAPIReputationService('http://localtest.com:1180/', 'john@doe.org', 'q', 'a', False, 'test', True)
rs = PythonReputationService() ###Change
rs.clear_ranks() rs.clear_ratings() dt1 = date(2018, 1, 1) dt2 = date(2018, 1, 2) dt3 = date(2018, 1, 3) dt4 = date(2018, 1, 4) rs.set_parameters({'default':0.5,'decayed':0.5,'conservatism':0.25, 'fullnorm':False,'logratings':False,'liquid':True,'rating_bias':False,'predictiveness':1, 'aggregation':True}) rs.put_ratings([{'from':'1','type':'rating','to':'4','value':0.5,'weight':10,'time':dt1}]) rs.put_ratings([{'from':'2','type':'rating','to':'5','value':1.0,'weight':10,'time':dt1}]) rs.put_ratings([{'from':'3','type':'rating','to':'6','value':0,'weight':10,'time':dt1}]) rs.put_ratings([{'from':'2','type':'rating','to':'5','value':1.0,'weight':10,'time':dt1}]) rs.update_ranks(dt1) ranks = rs.get_ranks_dict({'date':dt1}) ranks#,{'4': 90.0, '5': 100.0, '6': 14.0}) rs.put_ratings([{'from':1,'type':'rating','to':'5','value':0.75,'weight':10,'time':dt2}]) rs.put_ratings([{'from':2,'type':'rating','to':'6','value':0.25,'weight':10,'time':dt2}]) rs.put_ratings([{'from':3,'type':'rating','to':'4','value':0.75,'weight':10,'time':dt2}]) rs.update_ranks(dt2) ranks = rs.get_ranks_dict({'date':dt2}) print("my ranks:",ranks)