File size: 898 Bytes
a94715d 277b57e a94715d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
#!pip install -q git+https://github.com/holistic-ai/holisticai.git@feature/bias-benchmark
import os
from holisticai.benchmark import BiasMitigationBenchmark
def main():
for task_type in ["multiclass",
"regression",
"clustering",
"binary_classification",
]:
for stage in ["preprocessing",
"inprocessing",
"postprocessing"
]:
benchmark = BiasMitigationBenchmark(task_type, stage)
results = benchmark.run()
if not os.path.exists("data"):
os.makedirs("data")
results.to_parquet(f"data/benchmark_{task_type}_{stage}.parquet", index=True)
print(f"Results saved for {task_type} task type and {stage} stage.") # noqa: T201
if __name__ == "__main__":
main() |