登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 软件工程 > 正文

基于python的电影推荐系统毕业论文

 2020-02-19 18:14:12  

摘 要

本文设计了一个个性化电影推荐系统。众所周知,现在电影资源是网络资源的重要组成部分,随着网络上电影资源的数量越来越庞大,设计电影个性化推荐系统迫在眉睫。所以本文旨在为每一个用户推荐与其兴趣爱好契合度较高的电影。

论文首先阐述推荐系统的研究现状以及意义,随后介绍了相关的推荐算法,重点介绍协同过滤算法,并对系统实现所需技术进行了研究,接着介绍了整个推荐系统的实现,最后对整个项目进行了回顾与总结。

本系统包含电影前端展示界面、电影评分板块、推荐算法的实现以及后端数据库的设计。其中推荐算法该如何实现是整个电影推荐系统的核心。系统采用由grouplens项目组从美国著名电影网站movielens整理的ml-latest-small数据集,该数据集包含了671个用户对9000多部电影的10万条评分数据。首先将该数据集包含的全部文件经过筛选重组之后存储到建好的数据库中,并将数据集按一定比例划分为训练集和测试集,对训练集进行算法分析生成Top-N 个性化电影推荐列表,然后在测试集上对算法进行评测,至少包括准确率和召回率两种评测指标。

协同过滤算法是推荐领域最出名也是应用最广泛的推荐算法。所以系统拟采用两种协同过滤算法给出两种不同的推荐结果,一种是基于用户的协同过滤算法,另一种是基于物品的协同过滤算法,用户可以根据两种推荐结果更加合理的选择合适的电影。系统采用了改进之后的ItemCF-IUF和UserCF-IIF算法,对计算用户相似度和物品相似度的计算都做出了改进。最后通过计算两种算法的准确率(Precision)、召回率(Recall)和流行度从而对系统进行评测、并比较了两种算法各自的优势和劣势。实验证明,改进后的算法比原始的协同过滤算法推荐效果要好,准确率更高。

整个系统涉及到的编程语言包含Python、Html5、JQuery、CSS3以及MySQL数据库编程。用到的框架是Django重量级web框架,通过该框架连接系统的前、后端。用户首先需要填写用户名、密码以及邮箱注册系统,然后才能登陆推荐系统。进入首页后会看到8个电影分类,包括恐怖片、动作片、剧情片等。用户需要给自己看过的电影进行评分,评分起止为0.5-5.0分,共10个分段。每评价一部电影就要点击一下提交按钮,将所评分的电影的

imdbId号以及对应的评分存入数据库中。用户点击“推荐结果”按钮,系统就调用推荐算法 遍历数据库所存数据,得出推荐列表之后将结果反馈给浏览器,同时调取数据库所存电影海报图片进行展示。用户点击自己登陆的昵称,会跳转页面显示自己已经评价过的电影。

本文还分析了系统的需求,并对需求进行相关设计,最后用Django框架实现了该系统, 并给出了系统所用的主要数据表展示以及各个功能界面的展示。

关键词:电影推荐系统;协同过滤;基于邻域推荐;个性化服务

Abstract

This paper designs a personalized movie recommendation system. As we all know, nowdays, film resources are an important part of network resources. The number of film resources on the Internet is increasing. Designing a personalized movie recommendation system is imminent. Therefore, this project aims to implement a personalized movie recommendation system, recommending movies for each user in accordance with their interests.

The paper elaborates the research status and significance of the recommendation system firstly. Then it introduces the related recommendation algorithm, focuses on the collaborative filtering algorithm, and studies the required technology of the system implementation. Then it introduces the implementation of the entire recommendation system, finally reviews and summarizes the whole system.

The system includes the front-end display interface of the movie, the movie scoring board, the implementation of the recommendation algorithm, and the design of the back-end database. The implementation of the recommendation algorithm is the core of the entire movie recommendation system. The system plans to adopt the ml-latest-small dataset organized by the grouplens project team from the famous movie site movielens in the United States. This dataset contains 671 user ratings data for more than 9,000 movies. Firstly, the csv file included in the data set is stored in the database. The data set is divided into training set and test set. Algorithm analysis of the training set generates Top-N personalized movie recommendation list, and then the algorithm is evaluated on the test set, there include at least two indicators of test: accuracy and recall.

Collaborative filtering algorithms are the best known and most widely used recommendation algorithms. Therefore, the system proposes two collaborative filtering algorithms to give two different recommendation results. One is a user-based collaborative filtering algorithm, and the other is an item-based collaborative filtering algorithm. Users can make more reasonable choices based on the two recommended results. The right movie. The improved ItemCF-IUF and UserCF-IIF algorithms are used in the system to improve the calculation of user similarity and item similarity. Finally, the system is evaluated by calculating the precision, recall and popularity of the two algorithms, and the

advantages and disadvantages of the two algorithms are compared. Experiments show that the improved algorithm is better than the original collaborative filtering algorithm and the accuracy is higher.

The programming languages involved in the entire system include Python, Html5, JQuery, CSS3 and MySQL database programming. The framework used is django's heavyweight web framework, connecting the system's front and back ends via the Django framework. The user first needs to fill in the username, password, and email registration system before logging in to the recommendation system. After entering the front page, you will see 8 movie categories, including horror films, action films, drama films, etc. Users need to rate the movies they have seen. The score starts from 0.5-5.0 points, a total of 10 segments. Each time you evaluate a movie, you must click the submit button to save the imdbId number of the movie you are rating and the corresponding rating into the database. When the user clicks the “ recommendation result” button, the system invokes the recommendation algorithm to traverse the data stored in the database, and after the recommendation list is obtained, the result is fed back to the browser, and the movie poster picture stored in the database is retrieved for display.When the user clicks on the nickname that he or she login, he will jump to the page to show the movie he has already evaluated.

