Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected results when true_pairs/pred_pairs are different types #3

Closed
ngmarchant opened this issue Nov 28, 2020 · 0 comments · Fixed by #4
Closed

Unexpected results when true_pairs/pred_pairs are different types #3

ngmarchant opened this issue Nov 28, 2020 · 0 comments · Fixed by #4

Comments

@ngmarchant
Copy link
Member

Suppose true_pairs is represented as an integer array with canonical representation

      [,1]  [,2] 
 [1,]   25   107
 [2,]  106   175
 [3,]  108   203

but pred_pairs is represented as a character array with canonical representation

      [,1]  [,2] 
 [1,] "106" "175"
 [2,] "107" "25" 
 [3,] "108" "203"

The canonical representation of the pairs is different, due to the different lexicographic ordering of strings vs integers.
This case should raise a warning (at a minimum) in contingency_table_pairs. The default behavior should potentially be to coerce both pairs to character mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant