utilisateur.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:recommandation-film 作者: sambiak 项目源码 文件源码
def reccomandation(self, x):
        """"""
        y = np.array([[math.nan] * nombre_films()])
        for key in self.films:
            y[0][self.conv.renvoyer_index(key)] = self.films[key]
        max_i = 0
        n_max = 0
        t = np.dot(x, self._theta.T)
        print(t)
        for i, el in enumerate(y[0]):
            if np.isnan(el) and t[i, 0] > n_max:
                print("film : ", self.conv.renvoyer_nom_index(i), "note :", n_max)
                n_max = t[i, 0]
                max_i = i
        print(t)
        print(self._theta)
        return self.conv.renvoyer_nom_index(max_i)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号