rustat-python-api 0.9.0__py3-none-any.whl → 0.9.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -461,14 +461,6 @@ class PitchControl:
461
461
  else:
462
462
  Sigma_inv = torch.linalg.inv(Sigma + eye)
463
463
 
464
- # Mask out invalid players by zeroing their Sigma_inv
465
- # This ensures their influence contribution is exactly 0
466
- Sigma_inv = torch.where(
467
- valid_mask.unsqueeze(-1).unsqueeze(-1), # (F,P,1,1)
468
- Sigma_inv,
469
- torch.zeros_like(Sigma_inv),
470
- )
471
-
472
464
  mu = pos_t_clean + 0.5 * sxy # (F,P,2)
473
465
 
474
466
  diff = locs.view(1, 1, -1, 2) # (1,1,N,2)
@@ -483,6 +475,13 @@ class PitchControl:
483
475
  maha = torch.nan_to_num(maha, nan=1e9, posinf=1e9, neginf=1e9)
484
476
  out = torch.exp(-0.5 * maha) # (F,P,N)
485
477
 
478
+ # Zero out invalid players (exp(0)=1 would inflate influence)
479
+ out = torch.where(
480
+ valid_mask.unsqueeze(-1), # (F,P,1)
481
+ out,
482
+ torch.zeros_like(out),
483
+ )
484
+
486
485
  return out.sum(dim=1) # sum over players
487
486
 
488
487
  @staticmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rustat-python-api
3
- Version: 0.9.0
3
+ Version: 0.9.1
4
4
  Summary: A Python wrapper for RuStat API
5
5
  Home-page: https://github.com/dailydaniel/rustat-python-api
6
6
  Author: Daniel Zholkovsky
@@ -2,7 +2,7 @@ rustat_python_api/__init__.py,sha256=Ij-PAm2y5ss_XAZhKTZus35cRPLzvXFyIswDa_Iq3rs
2
2
  rustat_python_api/config.py,sha256=eMvi1p8Cfvnbp6Cd4bBOwgehVN7thKnaQV5uzWyGZXM,1844
3
3
  rustat_python_api/models_api.py,sha256=oHXEqeCupvZwjVEdoxf7W9LP7ELFKA8-9DuRXpQHLno,1701
4
4
  rustat_python_api/parser.py,sha256=hMPZER6CwPk_dm8GkLulq6G0_jwOyRiZjbbDw3eO1Rc,10863
5
- rustat_python_api/pitch_control.py,sha256=XSakx2KxDAvv17qFoBtsBBIEYGn3OqI_3q3Xfq3_OoA,31688
5
+ rustat_python_api/pitch_control.py,sha256=SCef50coXfkZUmfQJbgHurmwmh3_GWwvpFas1X5QwP8,31621
6
6
  rustat_python_api/processing.py,sha256=sjZdjSs2BKyM_f7T_Utu1CJSF1l-V8UsWrAj7dhqyNg,2930
7
7
  rustat_python_api/urls.py,sha256=iJTD31T6OyXPAhmhViwFXVehrzwsOjBDONA1SIVc_40,1068
8
8
  rustat_python_api/kernels/__init__.py,sha256=eFJ-BMY8VcNZSjf3XjOnZf_nfOQ5t-7Lp57DPCHYOo0,124
@@ -11,8 +11,8 @@ rustat_python_api/matching/__init__.py,sha256=QIqkft_NVban8p0rxJsim3x4defZN3eQBq
11
11
  rustat_python_api/matching/dataloader.py,sha256=FZ95ZC5Z-6FrZEVy-d5S1rXt5nIBwYMqTT0hvFlc4mI,2753
12
12
  rustat_python_api/matching/pc_adder.py,sha256=oP84iplIqmqF1jFDN9ernkjKw7wgsmWbuOVPEsoTNWM,7582
13
13
  rustat_python_api/matching/tr_adder.py,sha256=0sAjYfoLitScDhg2yjh2PIKWTseoaSeUa5chPnVau-Q,16025
14
- rustat_python_api-0.9.0.dist-info/LICENSE,sha256=4Cohqg5p6Mq1xyrzdEX8AvFSA62GSVvapEOr2xK_tgY,57
15
- rustat_python_api-0.9.0.dist-info/METADATA,sha256=9_I5OFJ6m9tWDX4g5elAfjNgXpAIbLyJ6kdrVHEm9aE,1920
16
- rustat_python_api-0.9.0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
17
- rustat_python_api-0.9.0.dist-info/top_level.txt,sha256=VK0hmkKZE9YThxolUcoE6JtGI67NFeKJMBLuet8kI4w,18
18
- rustat_python_api-0.9.0.dist-info/RECORD,,
14
+ rustat_python_api-0.9.1.dist-info/LICENSE,sha256=4Cohqg5p6Mq1xyrzdEX8AvFSA62GSVvapEOr2xK_tgY,57
15
+ rustat_python_api-0.9.1.dist-info/METADATA,sha256=LYy7zRsQOHNNVbPGmsZZ12iMj9Pn1UZ1gE3-NhUG2FM,1920
16
+ rustat_python_api-0.9.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
17
+ rustat_python_api-0.9.1.dist-info/top_level.txt,sha256=VK0hmkKZE9YThxolUcoE6JtGI67NFeKJMBLuet8kI4w,18
18
+ rustat_python_api-0.9.1.dist-info/RECORD,,