Skip to content

Commit

Permalink
added atomic-spadl and atomic-vaep functionality along with example n…
Browse files Browse the repository at this point in the history
…otebooks
  • Loading branch information
Tom Decroos committed Jun 15, 2020
1 parent 8a66f38 commit fb61108
Show file tree
Hide file tree
Showing 20 changed files with 3,863 additions and 1,819 deletions.
114 changes: 62 additions & 52 deletions public-notebooks/1-load-and-convert-statsbomb-data.ipynb

Large diffs are not rendered by default.

24 changes: 16 additions & 8 deletions public-notebooks/2-compute-features-and-labels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,26 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The history saving thread hit an unexpected error (DatabaseError('database disk image is malformed',)).History will not be written to the database.\n"
]
}
],
"source": [
"%load_ext autoreload\n",
"%autoreload 2\n",
"import os; import sys; sys.path.insert(0,'../')\n",
"import os;\n",
"import pandas as pd\n",
"import tqdm\n",
"import warnings\n",
"warnings.simplefilter(action='ignore', category=pd.errors.PerformanceWarning)\n",
"\n",
"import socceraction.classification.features as fs\n",
"import socceraction.classification.labels as lab"
"import socceraction.vaep.features as fs\n",
"import socceraction.vaep.labels as lab"
]
},
{
Expand All @@ -25,7 +33,7 @@
"outputs": [],
"source": [
"## Configure file and folder names\n",
"datafolder = \"../data\"\n",
"datafolder = \"../data-fifa\"\n",
"spadl_h5 = os.path.join(datafolder,\"spadl-statsbomb.h5\")\n",
"features_h5 = os.path.join(datafolder,\"features.h5\")\n",
"labels_h5 = os.path.join(datafolder,\"labels.h5\")"
Expand Down Expand Up @@ -63,7 +71,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Generating and storing features in ../data/features.h5: 100%|██████████| 64/64 [00:29<00:00, 2.14it/s]\n"
"Generating and storing features in ../data-fifa/features.h5: 100%|██████████| 64/64 [00:21<00:00, 2.92it/s]\n"
]
}
],
Expand Down Expand Up @@ -110,7 +118,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Computing and storing labels in ../data/labels.h5: 100%|██████████| 64/64 [00:12<00:00, 5.28it/s]\n"
"Computing and storing labels in ../data-fifa/labels.h5: 100%|██████████| 64/64 [00:10<00:00, 5.93it/s]\n"
]
}
],
Expand Down Expand Up @@ -147,7 +155,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.6.6"
},
"varInspector": {
"cols": {
Expand Down
223 changes: 178 additions & 45 deletions public-notebooks/3-estimate-scoring-and-conceding-probabilities.ipynb

Large diffs are not rendered by default.

0 comments on commit fb61108

Please sign in to comment.