Thursday, December 21, 2017

Having fun with the IMDb dataset files

What follows are some raw statistics and plots that I generated using imdb-stats, a small project written in Scala, gnuplot, and the IMDb dataset files. This is work in progress.

Note: I'm not a statistician (obviously).

As of December 21, 2017, there are 4,700,498 titles in the IMDb dataset files.

Title types

Titles can be partitioned into 10 different types:
  • TV episode: 3,120,588 (66.39%)
  • Short film: 596,395 (12.69%)
  • Feature film: 471,950 (10.04%)
  • Video: 189,542 (4.03%)
  • TV series: 139,903 (2.98%)
  • TV movie: 121,916 (2.59%)
  • TV mini-series: 20,912 (0.44%)
  • Video game: 20,707 (0.44%)
  • TV special: 10,422 (0.22%)
  • TV short: 8,163 (0.17%)

Years

4,430,900 titles (94.26%) have a start and/or end year defined:
  • minimum: 1,874.00
  • maximum: 2,115.00
  • mean: 1,999.21
  • median: 2,008.00
  • mode: 2,016.00
  • standard deviation: 22.40
The earliest title in IMDb is The Passage of Venus (1874). And, yes, 100 Years is planned for release in 2115!

Durations

1,445,426 titles (30.75%) have a runtime duration defined:
  • minimum: 1.00
  • maximum: 125,156.00
  • mean: 46.79
  • median: 30.00
  • mode: 30.00
  • standard deviation: 116.51
Most durations above 1,000 minutes are experimental videos, total durations for series, mistakes, etc.
Here are the statistics and frequency plot for feature films only:
  • count: 292,149
  • minimum: 1.00
  • maximum: 14,400.00
  • mean: 87.51
  • median: 88.00
  • mode: 90.00
  • standard deviation: 53.54
For short films only:
  • count: 388,272
  • minimum: 1.00
  • maximum: 1,834.00
  • mean: 13.27
  • median: 11.00
  • mode: 10.00
  • standard deviation: 10.04
There is some overlap between the short films and feature films. I'm not sure it totally makes sense (e.g. a feature film shorter than 10 minutes or a short film longer than 100 minutes?).

Ratings

789,386 titles (16.79%) have ratings.
  • minimum: 1.00
  • maximum: 10.00
  • mean: 6.94
  • median: 7.10
  • mode: 7.20
  • standard deviation: 1.39

Vote counts

Each title with a rating has at least 5 votes (this is a limit enforced by IMDb).
  • minimum: 5.00
  • maximum: 1,888,855.00
  • mean: 993.63
  • median: 20.00
  • mode: 5.00
  • standard deviation: 15,252.21
Most titles don't have much votes. The full frequency plot is not very useful:
If we zoom to 1,100 votes and less, we can see what's happening a little bit better:
95% of the titles with votes are in that area (i.e. about 1,100 votes and less):
  • votes ≥ 10: 571,597 (72.41%)
  • votes ≥ 100: 174,492 (22.10%)
  • votes ≥ 1,000: 41,927 (5.31%)
  • votes ≥ 10,000: 8,560 (1.08%)
  • votes ≥ 100,000: 1,608 (0.20%)
  • votes ≥ 1,000,000: 23 (0.00%)
Here is a list of the titles with more than 1,000,000 votes:
  1. 1,888,855 votes: The Shawshank Redemption
  2. 1,864,479 votes: The Dark Knight
  3. 1,653,332 votes: Inception
  4. 1,513,857 votes: Fight Club
  5. 1,477,384 votes: Pulp Fiction
  6. 1,425,693 votes: Forrest Gump
  7. 1,369,869 votes: The Lord of the Rings: The Fellowship of the Ring
  8. 1,358,735 votes: The Matrix
  9. 1,349,685 votes: The Lord of the Rings: The Return of the King
  10. 1,289,627 votes: The Godfather
  11. 1,269,450 votes: The Dark Knight Rises
  12. 1,269,062 votes: Game of Thrones
  13. 1,221,666 votes: The Lord of the Rings: The Two Towers
  14. 1,151,888 votes: Se7en
  15. 1,120,080 votes: Interstellar
  16. 1,095,691 votes: Gladiator
  17. 1,089,898 votes: Batman Begins
  18. 1,087,575 votes: Django Unchained
  19. 1,076,266 votes: The Avengers
  20. 1,044,290 votes: Breaking Bad
  21. 1,018,092 votes: Star Wars: Episode IV - A New Hope
  22. 1,006,010 votes: The Silence of the Lambs
  23. 1,004,376 votes: Inglourious Basterds
Most (but not all) of those titles are feature films. The mean/median numbers of votes for feature films are greater than the mean/median numbers of votes for all titles:
  • minimum: 5.00
  • maximum: 1,888,855.00
  • mean: 3,108.20
  • median: 44.00
  • mode: 5.00
  • standard deviation: 28,483.48
But the plot still doesn't look like a bell curve:
  • votes ≥ 10: 176,223 (83.02%)
  • votes ≥ 100: 77,743 (36.63%)
  • votes ≥ 1,000: 25,560 (12.04%)
  • votes ≥ 10,000: 7,250 (3.42%)
  • votes ≥ 100,000: 1,504 (0.71%)
  • votes ≥ 1,000,000: 21 (0.01%)

Minimum ratings

Question: what's the minimum IMDb rating for a feature film that you should watch if you can only watch N feature films in your life?

Here's the plot if you take into account all feature films with ratings:
If you take into account only feature films with 100 votes or more:
And now with 10,000 votes or more:
All the plots have the same shape: the more films you take, the less you have to be strict/conservative about the minimum rating. It makes complete sense.

If you put all the plots on the same image, it becomes clear in what way the minimum number of votes influences the minimum rating:
The higher the number of votes, the lower the number of feature films there are with that many votes. In other words, you can be less strict/conservative about the minimum rating with movies that have lots of votes.

But let's be honest, shall we? You probably won't see more than 5,000 feature films in your entire life, unless you're a movie buff. So let's zoom a little:
At this scale, if becomes clear that the minimum number of votes becomes less important: the minimum rating doesn't go all the way down to 1; actually, it doesn't even go below 7.5 for most plots and doesn't go below ~6.5 for all of them. It appears that it's probably a good idea to stay clear of feature films with a rating lower than 7 or 8, depending on the number of films.

Example 1. Let's say you only have the time to watch 1,500 feature films. These are the minimum ratings for various minimum number of votes:
  • votes ≥ 5 ⇒ rating ≥ 9.20
  • votes ≥ 10 ⇒ rating ≥ 9.00
  • votes ≥ 100 ⇒ rating ≥ 8.20
  • votes ≥ 1,000 ⇒ rating ≥ 8.10
  • votes ≥ 10,000 ⇒ rating ≥ 7.70
  • votes ≥ 25,000 ⇒ rating ≥ 7.30
  • votes ≥ 100,000 ⇒ rating ≥ 4.70
Example 2. What about 250 feature films?
  • votes ≥ 5 ⇒ rating ≥ 9.70
  • votes ≥ 10 ⇒ rating ≥ 9.50
  • votes ≥ 100 ⇒ rating ≥ 8.80
  • votes ≥ 1,000 ⇒ rating ≥ 8.60
  • votes ≥ 10,000 ⇒ rating ≥ 8.30
  • votes ≥ 25,000 ⇒ rating ≥ 8.20
  • votes ≥ 100,000 ⇒ rating ≥ 8.10
At the time of writing, all the movies in the IMDb Top 250 have more than 25,000 votes and a rating of 8.0 or more. If I had to guess, I would have given a minimum rating of 8.1 for a maximum of 250 movies to watch and a minimum of 25'000 votes. The discrepancy probably comes from the fact that "only votes from regular IMDb voters are considered when creating the top 250 out of the full voting database". I have no way of knowing which vote comes from "regular IMDb voters". This information is not included in the IMDb dataset files.

To-do

  • check if there is a correlation between ratings and number of votes (plot + regression)
  • check if there is a correlation between ratings and years (plot + regression)

Wednesday, December 6, 2017

L'œuvre et l'artiste #MeToo

La question est devenue presque banale : est-il possible d'apprécier l'œuvre d'un artiste qui a commis des actes répréhensibles ? Certains répondront que, non, il faut boycotter un tel artiste, pour ne pas se rendre complice. D'autres, au contraire, répondront qu'il s'agit de distinguer l'artiste de son œuvre.

