rustat-python-api 0.5.7__tar.gz → 0.5.8__tar.gz
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.
- {rustat-python-api-0.5.7/rustat_python_api.egg-info → rustat-python-api-0.5.8}/PKG-INFO +1 -1
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api/pitch_control.py +7 -5
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8/rustat_python_api.egg-info}/PKG-INFO +1 -1
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/setup.py +1 -1
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/LICENSE +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/README.md +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/pyproject.toml +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api/__init__.py +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api/config.py +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api/models_api.py +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api/parser.py +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api/processing.py +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api/urls.py +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api.egg-info/SOURCES.txt +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api.egg-info/dependency_links.txt +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api.egg-info/requires.txt +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api.egg-info/top_level.txt +0 -0
- {rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/setup.cfg +0 -0
|
@@ -148,7 +148,8 @@ class PitchControl:
|
|
|
148
148
|
location: np.ndarray,
|
|
149
149
|
time_index: int,
|
|
150
150
|
home_or_away: str,
|
|
151
|
-
half: int
|
|
151
|
+
half: int,
|
|
152
|
+
verbose: bool = False
|
|
152
153
|
):
|
|
153
154
|
if home_or_away == 'h':
|
|
154
155
|
data = self.locs_home[half].copy()
|
|
@@ -193,11 +194,12 @@ class PitchControl:
|
|
|
193
194
|
Sigma = np.matmul(Sigma, np.linalg.inv(R)) ## this is not efficient, forgive me.
|
|
194
195
|
out = mvn.pdf(location, mu, Sigma) / mvn.pdf(data[player_index][time_index, :], mu, Sigma)
|
|
195
196
|
else:
|
|
196
|
-
|
|
197
|
+
if verbose:
|
|
198
|
+
print("Data is not finite.")
|
|
197
199
|
out = np.zeros(location.shape[0])
|
|
198
200
|
return out
|
|
199
201
|
|
|
200
|
-
def fit(self, half: int, tp: int, dt: int) -> tuple:
|
|
202
|
+
def fit(self, half: int, tp: int, dt: int, verbose: bool = False) -> tuple:
|
|
201
203
|
x = np.linspace(0, 105, dt)
|
|
202
204
|
y = np.linspace(0, 68, dt)
|
|
203
205
|
xx, yy = np.meshgrid(x, y)
|
|
@@ -209,10 +211,10 @@ class PitchControl:
|
|
|
209
211
|
|
|
210
212
|
for k in self.locs_home[half].keys():
|
|
211
213
|
# if len(self.locs_home[half][k]) >= tp:
|
|
212
|
-
Zh += self.influence_function(k, locations, tp, 'h', half)
|
|
214
|
+
Zh += self.influence_function(k, locations, tp, 'h', half, verbose)
|
|
213
215
|
for k in self.locs_away[half].keys():
|
|
214
216
|
# if len(self.locs_away[half][k]) >= tp:
|
|
215
|
-
Za += self.influence_function(k, locations, tp, 'a', half)
|
|
217
|
+
Za += self.influence_function(k, locations, tp, 'a', half, verbose)
|
|
216
218
|
|
|
217
219
|
Zh = Zh.reshape((dt, dt))
|
|
218
220
|
Za = Za.reshape((dt, dt))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rustat-python-api-0.5.7 → rustat-python-api-0.5.8}/rustat_python_api.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|