Skip to content
Machine learning movie recommending system
Branch: master
Clone or download


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update sponsors button Oct 25, 2019
bin Encoding update Feb 4, 2018
docs Fixed broken links Nov 18, 2018
media Project logo Jan 29, 2018
moviebox 0.3.0 Feb 4, 2018
.editorconfig Meta Jan 23, 2018
.gitattributes Meta Jan 23, 2018
.gitignore Minor update Jan 25, 2018
.style.yapf Meta Jan 25, 2018
.travis.yml Dropping python 3.4 from travis Feb 4, 2018 PyPi meta Jan 26, 2018
appveyor.yml Minor update Feb 2, 2018 Updated repo meta Nov 18, 2018 Universal wheel support Feb 4, 2018 Docs: Update license date May 24, 2019 Added a list of all movies with their corresponding IDs (#3) Jul 4, 2018 Docs: Minor readme tweaks May 28, 2019
requirements.txt Fabric for Python 2.7+ Feb 4, 2018
setup.cfg Universal wheel support Feb 4, 2018 Updated repo meta Nov 18, 2018


Machine learning movie recommending system

Build Status Python Python



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.


pip install moviebox

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


$ moviebox --help

  Machine learning movie recommending system

    $ moviebox [<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

    $ 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.


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, recommendationsNumber, showPlots, interactive)

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


  • Type: Integer

  • Default Value: 2874

  • Optional: True

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


  • Type: Integer

  • Default Value: 3

  • Optional: True

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


  • Type: Boolean

  • Default Value: False

  • Optional: True

Display the plot summary of each recommended movie.


  • Type: Boolean

  • Default Value: False

  • Optional: True

Display process-related information while running.


  • 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




You can’t perform that action at this time.