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

Validate prioritizes label types based on need, other Validate fixes #3515

Merged
merged 6 commits into from
Mar 11, 2024

Conversation

misaugstad
Copy link
Member

Resolves #2530
Fixes #3513

This PR ends up doing a few related things since they came up while I was already working on this...

  1. We now prioritize which label type to choose for a Validate mission based on need. Each of our 6 primary label types have at least a 3% chance of being selected (if there are any such labels left for the user to validate). The remaining probability of being chosen is split up proportionally based no the number of labels remaining of that label type that either has no validations or needs a tie breaking vote. As before, we only assign No Sidewalk missions if there is nothing available for the other label types.
    As an example, I tested on my Seattle db dump, and the probabilities for the various label types were: 48% Curb Ramp, 15% Missing Curb Ramp, 9% Obstacle, 21.5% Surface Problem, 3.5% Crosswalk, and 3% Pedestrian Signal. We'll be validating a lot of curb ramps for awhile here while we catch up!
  2. I tweaked the label prioritization algorithm for choosing labels to validate as well, and you could even consider it fixing bugs in the algorithm. Both of these changes increased the frequency that I saw labels that actually needed validations in local testing:
    1. We have been giving a label higher priority if the user who labeled it has fewer than 50 labels validated... But I didn't add the condition that the label in question still required a validation itself! I've added that condition so we don't repeatedly validate a label just bc a user doesn't have 50 labels to validate.
    2. We were adding a weight that was proportional to the number of validations: 100 / (1 + validation_count). I've adjusted this to consider how far we are from consensus instead of how far we are from having no validations: 100 / (1 + abs(agree_count - disagree_count)).
  3. Fixed mobile validate not showing new mission after the first (Mobile validate doesn't let you start a new mission #3513).
  4. I added label ID to the Admin Validate page.
  5. I added the Admin Validate info to the admin versions of the LabelMap popup. Visible on Admin page "Map" tab, admin user dashboard, etc... anywhere that shows the Label Map popup except for LabelMap itself; I want to keep LabelMap looking clean for demos and such.
  6. Fixes a bug where our mobile page's warning for being in landscape mode wasn't showing up on initial page load.
Before/After screenshots (if applicable)

Here are screenshots of the changes to Admin Validate. The others don't really have screenshots to show.
Screenshot from 2024-03-11 12-29-39
Screenshot from 2024-03-11 12-28-40

Things to check before submitting the PR
  • I've written a descriptive PR title.
  • I've added/updated comments for large or confusing blocks of code.
  • I've included before/after screenshots above.

@misaugstad misaugstad self-assigned this Mar 11, 2024
@misaugstad misaugstad merged commit 7d21f33 into develop Mar 11, 2024
@misaugstad misaugstad deleted the 2530-valiate-prioritize-label-types branch March 11, 2024 21:54
@misaugstad misaugstad mentioned this pull request Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant