{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>type</th>\n",
       "      <th>name</th>\n",
       "      <th>yearpublished</th>\n",
       "      <th>minplayers</th>\n",
       "      <th>maxplayers</th>\n",
       "      <th>playingtime</th>\n",
       "      <th>minplaytime</th>\n",
       "      <th>maxplaytime</th>\n",
       "      <th>minage</th>\n",
       "      <th>users_rated</th>\n",
       "      <th>average_rating</th>\n",
       "      <th>bayes_average_rating</th>\n",
       "      <th>total_owners</th>\n",
       "      <th>total_traders</th>\n",
       "      <th>total_wanters</th>\n",
       "      <th>total_wishers</th>\n",
       "      <th>total_comments</th>\n",
       "      <th>total_weights</th>\n",
       "      <th>average_weight</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>12333</td>\n",
       "      <td>boardgame</td>\n",
       "      <td>Twilight Struggle</td>\n",
       "      <td>2005</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>180</td>\n",
       "      <td>180</td>\n",
       "      <td>180</td>\n",
       "      <td>13</td>\n",
       "      <td>20113</td>\n",
       "      <td>8.33774</td>\n",
       "      <td>8.22186</td>\n",
       "      <td>26647</td>\n",
       "      <td>372</td>\n",
       "      <td>1219</td>\n",
       "      <td>5865</td>\n",
       "      <td>5347</td>\n",
       "      <td>2562</td>\n",
       "      <td>3.4785</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>120677</td>\n",
       "      <td>boardgame</td>\n",
       "      <td>Terra Mystica</td>\n",
       "      <td>2012</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>150</td>\n",
       "      <td>60</td>\n",
       "      <td>150</td>\n",
       "      <td>12</td>\n",
       "      <td>14383</td>\n",
       "      <td>8.28798</td>\n",
       "      <td>8.14232</td>\n",
       "      <td>16519</td>\n",
       "      <td>132</td>\n",
       "      <td>1586</td>\n",
       "      <td>6277</td>\n",
       "      <td>2526</td>\n",
       "      <td>1423</td>\n",
       "      <td>3.8939</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>102794</td>\n",
       "      <td>boardgame</td>\n",
       "      <td>Caverna: The Cave Farmers</td>\n",
       "      <td>2013</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>210</td>\n",
       "      <td>30</td>\n",
       "      <td>210</td>\n",
       "      <td>12</td>\n",
       "      <td>9262</td>\n",
       "      <td>8.28994</td>\n",
       "      <td>8.06886</td>\n",
       "      <td>12230</td>\n",
       "      <td>99</td>\n",
       "      <td>1476</td>\n",
       "      <td>5600</td>\n",
       "      <td>1700</td>\n",
       "      <td>777</td>\n",
       "      <td>3.7761</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>25613</td>\n",
       "      <td>boardgame</td>\n",
       "      <td>Through the Ages: A Story of Civilization</td>\n",
       "      <td>2006</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>240</td>\n",
       "      <td>240</td>\n",
       "      <td>240</td>\n",
       "      <td>12</td>\n",
       "      <td>13294</td>\n",
       "      <td>8.20407</td>\n",
       "      <td>8.05804</td>\n",
       "      <td>14343</td>\n",
       "      <td>362</td>\n",
       "      <td>1084</td>\n",
       "      <td>5075</td>\n",
       "      <td>3378</td>\n",
       "      <td>1642</td>\n",
       "      <td>4.1590</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3076</td>\n",
       "      <td>boardgame</td>\n",
       "      <td>Puerto Rico</td>\n",
       "      <td>2002</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>150</td>\n",
       "      <td>90</td>\n",
       "      <td>150</td>\n",
       "      <td>12</td>\n",
       "      <td>39883</td>\n",
       "      <td>8.14261</td>\n",
       "      <td>8.04524</td>\n",
       "      <td>44362</td>\n",
       "      <td>795</td>\n",
       "      <td>861</td>\n",
       "      <td>5414</td>\n",
       "      <td>9173</td>\n",
       "      <td>5213</td>\n",
       "      <td>3.2943</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       id       type                                       name  \\\n",
       "0   12333  boardgame                          Twilight Struggle   \n",
       "1  120677  boardgame                              Terra Mystica   \n",
       "2  102794  boardgame                  Caverna: The Cave Farmers   \n",
       "3   25613  boardgame  Through the Ages: A Story of Civilization   \n",
       "4    3076  boardgame                                Puerto Rico   \n",
       "\n",
       "   yearpublished  minplayers  maxplayers  playingtime  minplaytime  \\\n",
       "0           2005           2           2          180          180   \n",
       "1           2012           2           5          150           60   \n",
       "2           2013           1           7          210           30   \n",
       "3           2006           2           4          240          240   \n",
       "4           2002           2           5          150           90   \n",
       "\n",
       "   maxplaytime  minage  users_rated  average_rating  bayes_average_rating  \\\n",
       "0          180      13        20113         8.33774               8.22186   \n",
       "1          150      12        14383         8.28798               8.14232   \n",
       "2          210      12         9262         8.28994               8.06886   \n",
       "3          240      12        13294         8.20407               8.05804   \n",
       "4          150      12        39883         8.14261               8.04524   \n",
       "\n",
       "   total_owners  total_traders  total_wanters  total_wishers  total_comments  \\\n",
       "0         26647            372           1219           5865            5347   \n",
       "1         16519            132           1586           6277            2526   \n",
       "2         12230             99           1476           5600            1700   \n",
       "3         14343            362           1084           5075            3378   \n",
       "4         44362            795            861           5414            9173   \n",
       "\n",
       "   total_weights  average_weight  \n",
       "0           2562          3.4785  \n",
       "1           1423          3.8939  \n",
       "2            777          3.7761  \n",
       "3           1642          4.1590  \n",
       "4           5213          3.2943  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas\n",
    "\n",
    "board_games = pandas.read_csv(\"board_games.csv\")\n",
    "board_games = board_games.dropna(axis=0)\n",
    "board_games = board_games[board_games[\"users_rated\"] > 0]\n",
    "\n",
    "board_games.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([   602.,   1231.,   2824.,   5206.,   8223.,  13593.,  13849.,\n",
       "          8470.,   2224.,    672.]),\n",
       " array([  1. ,   1.9,   2.8,   3.7,   4.6,   5.5,   6.4,   7.3,   8.2,\n",
       "          9.1,  10. ]),\n",
       " <a list of 10 Patch objects>)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1039faf98>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.hist(board_games[\"average_rating\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.57882993483\n",
      "6.01611284933\n"
     ]
    }
   ],
   "source": [
    "print(board_games[\"average_rating\"].std())\n",
    "print(board_games[\"average_rating\"].mean())\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Error metric\n",
    "\n",
    "In this data set, using mean squared error as an error metric makes sense.  This is because the data is continuous, and follows a somewhat normal distribution.  We'll be able to compare our error to the standard deviation to see how good the model is at predictions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "KMeans(copy_x=True, init='k-means++', max_iter=300, n_clusters=5, n_init=10,\n",
       "    n_jobs=1, precompute_distances=True, random_state=None, tol=0.0001,\n",
       "    verbose=0)"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.cluster import KMeans\n",
    "\n",
    "clus = KMeans(n_clusters=5)\n",
    "cols = list(board_games.columns)\n",
    "cols.remove(\"name\")\n",
    "cols.remove(\"id\")\n",
    "cols.remove(\"type\")\n",
    "numeric = board_games[cols]\n",
    "\n",
    "clus.fit(numeric)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import numpy\n",
    "game_mean = numeric.apply(numpy.mean, axis=1)\n",
    "game_std = numeric.apply(numpy.std, axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x10b5516d8>"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n",
       "nCvI/wPHlKEPLEczaAAAAABJRU5ErkJggg==\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10b4b26d8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "labels = clus.labels_\n",
    "\n",
    "plt.scatter(x=game_mean, y=game_std, c=labels)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Game clusters\n",
    "\n",
    "It looks like most of the games are similar, but as the game attributes tend to increase in value (such as number of users who rated), there are fewer high quality games.  So most games don't get played much, but a few get a lot of players."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "yearpublished           0.108461\n",
       "minplayers             -0.032701\n",
       "maxplayers             -0.008335\n",
       "playingtime             0.048994\n",
       "minplaytime             0.043985\n",
       "maxplaytime             0.048994\n",
       "minage                  0.210049\n",
       "users_rated             0.112564\n",
       "average_rating          1.000000\n",
       "bayes_average_rating    0.231563\n",
       "total_owners            0.137478\n",
       "total_traders           0.119452\n",
       "total_wanters           0.196566\n",
       "total_wishers           0.171375\n",
       "total_comments          0.123714\n",
       "total_weights           0.109691\n",
       "average_weight          0.351081\n",
       "Name: average_rating, dtype: float64"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "correlations = numeric.corr()\n",
    "\n",
    "correlations[\"average_rating\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Correlations\n",
    "\n",
    "The `yearpublished` column is surprisingly highly correlated with `average_rating`, showing that more recent games tend to be rated more highly.  Games for older players (`minage` is high) tend to be more highly rated.  The more \"weighty\" a game is (`average_weight` is high), the more highly it tends to be rated."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.0933969758339361"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LinearRegression\n",
    "\n",
    "reg = LinearRegression()\n",
    "cols.remove(\"average_rating\")\n",
    "cols.remove(\"bayes_average_rating\")\n",
    "reg.fit(board_games[cols], board_games[\"average_rating\"])\n",
    "predictions = reg.predict(board_games[cols])\n",
    "\n",
    "numpy.mean((predictions - board_games[\"average_rating\"]) ** 2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Game clusters\n",
    "\n",
    "The error rate is close to the standard deviation of all board game ratings.  This indicates that our model may not have high predictive power.  We'll need to dig more into which games were scored well, and which ones weren't."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
