Skip to content

waitlist predictor on enrollment page#1110

Open
Jus973 wants to merge 5 commits into
mainfrom
waitlist-predictor-v2
Open

waitlist predictor on enrollment page#1110
Jus973 wants to merge 5 commits into
mainfrom
waitlist-predictor-v2

Conversation

@Jus973
Copy link
Copy Markdown
Member

@Jus973 Jus973 commented Mar 16, 2026

experimental feature, please test out and give feedback on UI + the overall feature. thinking about maybe pivoting to a less intrusive UI where it can show each course's difficulty to get into (sort by calculated lambda)

uses poisson-based regression from past 3 semesters for data.

future inclusions might include:
only showing the calculator if the semester is the current semester
only showing the calculator if it is during course enrollment season

also, it might be possible to create this feature with less files(?) or neater(?), so i can clean the code up if you find a better way to do so.

@Jus973 Jus973 requested a review from vaclisinc March 16, 2026 07:14
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d78551a46f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const runEndTime = new Date(sorted[i].endTime).getTime();
const runDays = (runEndTime - runStartTime) / MS_PER_DAY;
if (runDays >= WAITLIST_ZERO_CUTOFF_DAYS) {
return runStart - 1;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep first zero bucket when truncating history

When the zero-waitlist run reaches the cutoff, this returns runStart - 1, which causes waitlistDecreasesAndDaysFromHistory to exclude the first waitlistedCount = 0 interval. That drops the final decrease into zero (for example, 5 -> 0) and the elapsed time up to that transition, so lambda is systematically underestimated for sections that clear their waitlist and the returned probability is biased low.

Useful? React with 👍 / 👎.

});
}

let lambdaUsed: number | undefined = lambda ?? undefined;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate lambda is non-negative before computing probability

The resolver checks k and timeRemainingDays but never rejects negative lambda. If a caller sends lambda < 0, lambdaT becomes negative and poissonCdf returns 0, so the API reports a 100% get-in probability for invalid input instead of returning BAD_USER_INPUT, which produces incorrect results for direct API consumers.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@vaclisinc vaclisinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we need to disable summer session:
Image

@Jus973
Copy link
Copy Markdown
Member Author

Jus973 commented Mar 16, 2026

@vaclisinc Because summer session enrollment is historically much different, should I completely remove the feature for it, or separate my data to only past summer sessions? although most classes wouldn't have much data.

@vaclisinc
Copy link
Copy Markdown
Contributor

@vaclisinc Because summer session enrollment is historically much different, should I completely remove the feature for it, or separate my data to only past summer sessions? although most classes wouldn't have much data.

I think it's fair we just support spring and fall semester. The summer sessions data probably is lesser and not stable (not sure but I guess every summer sessions may have rly different courses based on professors?)

Copy link
Copy Markdown
Contributor

@vaclisinc vaclisinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also another UX aspect questions, once people add more than one class to the enrollment page, then how do the system know whether the user is inputing which course?

I think two solutions:

  1. one is showing the course name and courseID on the top - quick solution for now?

  2. maybe changing the arrangement (since we will probably make this into the waitlist volatility meter you mentioned before, and I lowk think this is maybe better than a number of probability at this moment - however, the volatility meter will be even bigger height and rn it's already not fitting in the 100% screen size) - maybe discuss with design team, I'll tag them later

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 this pull request may close these issues.

2 participants