• Stars
    star
    521
  • Rank 81,931 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Machine learning movie recommending system


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

More Repositories

1

taskbook

Tasks, boards & notes for the command-line habitat
JavaScript
8,866
star
2

signale

Highly configurable logging utility
JavaScript
8,864
star
3

tusk

Refined Evernote desktop app
JavaScript
3,147
star
4

ao

Elegant Microsoft To-Do desktop app
JavaScript
2,078
star
5

qoa

Minimal interactive command-line prompts
JavaScript
2,044
star
6

hyper-pokemon

Tailor-made Pokémon themes for your Hyper terminal
JavaScript
1,033
star
7

awesome-prolog

Curated list of Prolog packages and resources
476
star
8

hyper-star-wars

Super awesome your Hyper terminal shall look
JavaScript
247
star
9

hyperocean

Deep oceanic blue Hyper theme
JavaScript
227
star
10

singlie

Singly circular & linear linked lists for ES6
JavaScript
187
star
11

arare

Lightweight curried functional programming library
JavaScript
125
star
12

rels

Github release analytics for the console
JavaScript
88
star
13

binstree

Binary search trees for ES6
JavaScript
34
star
14

oceandock

Deep oceanic blue Plank dock theme
JavaScript
31
star
15

prioqueue

Priority queues for ES6
JavaScript
24
star
16

doublie

Doubly circular & linear linked lists for ES6
JavaScript
22
star
17

dsforest

Disjoint-set forests for ES6
JavaScript
16
star
18

mheap

Binary min & max heaps for ES6
JavaScript
12
star
19

kiu

FIFO Queues for ES6
JavaScript
12
star
20

itermocean

Deep oceanic blue iTerm theme
12
star
21

avlbinstree

AVL self-balancing binary search trees for ES6
JavaScript
12
star
22

operating-systems

Inter-process communication, synchronization & scheduling algorithms
C
12
star
23

binoheap

Binomial heaps for ES6
JavaScript
9
star
24

shtack

LIFO Stacks for ES6
JavaScript
9
star
25

microcomputer-assembly

Microcomputer programs in 8085, 8086 & AVR assembly
Assembly
9
star