def __init__(self):
     self.prop = ReadProperties("data/app.properties")
     self.logger = LoggingUtil("data/logs/")
     self.host = self.prop.get("db_host")
     self.port = self.prop.get("db_port")
     self.db = self.prop.get("db")
     self.user_name = self.prop.get("user_name")
     self.password = self.prop.get("password")
 def __init__(self, media_ap_centers, media_ap_labels, media_ap_indices,
              mediaList_ap_centers, mediaList_ap_labels,
              mediaList_ap_indices):
     self.media_ap_labels = media_ap_labels
     self.media_ap_centers = media_ap_centers
     self.mediaList_ap_centers = mediaList_ap_centers
     self.mediaList_ap_labels = mediaList_ap_labels
     self.media_ap_indices = media_ap_indices
     self.mediaList_ap_indices = mediaList_ap_indices
     self.logger = LoggingUtil("data/logs/")
    def __init__(self):
        self.prop = ReadProperties("data/app.properties")
        self.logger = LoggingUtil("data/logs/")
        self.host = self.prop.get("db_host")
        self.port = int(self.prop.get("db_port"))
        self.db = self.prop.get("db")
        self.user = self.prop.get("user_name")
        self.password = self.prop.get("password")
        self.trainset = {}
        self.testset = {}

        # n_sim_user: top 20个用户, n_rec_media: top 10个推荐结果
        self.n_sim_media = 20
        self.n_rec_media = 10

        # media_sim_mat: 歌曲之间的相似度, media_popular: 歌曲出现的次数, media_count: 播放歌曲的总数据
        self.media_sim_mat = {}
        self.media_popular = {}
        self.media_count = 0
        self.rec_media_dict = {}
        self.all_rec_medias = {}

        self.logger.log().info('Similar media number = %d' % self.n_sim_media)
        self.logger.log().info('Recommended media number = %d' % self.n_rec_media)
 def __init__(self, media_relation_ap_centers, media_relation_ap_labels):
     self.media_relation_ap_centers = media_relation_ap_centers
     self.media_relation_ap_labels = media_relation_ap_labels
     self.logger = LoggingUtil("data/logs/")
     self.prop = ReadProperties("data/app.properties")
 def __init__(self):
     self.prop = ReadProperties("data/app.properties")
     self.logger = LoggingUtil("data/logs/")
     self.user_tag_dict = {}
     pass
Exemple #6
0
 def __init__(self, host, user_name):
     self.host = host
     self.user_name = user_name
     self.logger = LoggingUtil("data/logs/")
 def __init__(self):
     self.logger = LoggingUtil("data/logs/")