Récemment, c'est le cas de Louis CK qui m'a particulièrement touché. J'adore sa série Louie, dont cinq saisons ont été tournées, ainsi que Horace and Pete, diffusée l'année passée. Le 9 novembre 2017, il a été révélé que Louis CK avait demandé à cinq femmes de le regarder en train de se masturber, profitant d'une situation où il avait un certain pouvoir sur elles. Louis CK a admis les faits. Je ne peux pas rester insensible. Ce qu'il a fait est inacceptable. En même temps, j'adore ses séries. J'adore son œuvre. Comme je le disais début 2017, à propos de Louie : "il s'agit d'une série drôle, touchante, poétique, parfois bouleversante".

Avant ça, il y a eu Roman Polanski. J'adore ses films. Mais une dizaines de femmes l'accusent de comportements déplacés, voire d'abus sexuels. Le cas de 1977 (relation sexuelle avec une fille de 13 ans) est évidemment très connu.

Il y a eu aussi Woody Allen, mais son cas est moins clair. Oui, il a épousé la fille adoptive de sa compagne. C'est étrange, mais a priori pas immoral. Oui, il a été accusé par sa fille d'abus sexuel, mais Woody Allen a toujours nié les faits.

Ce dernier cas met en évidence que, lorsqu'une personne en accuse une autre publiquement, que cette dernière nie les faits et qu'aucun jugement ne valide l'accusation de la première, il est difficile de savoir ce qui s'est réellement passé.

La présomption d'innocence est un concept que l'on a tendance à oublier, tant les médias et les réseaux sociaux se nourrissent de l'idée qu'il n'y a pas de fumée sans feu et que l'accusé est donc très probablement coupable, a priori. Il est plus facile de s'indigner, automatiquement, que d'utiliser son sens critique. Cette tendance est dangereuse. Comme le suggère Bari Weiss, ne perdons pas notre capacité à écouter, à donner la parole, mais aussi à vérifier les sources, à suspendre notre jugement, beaucoup trop souvent hâtif !

En effet, certaines personnes sont des victimes et il s'agit de les défendre, mais d'autres cherchent simplement à nuire ou à tirer profit de la situation. Il existe aussi un phénomène pervers, moins connu, celui de la mémoire fictive. Se souvenir de quelque chose qui ne s'est jamais passé, cela semble aberrant lorsque l'on parle de viol ou d'abus sexuel, mais il est prouvé que cela est possible.

Un autre problème - et je suis content que David et Tamler, du podcast Very Bad Wizards, aient insisté sur ce point - c'est que, dans ce débat, il y a des nuances à garder en tête. Des nuances que les réseaux sociaux (Twitter, en particulier) supportent assez mal. Un homme qui oblige une femme à le regarder en train de se masturber, c'est grave et c'est inacceptable, mais c'est aussi moins grave qu'un homme qui drogue et qui viole une femme. Le problème, comme le soulignent David et Tamler, c'est que nous sommes très mauvais lorsqu'il s'agit d'adapter nos réactions à ces nuances. Le plus simple, et c'est ce que font beaucoup de gens, est de refuser cette nuance et de mettre tous les cas dans le même panier.

Enfin, un phénomène qui fait que le cas de Louis CK est difficile à avaler pour moi est qu'il est plus ou moins difficile de séparer l'artiste et l'œuvre selon le type d'œuvre dont on parle. Il est beaucoup plus simple de faire abstraction de l'artiste lorsque celui-ci n'est pas présent dans son œuvre (par exemple un peintre ou un réalisateur qui ne jouerait pas dans son film). A l'inverse, ce processus de distanciation est beaucoup plus compliqué lorsque l'on parle d'un acteur et, a fortiori, d'un humoriste tel que Louis CK, qui jouera toujours un rôle, certes, mais beaucoup plus inspiré par son caractère et son expérience personnelle que dans le contexte d'un film, par exemple.

Au final, je ne ressens pas le besoin de boycotter Louis CK. Je trouve cela irrationnel. Mais je ne ressens pas non plus l'envie de regarder quoi que ce soit de lui. Je repense aux épisodes de Louie qui m'ont particulièrement touché. Ceux qui m'ont bouleversé, comme je l'écrivais. Pour l'instant, dans le contexte actuel, cela me semblerait étrange de les regarder à nouveau. Il me faudra du temps. Du temps pour accepter l'idée que Louis CK est un être sensible, poète, drôle, mais aussi un être trouble, malade, que le pouvoir a perverti, comme tant d'autres. Bref, il me faudra du temps pour accepter la nuance.