spforge 0.8.31__py3-none-any.whl → 0.8.32__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.
- spforge/scorer/_score.py +2 -4
- {spforge-0.8.31.dist-info → spforge-0.8.32.dist-info}/METADATA +1 -1
- {spforge-0.8.31.dist-info → spforge-0.8.32.dist-info}/RECORD +7 -7
- tests/scorer/test_scorer_name.py +13 -0
- {spforge-0.8.31.dist-info → spforge-0.8.32.dist-info}/WHEEL +0 -0
- {spforge-0.8.31.dist-info → spforge-0.8.32.dist-info}/licenses/LICENSE +0 -0
- {spforge-0.8.31.dist-info → spforge-0.8.32.dist-info}/top_level.txt +0 -0
spforge/scorer/_score.py
CHANGED
|
@@ -388,16 +388,14 @@ class BaseScorer(ABC):
|
|
|
388
388
|
return re.sub(r'[^a-zA-Z0-9_]', '_', name)
|
|
389
389
|
|
|
390
390
|
def _count_user_filters(self) -> int:
|
|
391
|
-
"""Count filters excluding
|
|
391
|
+
"""Count filters excluding any filter on validation column."""
|
|
392
392
|
if not self.filters:
|
|
393
393
|
return 0
|
|
394
394
|
if self.validation_column is None:
|
|
395
395
|
return len(self.filters)
|
|
396
396
|
count = 0
|
|
397
397
|
for f in self.filters:
|
|
398
|
-
if
|
|
399
|
-
f.operator == Operator.EQUALS and
|
|
400
|
-
f.value == 1):
|
|
398
|
+
if f.column_name != self.validation_column:
|
|
401
399
|
count += 1
|
|
402
400
|
return count
|
|
403
401
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spforge
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.32
|
|
4
4
|
Summary: A flexible framework for generating features, ratings, and building machine learning or other models for training and inference on sports data.
|
|
5
5
|
Author-email: Mathias Holmstrøm <mathiasholmstom@gmail.com>
|
|
6
6
|
License: See LICENSE file
|
|
@@ -62,7 +62,7 @@ spforge/ratings/team_performance_predictor.py,sha256=ThQOmYQUqKBB46ONYHOMM2arXFH
|
|
|
62
62
|
spforge/ratings/team_start_rating_generator.py,sha256=vK-_m8KwcHopchch_lKNHSGLiiNm5q9Lenm0d1cP_po,5110
|
|
63
63
|
spforge/ratings/utils.py,sha256=_zFemqz2jJkH8rn2EZpDt8N6FELUmYp9qCnPzRtOIGU,4497
|
|
64
64
|
spforge/scorer/__init__.py,sha256=wj8PCvYIl6742Xwmt86c3oy6iqE8Ss-OpwHud6kd9IY,256
|
|
65
|
-
spforge/scorer/_score.py,sha256=
|
|
65
|
+
spforge/scorer/_score.py,sha256=DOl3wlHH0IlQelQA5CaNAfVtJhc544ZO5l-1mEno7nA,65276
|
|
66
66
|
spforge/transformers/__init__.py,sha256=IPCsMcsgBqG52d0ttATLCY4HvFCQZddExlLt74U-zuI,390
|
|
67
67
|
spforge/transformers/_base.py,sha256=-smr_McQF9bYxM5-Agx6h7Xv_fhZzPfpAdQV-qK18bs,1134
|
|
68
68
|
spforge/transformers/_net_over_predicted.py,sha256=5dC8pvA1DNO0yXPSgJSMGU8zAHi-maUELm7FqFQVo-U,2321
|
|
@@ -71,7 +71,7 @@ spforge/transformers/_other_transformer.py,sha256=w2a7Wnki3vJe4GAkSa4kealw0GILIo
|
|
|
71
71
|
spforge/transformers/_predictor.py,sha256=2sE6gfVrilXzPVcBurSrtqHw33v2ljygQcEYXt9LhZc,3119
|
|
72
72
|
spforge/transformers/_simple_transformer.py,sha256=zGUFNQYMeoDSa2CoQejQNiNmKCBN5amWTvyOchiUHj0,5660
|
|
73
73
|
spforge/transformers/_team_ratio_predictor.py,sha256=g8_bR53Yyv0iNCtol1O9bgJSeZcIco_AfbQuUxQJkeY,6884
|
|
74
|
-
spforge-0.8.
|
|
74
|
+
spforge-0.8.32.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
75
75
|
tests/test_autopipeline.py,sha256=7cNAn-nmGolfyfk3THh9IKcHZfRA-pLYC_xAyMg-No4,26863
|
|
76
76
|
tests/test_autopipeline_context.py,sha256=IuRUY4IA6uMObvbl2pXSaXO2_tl3qX6wEbTZY0dkTMI,1240
|
|
77
77
|
tests/test_feature_generator_pipeline.py,sha256=CK0zVL8PfTncy3RmG9i-YpgwjOIV7yJhV7Q44tbetI8,19020
|
|
@@ -101,14 +101,14 @@ tests/ratings/test_team_rating_generator.py,sha256=SqQcfckNmJJc99feCdnmkNYDape-p
|
|
|
101
101
|
tests/ratings/test_utils_scaled_weights.py,sha256=iHxe6ZDUB_I2B6HT0xTGqXBkl7gRlqVV0e_7Lwun5po,4988
|
|
102
102
|
tests/scorer/test_score.py,sha256=rw3xJs6xqWVpalVMUQz557m2JYGR7PmhrsjfTex0b0c,79121
|
|
103
103
|
tests/scorer/test_score_aggregation_granularity.py,sha256=O5TRlG9UE4NBpF0tL_ywZKDmkMIorwrxgTegQ75Tr7A,15871
|
|
104
|
-
tests/scorer/test_scorer_name.py,sha256=
|
|
104
|
+
tests/scorer/test_scorer_name.py,sha256=lijr8vuHkieVmu_m3zcZril7rG5ByIZ-vSJq5QJFIss,10862
|
|
105
105
|
tests/transformers/test_estimator_transformer_context.py,sha256=5GOHbuWCWBMFwwOTJOuD4oNDsv-qDR0OxNZYGGuMdag,1819
|
|
106
106
|
tests/transformers/test_net_over_predicted.py,sha256=vh7O1iRRPf4vcW9aLhOMAOyatfM5ZnLsQBKNAYsR3SU,3363
|
|
107
107
|
tests/transformers/test_other_transformer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
108
|
tests/transformers/test_predictor_transformer.py,sha256=N1aBYLjN3ldpYZLwjih_gTFYSMitrZu-PNK78W6RHaQ,6877
|
|
109
109
|
tests/transformers/test_simple_transformer.py,sha256=wWR0qjLb_uS4HXrJgGdiqugOY1X7kwd1_OPS02IT2b8,4676
|
|
110
110
|
tests/transformers/test_team_ratio_predictor.py,sha256=fOUP_JvNJi-3kom3ZOs1EdG0I6Z8hpLpYKNHu1eWtOw,8562
|
|
111
|
-
spforge-0.8.
|
|
112
|
-
spforge-0.8.
|
|
113
|
-
spforge-0.8.
|
|
114
|
-
spforge-0.8.
|
|
111
|
+
spforge-0.8.32.dist-info/METADATA,sha256=jFVMSxtQ3YPTGRH-huzpLMzvjSPUBmXakktepqay_98,20048
|
|
112
|
+
spforge-0.8.32.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
113
|
+
spforge-0.8.32.dist-info/top_level.txt,sha256=6UW2M5a7WKOeaAi900qQmRKNj5-HZzE8-eUD9Y9LTq0,23
|
|
114
|
+
spforge-0.8.32.dist-info/RECORD,,
|
tests/scorer/test_scorer_name.py
CHANGED
|
@@ -123,6 +123,19 @@ class TestScorerNameProperty:
|
|
|
123
123
|
# Validation filter auto-added but not counted
|
|
124
124
|
assert scorer.name == "mean_bias_scorer_yards"
|
|
125
125
|
|
|
126
|
+
def test_any_filter_on_validation_column_excluded_from_name(self):
|
|
127
|
+
scorer = MeanBiasScorer(
|
|
128
|
+
target="yards",
|
|
129
|
+
pred_column="pred",
|
|
130
|
+
validation_column="is_valid",
|
|
131
|
+
filters=[
|
|
132
|
+
Filter("is_valid", 0, Operator.EQUALS),
|
|
133
|
+
Filter("minutes", 10, Operator.GREATER_THAN),
|
|
134
|
+
]
|
|
135
|
+
)
|
|
136
|
+
# Any filter on validation column should be excluded, not just value=1
|
|
137
|
+
assert scorer.name == "mean_bias_scorer_yards_filters:1"
|
|
138
|
+
|
|
126
139
|
def test_complex_configuration_all_components(self):
|
|
127
140
|
scorer = MeanBiasScorer(
|
|
128
141
|
target="yards",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|