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

[SDK][Agreement] Fix value range for measures. #1000

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

simulacrum6
Copy link
Contributor

Description

This PR fixes the value range for fleiss_kappa, cohens_kappa and percentage to stay within, even in edge cases.

Summary of changes

  • Measures do not return np.nan anymore, when all annotations have the same label or annotation data contains only a single annotator. Instead 1.0 is returned and a warning is raised. This is done to ensure measures will be more robust to degenerate cases yet still inform the users about potential problems in their data. This also helps with bootstrapping, as the confidence intervals cannot be nan anymore.
  • Extended tests to ensure value range.

How test the changes

pytest PYTHON_SDK_DIR/test/agreement

Related issues

Operational checklist

  • All new functionality is covered by tests
  • Any related documentation has been changed or added

@simulacrum6 simulacrum6 added bug Something isn't working SDK IRA Package Issues related to the Inter-Rater Agreement package. labels Oct 5, 2023
@simulacrum6 simulacrum6 requested a review from portuu3 October 5, 2023 11:40
@vercel
Copy link

vercel bot commented Oct 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fortune-reputation-oracle 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 5, 2023 11:51am
human-protocol-typescript-sdk-docs ❌ Failed (Inspect) Oct 5, 2023 11:51am
9 Ignored Deployments
Name Status Preview Comments Updated (UTC)
escrow-dashboard ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am
faucet-server ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am
fortune-exchange-oracle ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am
fortune-exchange-oracle-server ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am
fortune-job-launcher-client ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am
fortune-job-launcher-server ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am
fortune-recording-oracle ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am
job-launcher-client ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am
job-launcher-server ⬜️ Ignored (Inspect) Visit Preview Oct 5, 2023 11:51am

@simulacrum6 simulacrum6 requested a review from flopez7 October 5, 2023 11:49
@vercel vercel bot temporarily deployed to Preview – human-protocol-typescript-sdk-docs October 5, 2023 11:51 Inactive
@simulacrum6 simulacrum6 merged commit 91948b2 into develop Oct 5, 2023
@simulacrum6 simulacrum6 deleted the feat/agreement/fix-kappa-bounds branch October 5, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working IRA Package Issues related to the Inter-Rater Agreement package. SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants