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

Fix/stability not restrict maximun and minimun #126

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

ishiko732
Copy link
Collaborator

I referred to the code of fsrs-rs and found that Stability is constrained by maximum and minimum values: https://github.com/open-spaced-repetition/fsrs-rs/blob/bc5d6024effc84b6743186fbdd23cbdf5bb0ec49/src/model.rs#L148-L151.

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ba9fa37) to head (dcf8d51).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #126   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          607       609    +2     
  Branches        64        64           
=========================================
+ Hits           607       609    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@L-M-Sherlock
Copy link
Member

Why stability should be constrained by maximum interval?

@ishiko732
Copy link
Collaborator Author

Why stability should be constrained by maximum interval?

I see that in model.rs of fsrs-rs there is a maximum limit of 36500.0. I am thinking that next_interval uses maximum_interval to limit the maximum number of days. Should stability also use maximum_interval to limit its maximum value? Or is it sufficient to just limit the minimum value?

@L-M-Sherlock
Copy link
Member

Let's consider such a case: the maximum_interval is 365 days, and the desired retention is 95%. When the stability is ~700 days, the corresponding interval is 365. If we restrict the stability to 365, the interval will never reach 365.

@ishiko732
Copy link
Collaborator Author

Let's consider such a case: the maximum_interval is 365 days, and the desired retention is 95%. When the stability is ~700 days, the corresponding interval is 365. If we restrict the stability to 365, the interval will never reach 365.

OK, you're right, I hadn't considered that fully before. So, should I set the maximum for stability to 36500.0, or is it enough to just limit the minimum value?

@L-M-Sherlock
Copy link
Member

Yes, please do it.

Copy link
Member

@L-M-Sherlock L-M-Sherlock left a comment

Choose a reason for hiding this comment

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

LGTM

@L-M-Sherlock L-M-Sherlock merged commit 242e8d7 into main Sep 19, 2024
5 checks passed
@ishiko732 ishiko732 deleted the Fix/stability-not-restrict-maximun-and-minimun branch September 19, 2024 15:27
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