Scenario Imbalance
Identify imbalanced scenarios in training data. Improve fairness and robustness.
Execute Test:
rules = SBRules()
rules.add(metric="js_divergence", ideal_distribution="uniform", metric_threshold=0.1)
rules.add(metric="chi_squared_test", ideal_distribution="uniform", metric_threshold=0.1)
# clustering is required only at cluster level
cls_default = clustering(test_session=test_session,
dataset_name=dataset_name,
method="k-means",
embedding_col="Embedding",
level="image",
args={"numOfClusters": 4}
)
edge_case_detection = scenario_imbalance(test_session=test_session,
dataset_name = dataset_name,
test_name = run_name,
type = "scenario_imbalance",
output_type="cluster",
embedding= "Embedding",
rules = rules,
clustering = cls_default
)
test_session.add(edge_case_detection)
test_session.run()Interpreting the Results
Last updated
Was this helpful?

