cyberosa
commited on
Commit
·
6078953
1
Parent(s):
9d5e690
updating csv file
Browse files- tabs/tool_accuracy.py +2 -2
tabs/tool_accuracy.py
CHANGED
|
@@ -50,7 +50,7 @@ def get_weighted_accuracy(row, global_requests: int):
|
|
| 50 |
return scale_value(
|
| 51 |
(
|
| 52 |
row["tool_accuracy"]
|
| 53 |
-
+ (row["
|
| 54 |
),
|
| 55 |
UNSCALED_WEIGHTED_ACCURACY_INTERVAL,
|
| 56 |
SCALED_WEIGHTED_ACCURACY_INTERVAL,
|
|
@@ -58,7 +58,7 @@ def get_weighted_accuracy(row, global_requests: int):
|
|
| 58 |
|
| 59 |
|
| 60 |
def compute_weighted_accuracy(tools_accuracy: pd.DataFrame):
|
| 61 |
-
global_requests = tools_accuracy.
|
| 62 |
tools_accuracy["weighted_accuracy"] = tools_accuracy.apply(
|
| 63 |
lambda x: get_weighted_accuracy(x, global_requests), axis=1
|
| 64 |
)
|
|
|
|
| 50 |
return scale_value(
|
| 51 |
(
|
| 52 |
row["tool_accuracy"]
|
| 53 |
+
+ (row["nr_responses"] / global_requests) * VOLUME_FACTOR_REGULARIZATION
|
| 54 |
),
|
| 55 |
UNSCALED_WEIGHTED_ACCURACY_INTERVAL,
|
| 56 |
SCALED_WEIGHTED_ACCURACY_INTERVAL,
|
|
|
|
| 58 |
|
| 59 |
|
| 60 |
def compute_weighted_accuracy(tools_accuracy: pd.DataFrame):
|
| 61 |
+
global_requests = tools_accuracy.nr_responses.sum()
|
| 62 |
tools_accuracy["weighted_accuracy"] = tools_accuracy.apply(
|
| 63 |
lambda x: get_weighted_accuracy(x, global_requests), axis=1
|
| 64 |
)
|