Spaces:
Sleeping
Sleeping
Commit ·
3aab9e5
1
Parent(s): 5f613de
updated scores
Browse files
server/tasks/task1_missing.py
CHANGED
|
@@ -30,9 +30,9 @@ def load():
|
|
| 30 |
def score(current_df, original_nulls: int) -> float:
|
| 31 |
"""Score in [0, 1]: fraction of nulls filled."""
|
| 32 |
if original_nulls == 0:
|
| 33 |
-
return
|
| 34 |
remaining = int(current_df.isnull().sum().sum())
|
| 35 |
-
return round(max(0.0, 1.0 - remaining / original_nulls), 4)
|
| 36 |
|
| 37 |
|
| 38 |
def count_errors(current_df) -> int:
|
|
|
|
| 30 |
def score(current_df, original_nulls: int) -> float:
|
| 31 |
"""Score in [0, 1]: fraction of nulls filled."""
|
| 32 |
if original_nulls == 0:
|
| 33 |
+
return 0.999
|
| 34 |
remaining = int(current_df.isnull().sum().sum())
|
| 35 |
+
return round(max(0.001, min(0.999, 1.0 - remaining / original_nulls)), 4)
|
| 36 |
|
| 37 |
|
| 38 |
def count_errors(current_df) -> int:
|
server/tasks/task2_format.py
CHANGED
|
@@ -56,7 +56,7 @@ def score(current_df, meta: dict) -> float:
|
|
| 56 |
dupe_score = 1.0 - dupes / max(meta["orig_dupes"], 1)
|
| 57 |
|
| 58 |
combined = 0.35 * phone_score + 0.35 * date_score + 0.30 * dupe_score
|
| 59 |
-
return round(max(0.
|
| 60 |
|
| 61 |
|
| 62 |
def count_errors(current_df, meta: dict) -> int:
|
|
|
|
| 56 |
dupe_score = 1.0 - dupes / max(meta["orig_dupes"], 1)
|
| 57 |
|
| 58 |
combined = 0.35 * phone_score + 0.35 * date_score + 0.30 * dupe_score
|
| 59 |
+
return round(max(0.001, min(0.999, combined)), 4)
|
| 60 |
|
| 61 |
|
| 62 |
def count_errors(current_df, meta: dict) -> int:
|
server/tasks/task3_pipeline.py
CHANGED
|
@@ -87,7 +87,7 @@ def score(current_df, meta: dict) -> float:
|
|
| 87 |
|
| 88 |
combined = 0.25 * null_score + 0.20 * dupe_score + 0.20 * outlier_score \
|
| 89 |
+ 0.175 * country_score + 0.175 * date_score
|
| 90 |
-
return round(max(0.
|
| 91 |
|
| 92 |
|
| 93 |
def count_errors(current_df, meta: dict) -> int:
|
|
|
|
| 87 |
|
| 88 |
combined = 0.25 * null_score + 0.20 * dupe_score + 0.20 * outlier_score \
|
| 89 |
+ 0.175 * country_score + 0.175 * date_score
|
| 90 |
+
return round(max(0.001, min(0.999, combined)), 4)
|
| 91 |
|
| 92 |
|
| 93 |
def count_errors(current_df, meta: dict) -> int:
|