An ensemble only helps when its members make different mistakes. The disagreement measure compares two classifiers on the same examples, using only whether each one was correct.
Let N_ab count the examples where classifier 1 has correctness a and classifier 2 has correctness b (1 means correct, 0 means wrong). The disagreement measure is (N_01 + N_10) / N, where N is the number of examples.
Implement disagreement(correct_a, correct_b), where both inputs are 1-D boolean or 0/1 arrays of the same length. Return the disagreement as a float between 0 and 1.
ValueError.ValueError.Convert both inputs to booleans first. Then count the positions where they differ, which is the same as N_01 + N_10.
No results yet
Run your code to check it against the examples, or submit to run every test.