ZeroDivisionError without good explanation
ZeroDivisionError Traceback (most recent call last)
/tmp/ipykernel_6164/2664903596.py in
~/PycharmProjects/delab/venv/lib/python3.10/site-packages/simpledorff/simpledorff.py in calculate_krippendorffs_alpha_for_df(df, experiment_col, annotator_col, class_col, metric_fn) 105 class_col=class_col, 106 ) --> 107 return calculate_krippendorffs_alpha(ea_table_df=ea_table_df, metric_fn=metric_fn)
~/PycharmProjects/delab/venv/lib/python3.10/site-packages/simpledorff/simpledorff.py in calculate_krippendorffs_alpha(ea_table_df, metric_fn) 75 ) 76 N = frequency_dict['total'] ---> 77 alpha = 1 - (observed_disagreement / expected_disagreement)*(N-1) 78 return alpha 79
ZeroDivisionError: float division by zero
I'm running into this issue as well! Should be some catch if expected disagreement is 0 to prevent zero division