• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

klaussinani/moviebox: Machine learning movie recommending system

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

klaussinani/moviebox

开源软件地址(OpenSource Url):

https://github.com/klaussinani/moviebox

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):


Moviebox

Machine learning movie recommending system

Build Status Python Python

Contents

Description

Moviebox is a content based machine learning recommending system build with the powers of tf-idf and cosine similarities.

Initially, a natural number, that corresponds to the ID of a unique movie title, is accepted as input from the user. Through tf-idf the plot summaries of 5000 different movies that reside in the dataset, are analyzed and vectorized. Next, a number of movies is chosen as recommendations based on their cosine similarity with the vectorized input movie. Specifically, the cosine value of the angle between any two non-zero vectors, resulting from their inner product, is used as the primary measure of similarity. Thus, only movies whose story and meaning are as close as possible to the initial one, are displayed to the user as recommendations.

The dataset in use is a random subset of the Carnegie Mellon Movie Summary Corpus, and it consists of 5000 movie titles along with their respective categories and plots.

Install

pip install moviebox

Python 2.7+ or Python 3.4+ is required to install or build the code.

CLI

$ moviebox --help

  Machine learning movie recommending system

  Usage
    $ moviebox [<options> ...]

  Options
    --help, -h              Display help message
    --search, -s            Search movie by ID
    --movie, -m <int>       Input movie ID [Can be any integer 0-4999]
    --plot, -p              Display movie plot
    --interactive, -i       Display process info
    --list, -l              List available movie titles
    --recommend, -r <int>   Number of recommendations [Can be any integer 1-30]
    --version, -v           Display installed version

  Examples
    $ moviebox --help
    $ moviebox --search
    $ moviebox --movie 2874
    $ moviebox -m 2874 --recommend 3
    $ moviebox -m 2874 -r 3 --plot
    $ moviebox -m 2874 -r 3 -p --interactive

To see all movies with corresponding ID's, take a look at this list.

Usage

from moviebox.recommender import recommender

movieID = 2874  # Movie ID of `Asterix & Obelix: God save Britannia`
recommendationsNumber = 3  # Get 3 movie recommendations
showPlots = True  # Display the plot of each recommended movie
interactive = True  # Display process info while running

# Generate the recommendations
recommender(
    movieID=movieID,
    recommendationsNumber=recommendationsNumber,
    showPlots=showPlots,
    interactive=interactive)

API

recommender(movieID, recommendationsNumber, showPlots, interactive)

E.g. recommender(movieID=2874, recommendationsNumber=3, showPlots=True, interactive=True)

movieID

  • Type: Integer

  • Default Value: 2874

  • Optional: True

Input movie ID. Any integer between [0, 4999] can be selected.

recommendationsNumber

  • Type: Integer

  • Default Value: 3

  • Optional: True

Number of movie recommendations to be generated. Any integer between [1, 30] can be selected.

showPlots

  • Type: Boolean

  • Default Value: False

  • Optional: True

Display the plot summary of each recommended movie.

interactive

  • Type: Boolean

  • Default Value: False

  • Optional: True

Display process-related information while running.

Development

  • Clone this repository to your local machine
  • Navigate to your clone cd moviebox
  • Install the dependencies fab install or pip install -r requirements.txt
  • Check for errors fab test
  • Run the API fab start
  • Build the package fab dist
  • Cleanup compiled files fab clean

Team

License

MIT




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap