{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "https://github.com/christopherjenness/NBA-prediction\n", "https://github.com/fastai/courses/blob/master/deeplearning1/nbs/utils.py" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Using TensorFlow backend.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "CPython 3.5.3\n", "IPython 5.1.0\n", "\n", "numpy 1.11.3\n", "pandas 0.19.2\n", "keras 1.2.0\n", "tensorflow 0.10.0rc0\n", "\n", "compiler : GCC 4.4.7 20120313 (Red Hat 4.4.7-1)\n", "system : Linux\n", "release : 4.4.0-72-generic\n", "machine : x86_64\n", "processor : x86_64\n", "CPU cores : 4\n", "interpreter: 64bit\n", "Git hash : 72c5182d31686b9c85995ce2b433353f418c2b9d\n" ] } ], "source": [ "%load_ext watermark\n", "%watermark -v -m -p numpy,pandas,keras,tensorflow -g" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd\n", "\n", "df = pd.read_pickle('./2016_scores.pkl')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | away_score | \n", "away_team | \n", "home_score | \n", "home_team | \n", "difference | \n", "
---|---|---|---|---|---|
0 | \n", "5 | \n", "Toronto Blue Jays | \n", "3 | \n", "Tampa Bay Rays | \n", "-2 | \n", "
1 | \n", "1 | \n", "St. Louis Cardinals | \n", "4 | \n", "Pittsburgh Pirates | \n", "3 | \n", "
2 | \n", "3 | \n", "New York Mets | \n", "4 | \n", "Kansas City Royals | \n", "1 | \n", "
3 | \n", "2 | \n", "Seattle Mariners | \n", "3 | \n", "Texas Rangers | \n", "1 | \n", "
4 | \n", "5 | \n", "Toronto Blue Jays | \n", "3 | \n", "Tampa Bay Rays | \n", "-2 | \n", "