def run_main():
    ave_score = read.get_ave_score("./data/ratings.txt")
    item_cate, cate_item_sort = read.get_item_cate(ave_score, "./data/movies.txt")
    up = get_up(item_cate, "./data/ratings.txt")
    resutl = recom(cate_item_sort, up, "1")
    print(resutl)
    print(up["1"])
def run_main():
    ave_score = read.get_ave_score('../data/ratings.txt')
    item_cate, cate_item_sort = read.get_item_cate(ave_score,
                                                   '../data/movies.txt')
    up = get_up(item_cate, '../data/ratings.txt')
    #print(up['1'])
    print(recom(cate_item_sort, up, '1'))
def run_main():
    ave_score = read.get_ave_score("../data/ratings.csv")
    item_cate, cate_item_sort = read.get_item_cate(ave_score,
                                                   "../data/movies.csv")
    up = get_up(item_cate, "../data/ratings.csv")
    print(len(up))
    print(up["1"])
    print(recom(cate_item_sort, up, "1"))
示例#4
0
def run_main():
    ave_score = read.get_ave_score("../data/ratings.csv")
    item_cate, cate_item_sort = read.get_item_cate(ave_score,
                                                   "../data/movies.csv")
    up = get_up(item_cate, "../data/ratings.csv")
    # 少了442这个user,因为该用户的所有评分都小于4.0,说明该用户看过的所有电影都不感兴趣,很难进行推荐
    print(len(up))
    print(up["1"])
    print(recom(cate_item_sort, up, "1"))
示例#5
0
def run_main():
    avg_score = read.get_avg_score("../data/ratings.csv")

    item_cate, cate_item_sort = read.get_item_cate(avg_score, "../data/movies.csv")

    user_profile = get_up(item_cate, "../data/ratings.csv")
    print(len(user_profile))
    print(user_profile["1"])
    result = recom(cate_item_sort, user_profile, "1")
    print(result)
示例#6
0
def run_main():
    ave_score = read.get_ave_score("../data/ratings.dat")
    item_cate, cate_sorted = read.get_item_cate(ave_score,
                                                "../data/movies.dat")
    up = get_up(item_cate, "../data/ratings.dat")
    print(up["1"])
    print(recom(
        cate_sorted,
        up,
        "1",
    ))
示例#7
0
def run_main():
    ave_score = read.get_ave_score("../data/rating.txt")
    item_cate, cate_item_sort = read.get_item_cate(ave_score, "../data/movies.txt")
    up = get_up(item_cate, "../data/rating.txt")
    print(len(up))
    print(up["1"])