-
Notifications
You must be signed in to change notification settings - Fork 6
feat(stats): allow users to rank all opinions by representativeness for each group #105
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
base: main
Are you sure you want to change the base?
Conversation
takeruhukushima
commented
Sep 6, 2025
- Changed select_consensus_statements to return up to 100 results by default
- Added comprehensive test coverage for multi-group consensus
- Implemented proper sorting by z-score (p-test) for representativeness
- Enhanced test output to show detailed metrics for all results
- Changed select_consensus_statements to return up to 100 results by default - Added comprehensive test coverage for multi-group consensus - Implemented proper sorting by z-score (p-test) for representativeness - Enhanced test output to show detailed metrics for all results Signed-off-by: takeru.fukushima <[email protected]>
|
Thank you @takeruhukushima for your PR :) It's on good track! I think however, we shouldn't modify the existing API as it is designed to be 1-1 identical with pol.is API. Instead, we should probably either create a new function for it, or create configuration variable to configure what's the expected list like (probably better). Finally, our need is not only to provide the top 100, but to provide the list of ALL statements ranked by representativeness. I think it's probably not necessary to add another API. We can just add the relevant info in What we could do is:
Takeru, @patcon is the main maintainer of the library so I'll address him to see what he thinks :) Hey @patcon just a heads up, Takeru did the japanese translation in Agora, and he's a young and motivated student very eager to learn and contribute to civic tech tools :) I told him we're interested at Agora in being able to retrieve more than just 5 representative opinions, but I didn't detail much. Let me know what you think of the requirements, which I think we've already briefly discussed last time we spoke! |
|
Also @takeruhukushima, could you join the Polis User Discord group that @patcon manages? |
|
I'm sorry I messed with the existing functions. I picked the top 100 entries because I thought there might be a theoretical risk of crashes or similar issues. That was my own arbitrary judgment, and I should have asked first. |
It's chill, thanks for your efforts Takeru it's on good track! I'll wait for @patcon feedback first, and I'll give you more detailed feedbacks on your code and on the requirements in a few days, if you don't mind! |
…tativeness" This reverts commit 77799e4.
- Changed pick_max, confidence and prob_threshold parameters to be Optional - Updated functions in consensus.py, stats.py, and base.py Signed-off-by: takeru.fukushima <[email protected]>
|
Hi @takeruhukushima |
|
Hi @takeruhukushima In general @patcon what I'd like is to have all these values available: @patcon could you provide feedback on this? I'd like also to get more clarity as to what entails "confidence" in the source code? And what represents @takeruhukushima I am sorry, we need a little more time to figure out the details, this is a complex feature. I'll come back to you for your "edit" PR in Agora which should be more easier to go through with. Thank you again! |