<commit_before>---
layout: post
title: Predicting Movie Box Office Success
excerpt: Can you predict this year's biggest box office hits in the theaters? Let's build a predictive model!
---


Can you predict this year's biggest box office hits in the theaters?

My husband claims that he can by his gut feelings.  Simply on whether it's a superhero movie or a Disney animated film.  Especially because he thinks Disney is trying to take over the world.


![alt text](../images/predictpic.png "Prediction Comic")

I make NO such bold claims. Instead I tinker with data and try to build a predictive model -


####Background

In this analysis I scrapped 5 years of movie data (2010 - 2015) from [boxofficemojo](http://boxofficemojo.com) and [imdb] (http://www.imdb.com/). For predictive algorithm I used linear regression here.

Some researchers have accurately predicted movie box office success from analyzing consumer activity prior to a movie's release, such as wikipedia edits, Facebook/Twitter, or Google Searches. One drawback to using this approach is that you might be limited by having to collect data right before the movie release. I might look into this for a future analysis - for now I focused mostly on "inherent" movie characteristics, such as movie genre, production company, movie screens, etc.

####Feature Selection and Transformation
The features I considered included:<commit_msg>Update 2015-7-20-BoxOfficePrediction.md<commit_after>---
layout: post
title: Predicting Movie Box Office Success
excerpt: Can you predict this year's biggest box office hits in the theaters? Short post on building a predictive model!
---


Can you predict this year's biggest box office hits in the theaters?

My husband claims that he can by his gut feelings.  Simply on whether it's a superhero movie or a Disney animated film.  Especially because he thinks Disney is trying to take over the world.


![alt text](../images/predictpic.png "Prediction Comic")

I make NO such bold claims. Instead I tinker with data and try to build a predictive model -


####Background

In this analysis I scrapped 5 years of movie data (2010 - 2015) from [boxofficemojo](http://boxofficemojo.com) and [imdb] (http://www.imdb.com/). For predictive algorithm I used linear regression here.

Some researchers have accurately predicted movie box office success from analyzing consumer activity prior to a movie's release, such as wikipedia edits, Facebook/Twitter, or Google Searches. One drawback to using this approach is that you might be limited by having to collect data right before the movie release. I might look into this for a future analysis - for now I focused mostly on "inherent" movie characteristics, such as movie genre, production company, movie screens, etc.

####Feature Selection and Transformation
The features I considered included:
{'fraction_non_alphanumeric': 0.05956996827634826, 'fraction_numerical': 0.008812125484666901, 'mean_word_length': 4.521400778210117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2478446', 'n_tokens_mistral': 737, 'n_tokens_neox': 663, 'n_words': 412}