Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 6, 2024
1 parent 1dbf3c8 commit ce7f362
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scib_metrics/benchmark/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ def get_results(self, min_max_scale: bool = True, clean_names: bool = True) -> p
per_class_score = df.groupby(_METRIC_TYPE).mean().transpose()
# This is the default scIB weighting from the manuscript
if "Batch correction" in per_class_score.columns and "Bio conservation" in per_class_score.columns:
per_class_score["Total"] = 0.4 * per_class_score["Batch correction"] + 0.6 * per_class_score["Bio conservation"]
per_class_score["Total"] = (
0.4 * per_class_score["Batch correction"] + 0.6 * per_class_score["Bio conservation"]
)
df = pd.concat([df.transpose(), per_class_score], axis=1)
df.loc[_METRIC_TYPE, per_class_score.columns] = _AGGREGATE_SCORE
return df
Expand Down

0 comments on commit ce7f362

Please sign in to comment.