This article also analyzes the requirements of the system, and related design of the requirements. Finally, the system is implemented using the Django framework, and given the main data table and function interface display .

  Keywords: Movie recommendation system; Collaborative Filtering; criterion; Based on neighborhood recommendation; Personalized service

目 录

第 1 章 绪论 1

    1. 研究背景及意义 1
    2. 国内外研究现状 1
    3. 本文研究目标和研究内容 4
    4. 论文结构安排 5

第 2 章 推荐算法的研究 6

    1. 推荐算法简介 6
      1. 协同过滤算法 6
      2. 基于内容的推荐算法 6
      3. 基于标签的推荐算法 7
    2. 系统实现算法介绍 8
      1. 基于用户的协同过滤算法 8
      2. 基于物品的协同过滤算法 8
    3. 相似度计算 9
    4. 推荐算法评测指标 11
      1. 评分预测 11
      2. TopN 推荐 11
    5. 本章小结 11

第 3 章 实验设计及系统实现相关技术的研究 12

    1. 实验设计及结果分析 12
      1. 实验环境 12
      2. 实验设计 12
    2. 系统实现相关技术的研究 15
      1. Python 语言研究 16
      2. Django 框架研究 16
      3. MySQL 数据库研究 16
    3. 本章小结 18

第 4 章 推荐系统的设计与实现 19

    1. 国内外主流视频网站推荐效果调研 19
      1. 国内视频网站调研 19
      2. 国外视频网站调研 20
    2. 需求分析 22
    3. 用户功能需求 22
    4. 系统设计 22
      1. 系统总体架构 22
      2. 系统功能模块简述 25
    5. 数据库介绍与设计 41
      1. 实验数据集介绍 41
      2. 数据库逻辑结构设计 43
      3. 系统 E-R 图 45
      4. 系统数据表设计 46
    6. 本章小结 48

第 5 章 总结与展望 49

5.1 总结 49

5.2 不足之处及未来展望 49

参考文献 51

致 谢 53

附 录 : 代码 54

1 章 绪 论

研究背景及意义

随着互联网技术的快速发展,现在已经进入了大数据时代,网络上的信息呈现爆炸式增长,每天都会有数以亿计的数据涌现。接触各种信息的途径也越来越丰富,比如微博、Facebook、Twitter、微信公众号等等。而这些在给用户带来便利的同时也带来了前所未有的问题——“信息过载”[1]

“信息过载”就是指用户很难从庞大的数据中找到自己感兴趣的信息[2],[3] 为了解决信息过载问题,首先出现的是搜索引擎,但是一旦用户无法准确描述自己所需的关键词,搜索引擎就无能为力了,且搜索是一种被动的检索.而且,不同用户之间的需求差异很大.如果只是单纯的靠搜索引擎以及无法满足获取自身需求的信息。随着科技的发展,后来才有了推荐系统[4]。

但是,最初的自动推荐系统,只是会将时下热门的、大众都爱的或者能使公司获得最大收益的产品推荐给用户,并没有针对每一个用户进行分析给出推荐。这样推荐的效果非常不理想。因此,人们希望有一种能向用户自动推荐项目的系统和方法,并且这个系统基于用户的偏好且对所推荐的产品进行属性分析。这就是个性化推荐系统。

个性化推荐系统技术可以应用到很多网站上,比如图书网站、视频网站、音乐网站、交友网站等。用户使用推荐系统的时间越长,不仅可以提高用户对该网站的忠诚度[5],还能为网站带来更多收益。最近几年推荐系统发展迅速,这要归功于Web2.0技术的成熟。现在用户已经成为了网页的积极参与者而不再是被动的网页浏览者[6]。所以,为众多平台用户提供个性化推荐迫在眉睫。

截止于2017年底,国内知名视频网站优酷网上的电影和电视剧数量已达16040部。在如此庞大的视频数量下,怎样快速帮助用户发掘自己感兴趣的电影在网站运营中显得尤为重要。而且看电影常常被用户当做一种放松娱乐的方式,所以用户在打开电影网站时可能没有明确想看的电影。这样只有靠推荐系统通过分析用户的历史行为以及现下看的电影去分析潜在的用户可能感兴趣的电影。

国内外研究现状

“推荐系统”这个概念首次由Resnick在1997年提出[7],此后就一直被广泛引用。2007年,ACM推荐系统会议开始举办,这是第一个以“推荐系统”命名的顶级会议,旨在分享研究成果和方法,推动该领域的发展。现在,AI(人工智能)、DM(数据挖掘)等学科的研究更加推动了推荐系统的发展。

如今,人们生活的方方面面已经离不开推荐系统了。几乎所有的领域都在应

用个性化推荐,比如电子商务、图书网站、社交网站等等。

      • 电子商务推荐

 Amazon是电子商务推荐系统的代表,当用户登录后进入亚马逊图书网站首页,就会看到“为您推荐”板块,系统根据你的历史行为生成了图书推荐列表,如图1.1所示.还有一个“与您浏览过的商品相关的推荐”板块。正式这样有针对性的推荐,潜在的给Amazon带 来了巨大的经济收益。

图 1.2 亚马逊网站的推荐板块2

以上是毕业论文大纲或资料介绍,该课题完整毕业论文、开题报告、任务书、程序设计、图纸设计等资料请添加微信获取,微信号:bysjorg。

相关图片展示:

您需要先支付 50元 才能查看全部内容!立即支付

微信号:bysjorg

Copyright © 2010-2022 毕业论文网 站点地图