thinkgamer / recsysdevcode Goto Github PK
View Code? Open in Web Editor NEW《推荐系统开发实战》代码及勘误
《推荐系统开发实战》代码及勘误
N(x)表示用户x的评分物品集合 -> N(u)表示用户u的评分物品集合
代码4-2分割数据集模块中,代码最后的
return S1,S2,entropy
改为
return S1,S2,minEntropy
最下方文字“用户 A、B 和 C也都在 b 物品上进行了评分。”改为“用户A和用户C都在b物品进行了评分,用户B和用户C都在e物品进行了评分”
27页错别字,局限与改为局限于
def DecimalScaling(self):
arr_ = list()
j = self.x_max // 10 if self.x_max % 10 == 0 else self.x_max // 10 + 1
for x in self.arr:
arr_.append(round(x / math.pow(10, j), 4))
print("经过Decimal Scaling标准化后的数据为:\n{}".format(arr_))
movies = dict()
for (sim_user,sim) in newNU[:self.k]:
for movieID in self.train[sim_user].keys():
movies.setdefault(movieID,0) #书中少了这句代码
movies[movieID] += sim * self.train[sim_user][movieID]
newMovies = sorted(movies.items(), key = lambda k:k[1], reverse=True)
return newMovies
链接失效了,能否给个备用的或者其他方式
用户 C 没有进行评分的物品中倒序排列为 a→c→e
修改为
用户 C 没有进行评分的物品中倒序排列为 d→a→c
python代码中输出 不是d a c是因为 输出为字典,默认按 key 升序
E((E-EX)(Y-YX)) 改为E((X-EX)(Y-EY))「 笔误:E((X-EX)(Y-YX))」
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.