Skip to content

Commit d37dd4d

Browse files
author
UnravelSports [JB]
committed
rm [skip ci]
1 parent 93868a8 commit d37dd4d

File tree

4 files changed

+64
-45
lines changed

4 files changed

+64
-45
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ kloppy_polars_dataset = KloppyPolarsDataset(
3737
kloppy_dataset=kloppy_dataset
3838
)
3939
```
40+
| | period_id | timestamp | frame_id | ball_state | id | x | y | z | team_id | position_name | game_id | vx | vy | vz | v | ax | ay | az | a | ball_owning_team_id | is_ball_carrier |
41+
|---:|------------:|:----------------|-----------:|:-------------|:---------------|-------:|------:|----:|:---------------|:----------------|:---------------|-------:|-------:|-----:|------:|-----:|-----:|-----:|----:|:----------------------|:------------------|
42+
| 0 | 1 | 0 days 00:00:00 | 10000 | alive | DFL-OBJ-00008F | -20.67 | -4.56 | 0 | DFL-CLU-000005 | RCB | DFL-MAT-J03WPY | 0.393 | -0.214 | 0 | 0.447 | 0 | 0 | 0 | 0 | DFL-CLU-00000P | False |
43+
| 1 | 1 | 0 days 00:00:00 | 10000 | alive | DFL-OBJ-0000EJ | -8.86 | -0.94 | 0 | DFL-CLU-000005 | UNK | DFL-MAT-J03WPY | -0.009 | 0.018 | 0 | 0.02 | 0 | 0 | 0 | 0 | DFL-CLU-00000P | False |
44+
| 2 | 1 | 0 days 00:00:00 | 10000 | alive | DFL-OBJ-0000F8 | -2.12 | 9.85 | 0 | DFL-CLU-00000P | RM | DFL-MAT-J03WPY | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | DFL-CLU-00000P | False |
45+
| 3 | 1 | 0 days 00:00:00 | 10000 | alive | DFL-OBJ-0000NZ | 0.57 | 23.23 | 0 | DFL-CLU-00000P | RB | DFL-MAT-J03WPY | 0.179 | -0.134 | 0 | 0.223 | 0 | 0 | 0 | 0 | DFL-CLU-00000P | False |
46+
| 4 | 1 | 0 days 00:00:00 | 10000 | alive | DFL-OBJ-0001HW | -46.26 | 0.08 | 0 | DFL-CLU-000005 | GK | DFL-MAT-J03WPY | 0.357 | 0.071 | 0 | 0.364 | 0 | 0 | 0 | 0 | DFL-CLU-00000P | False |
47+
4048

4149
$^1$ <small>Open data available through kloppy.</small>
4250

examples/0_quick_start_guide.ipynb

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,20 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": null,
39+
"execution_count": 1,
4040
"metadata": {},
41-
"outputs": [],
41+
"outputs": [
42+
{
43+
"name": "stdout",
44+
"output_type": "stream",
45+
"text": [
46+
"\n",
47+
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m25.0.1\u001b[0m\n",
48+
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n",
49+
"Note: you may need to restart the kernel to use updated packages.\n"
50+
]
51+
}
52+
],
4253
"source": [
4354
"%pip install unravelsports --quiet"
4455
]
@@ -57,7 +68,7 @@
5768
},
5869
{
5970
"cell_type": "code",
60-
"execution_count": null,
71+
"execution_count": 2,
6172
"metadata": {},
6273
"outputs": [],
6374
"source": [
@@ -93,7 +104,7 @@
93104
},
94105
{
95106
"cell_type": "code",
96-
"execution_count": 109,
107+
"execution_count": 3,
97108
"metadata": {},
98109
"outputs": [],
99110
"source": [
@@ -118,7 +129,7 @@
118129
},
119130
{
120131
"cell_type": "code",
121-
"execution_count": 110,
132+
"execution_count": 4,
122133
"metadata": {},
123134
"outputs": [
124135
{
@@ -155,7 +166,7 @@
155166
},
156167
{
157168
"cell_type": "code",
158-
"execution_count": 111,
169+
"execution_count": 5,
159170
"metadata": {},
160171
"outputs": [
161172
{
@@ -177,9 +188,9 @@
177188
"name": "stdout",
178189
"output_type": "stream",
179190
"text": [
180-
"11/11 [==============================] - 1s 17ms/step - loss: 83.5579 - auc_10: 0.5369 - binary_accuracy: 0.5419 - val_loss: 15.6364 - val_auc_10: 0.5000 - val_binary_accuracy: 0.4762\n",
191+
"11/11 [==============================] - 1s 16ms/step - loss: 21.7806 - auc: 0.5278 - binary_accuracy: 0.5419 - val_loss: 5.1682 - val_auc: 0.5000 - val_binary_accuracy: 0.5000\n",
181192
"Epoch 2/10\n",
182-
" 1/11 [=>............................] - ETA: 0s - loss: 60.3926 - auc_10: 0.5569 - binary_accuracy: 0.5625WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 3 batches). You may need to use the repeat() function when building your dataset.\n"
193+
" 1/11 [=>............................] - ETA: 0s - loss: 9.2846 - auc: 0.3651 - binary_accuracy: 0.5000WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 3 batches). You may need to use the repeat() function when building your dataset.\n"
183194
]
184195
},
185196
{
@@ -193,32 +204,32 @@
193204
"name": "stdout",
194205
"output_type": "stream",
195206
"text": [
196-
"11/11 [==============================] - 0s 6ms/step - loss: 32.2668 - auc_10: 0.5139 - binary_accuracy: 0.5120\n",
207+
"11/11 [==============================] - 0s 6ms/step - loss: 4.5155 - auc: 0.5366 - binary_accuracy: 0.5449\n",
197208
"Epoch 3/10\n",
198-
"11/11 [==============================] - 0s 5ms/step - loss: 10.2167 - auc_10: 0.5079 - binary_accuracy: 0.5030\n",
209+
"11/11 [==============================] - 0s 4ms/step - loss: 2.0773 - auc: 0.4515 - binary_accuracy: 0.4731\n",
199210
"Epoch 4/10\n",
200-
"11/11 [==============================] - 0s 5ms/step - loss: 4.3491 - auc_10: 0.4934 - binary_accuracy: 0.4940\n",
211+
"11/11 [==============================] - 0s 5ms/step - loss: 1.1006 - auc: 0.5205 - binary_accuracy: 0.5150\n",
201212
"Epoch 5/10\n",
202-
"11/11 [==============================] - 0s 5ms/step - loss: 2.4990 - auc_10: 0.4782 - binary_accuracy: 0.4910\n",
213+
"11/11 [==============================] - 0s 4ms/step - loss: 0.9159 - auc: 0.4915 - binary_accuracy: 0.5180\n",
203214
"Epoch 6/10\n",
204-
"11/11 [==============================] - 0s 5ms/step - loss: 1.7516 - auc_10: 0.4798 - binary_accuracy: 0.4850\n",
215+
"11/11 [==============================] - 0s 5ms/step - loss: 0.8020 - auc: 0.4873 - binary_accuracy: 0.5060\n",
205216
"Epoch 7/10\n",
206-
"11/11 [==============================] - 0s 5ms/step - loss: 1.1898 - auc_10: 0.5383 - binary_accuracy: 0.5240\n",
217+
"11/11 [==============================] - 0s 4ms/step - loss: 0.8067 - auc: 0.4960 - binary_accuracy: 0.5299\n",
207218
"Epoch 8/10\n",
208-
"11/11 [==============================] - 0s 5ms/step - loss: 1.1877 - auc_10: 0.4917 - binary_accuracy: 0.5060\n",
219+
"11/11 [==============================] - 0s 6ms/step - loss: 0.7808 - auc: 0.5055 - binary_accuracy: 0.5299\n",
209220
"Epoch 9/10\n",
210-
"11/11 [==============================] - 0s 5ms/step - loss: 1.0447 - auc_10: 0.5133 - binary_accuracy: 0.5150\n",
221+
"11/11 [==============================] - 0s 4ms/step - loss: 0.7661 - auc: 0.4937 - binary_accuracy: 0.5060\n",
211222
"Epoch 10/10\n",
212-
"11/11 [==============================] - 0s 4ms/step - loss: 0.9795 - auc_10: 0.5214 - binary_accuracy: 0.5090\n"
223+
"11/11 [==============================] - 0s 5ms/step - loss: 0.7406 - auc: 0.5098 - binary_accuracy: 0.5329\n"
213224
]
214225
},
215226
{
216227
"data": {
217228
"text/plain": [
218-
"<keras.src.callbacks.History at 0x3b2b55c90>"
229+
"<keras.src.callbacks.History at 0x39fe49d10>"
219230
]
220231
},
221-
"execution_count": 111,
232+
"execution_count": 5,
222233
"metadata": {},
223234
"output_type": "execute_result"
224235
}
@@ -256,14 +267,14 @@
256267
},
257268
{
258269
"cell_type": "code",
259-
"execution_count": 112,
270+
"execution_count": 6,
260271
"metadata": {},
261272
"outputs": [
262273
{
263274
"name": "stdout",
264275
"output_type": "stream",
265276
"text": [
266-
"3/3 [==============================] - 0s 6ms/step - loss: 0.6905 - auc_10: 0.5000 - binary_accuracy: 0.5422\n"
277+
"3/3 [==============================] - 0s 6ms/step - loss: 0.7001 - auc: 0.5000 - binary_accuracy: 0.4819\n"
267278
]
268279
}
269280
],
@@ -285,7 +296,7 @@
285296
},
286297
{
287298
"cell_type": "code",
288-
"execution_count": 113,
299+
"execution_count": 7,
289300
"metadata": {},
290301
"outputs": [
291302
{

examples/1_kloppy_gnn_train.ipynb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,9 @@
602602
"name": "stdout",
603603
"output_type": "stream",
604604
"text": [
605-
"32/32 [==============================] - 1s 9ms/step - loss: 18.2753 - auc: 0.4842 - binary_accuracy: 0.4910 - val_loss: 1.1902 - val_auc: 0.5000 - val_binary_accuracy: 0.5110\n",
605+
"32/32 [==============================] - 1s 9ms/step - loss: 51.8502 - auc: 0.5028 - binary_accuracy: 0.5070 - val_loss: 2.7810 - val_auc: 0.5000 - val_binary_accuracy: 0.4890\n",
606606
"Epoch 2/5\n",
607-
"27/32 [========================>.....] - ETA: 0s - loss: 2.3954 - auc: 0.4491 - binary_accuracy: 0.4688WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 16 batches). You may need to use the repeat() function when building your dataset.\n"
607+
"24/32 [=====================>........] - ETA: 0s - loss: 3.4147 - auc: 0.4748 - binary_accuracy: 0.4844WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 16 batches). You may need to use the repeat() function when building your dataset.\n"
608608
]
609609
},
610610
{
@@ -618,19 +618,19 @@
618618
"name": "stdout",
619619
"output_type": "stream",
620620
"text": [
621-
"32/32 [==============================] - 0s 5ms/step - loss: 2.2277 - auc: 0.4564 - binary_accuracy: 0.4701\n",
621+
"32/32 [==============================] - 0s 5ms/step - loss: 2.9913 - auc: 0.4802 - binary_accuracy: 0.4880\n",
622622
"Epoch 3/5\n",
623-
"32/32 [==============================] - 0s 5ms/step - loss: 1.1351 - auc: 0.4960 - binary_accuracy: 0.4890\n",
623+
"32/32 [==============================] - 0s 5ms/step - loss: 1.2031 - auc: 0.4915 - binary_accuracy: 0.4930\n",
624624
"Epoch 4/5\n",
625-
"32/32 [==============================] - 0s 5ms/step - loss: 0.9408 - auc: 0.4967 - binary_accuracy: 0.4810\n",
625+
"32/32 [==============================] - 0s 4ms/step - loss: 0.9734 - auc: 0.5014 - binary_accuracy: 0.4950\n",
626626
"Epoch 5/5\n",
627-
"32/32 [==============================] - 0s 5ms/step - loss: 0.9048 - auc: 0.4874 - binary_accuracy: 0.4850\n"
627+
"32/32 [==============================] - 0s 4ms/step - loss: 0.8367 - auc: 0.4898 - binary_accuracy: 0.4750\n"
628628
]
629629
},
630630
{
631631
"data": {
632632
"text/plain": [
633-
"<keras.src.callbacks.History at 0x34fd56dd0>"
633+
"<keras.src.callbacks.History at 0x359511d50>"
634634
]
635635
},
636636
"execution_count": 10,
@@ -713,7 +713,7 @@
713713
"name": "stdout",
714714
"output_type": "stream",
715715
"text": [
716-
"16/16 [==============================] - 0s 3ms/step - loss: 0.6929 - auc: 0.5000 - binary_accuracy: 0.5170\n"
716+
"16/16 [==============================] - 0s 3ms/step - loss: 0.7829 - auc: 0.5000 - binary_accuracy: 0.4830\n"
717717
]
718718
}
719719
],
@@ -736,7 +736,7 @@
736736
},
737737
{
738738
"cell_type": "code",
739-
"execution_count": 14,
739+
"execution_count": 13,
740740
"metadata": {},
741741
"outputs": [],
742742
"source": [
@@ -775,7 +775,7 @@
775775
},
776776
{
777777
"cell_type": "code",
778-
"execution_count": 15,
778+
"execution_count": 14,
779779
"metadata": {},
780780
"outputs": [
781781
{
@@ -809,7 +809,7 @@
809809
},
810810
{
811811
"cell_type": "code",
812-
"execution_count": 16,
812+
"execution_count": 15,
813813
"metadata": {},
814814
"outputs": [
815815
{
@@ -822,7 +822,7 @@
822822
" white-space: pre-wrap;\n",
823823
"}\n",
824824
"</style>\n",
825-
"<small>shape: (5, 4)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>frame_id</th><th>period_id</th><th>timestamp</th><th>y_hat</th></tr><tr><td>i64</td><td>i64</td><td>duration[μs]</td><td>f32</td></tr></thead><tbody><tr><td>10300</td><td>1</td><td>12s</td><td>0.566736</td></tr><tr><td>10301</td><td>1</td><td>12s 40ms</td><td>0.566736</td></tr><tr><td>10302</td><td>1</td><td>12s 80ms</td><td>0.566736</td></tr><tr><td>10303</td><td>1</td><td>12s 120ms</td><td>0.566736</td></tr><tr><td>10304</td><td>1</td><td>12s 160ms</td><td>0.566736</td></tr></tbody></table></div>"
825+
"<small>shape: (5, 4)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>frame_id</th><th>period_id</th><th>timestamp</th><th>y_hat</th></tr><tr><td>i64</td><td>i64</td><td>duration[μs]</td><td>f32</td></tr></thead><tbody><tr><td>10300</td><td>1</td><td>12s</td><td>0.991924</td></tr><tr><td>10301</td><td>1</td><td>12s 40ms</td><td>0.991924</td></tr><tr><td>10302</td><td>1</td><td>12s 80ms</td><td>0.991924</td></tr><tr><td>10303</td><td>1</td><td>12s 120ms</td><td>0.991924</td></tr><tr><td>10304</td><td>1</td><td>12s 160ms</td><td>0.991924</td></tr></tbody></table></div>"
826826
],
827827
"text/plain": [
828828
"shape: (5, 4)\n",
@@ -831,15 +831,15 @@
831831
"│ --- ┆ --- ┆ --- ┆ --- │\n",
832832
"│ i64 ┆ i64 ┆ duration[μs] ┆ f32 │\n",
833833
"╞══════════╪═══════════╪══════════════╪══════════╡\n",
834-
"│ 10300 ┆ 1 ┆ 12s ┆ 0.566736\n",
835-
"│ 10301 ┆ 1 ┆ 12s 40ms ┆ 0.566736\n",
836-
"│ 10302 ┆ 1 ┆ 12s 80ms ┆ 0.566736\n",
837-
"│ 10303 ┆ 1 ┆ 12s 120ms ┆ 0.566736\n",
838-
"│ 10304 ┆ 1 ┆ 12s 160ms ┆ 0.566736\n",
834+
"│ 10300 ┆ 1 ┆ 12s ┆ 0.991924\n",
835+
"│ 10301 ┆ 1 ┆ 12s 40ms ┆ 0.991924\n",
836+
"│ 10302 ┆ 1 ┆ 12s 80ms ┆ 0.991924\n",
837+
"│ 10303 ┆ 1 ┆ 12s 120ms ┆ 0.991924\n",
838+
"│ 10304 ┆ 1 ┆ 12s 160ms ┆ 0.991924\n",
839839
"└──────────┴───────────┴──────────────┴──────────┘"
840840
]
841841
},
842-
"execution_count": 16,
842+
"execution_count": 15,
843843
"metadata": {},
844844
"output_type": "execute_result"
845845
}

examples/pressing_intensity.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
},
9494
{
9595
"cell_type": "code",
96-
"execution_count": 2,
96+
"execution_count": 8,
9797
"metadata": {},
9898
"outputs": [],
9999
"source": [
@@ -125,7 +125,7 @@
125125
},
126126
{
127127
"cell_type": "code",
128-
"execution_count": 3,
128+
"execution_count": 9,
129129
"metadata": {},
130130
"outputs": [],
131131
"source": [
@@ -173,7 +173,7 @@
173173
},
174174
{
175175
"cell_type": "code",
176-
"execution_count": 4,
176+
"execution_count": 10,
177177
"metadata": {},
178178
"outputs": [
179179
{
@@ -226,7 +226,7 @@
226226
"└────────────┴───────────┴──────────┴────────────┴────────────┴────────────┴───────────┴───────────┘"
227227
]
228228
},
229-
"execution_count": 4,
229+
"execution_count": 10,
230230
"metadata": {},
231231
"output_type": "execute_result"
232232
}
@@ -265,7 +265,7 @@
265265
},
266266
{
267267
"cell_type": "code",
268-
"execution_count": 5,
268+
"execution_count": 11,
269269
"metadata": {},
270270
"outputs": [],
271271
"source": [

0 commit comments

Comments
 (0)