ROC game

by Richard in 
javascript games

Following on from my previous post in which I included an animation, I wondered whether it was possible to embed more complicated scripts in a Jekyll blog post, which would be useful, for example, when creating interactive graphics. As an experiment, I came up with a simple game.

This game is designed to illustrate the definition of the ROC curve.

Motivated by the traditional application of the ROC curve to radar, your goal is to shoot down the grey planes and not to shoot down the green planes. Unfortunately, your gunners are not perfect. You can control how aggressive they are by moving the slider. The balance between the 20 most recent grey and green planes is shown in the ROC diagram.

Your aim is to get the red dot as close to the northwest corner of the ROC space as possible. If the red dot reaches the point (0,1), you will win the game! (this is guaranteed to happen eventually).

Comments: 1. In this game, there are always the same number of good and bad planes. In practice, the ROC curve and related concepts are often very useful for measuring the performance of a classifier when the classes are unbalanced. However, if the bad planes were very rare, the game would be even less interesting to play. 2. Although this game is just a light-hearted way to illustrate the concepts of true and false positives/negatives, serious issues can hinge upon them. For example, this article about biased algorithms is quite interesting and relevant.

© Data Science Confidential 2018 All rights reserved.