Class Imbalance
The Class Imbalance Test is designed to assess the distribution of classes within a dataset, particularly in the context of machine learning tasks like object detection.
Execute Test:
rules = ClassImbalanceRules()
rules.add(metric="js_divergence", ideal_distribution="uniform", metric_threshold=0.10, label="ALL")
rules.add(metric="chi_squared_test", ideal_distribution="uniform", metric_threshold=0.10, label="ALL")
run_name = "Class Imbalance v1"
print(run_name)
dataset_name = "training_dataset"
test_session = TestSession(
project_name="Instance Segmentation",run_name=run_name,access_key="8Sxdx2ELb70quckrkklZ",secret_key="UeIWErIbh8sAFVxpLqtfJA0dMW7QsaiApuRmOYz8",host="https://backend.platform.raga.ai")
distribution_test = class_imbalance_test(test_session=test_session,
dataset_name=dataset_name,
test_name=run_name,
type="class_imbalance",
output_type="instance_segmentation",
annotation_column_name="AnnotationsV1",
rules=rules)
test_session.add(distribution_test)
test_session.run()Interpreting the Results

Bar Chart Comparison

Last updated
Was this helpful?

