Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@L-M-Sherlock
Copy link
Contributor

Before:

image

After:

image

The new one is close to the R displayed in the forgetting curve:

image

@dae
Copy link
Member

dae commented May 26, 2025

Thanks Jarrett!

@dae dae merged commit dfee388 into ankitects:main May 26, 2025
1 check passed
@L-M-Sherlock L-M-Sherlock deleted the calculate-accurate-retrievability-in-card-info branch May 26, 2025 13:32
@user1823
Copy link
Contributor

Do we really need a new function in FSRS-rs for this? Can't the same result be obtained by something like the following?

        let days_elapsed = self
            .storage
            .time_of_last_review(card.id)?
            .map(|ts| timing.now.elapsed_secs_since(ts))
            .unwrap_or_default() as u32 / 86400.0;
        let fsrs_retrievability = card
            .memory_state
            .zip(Some(days_elapsed))
            .zip(Some(card.decay.unwrap_or(FSRS5_DEFAULT_DECAY)))
            .map(|((state, days), decay)| {
                FSRS::new(None).unwrap().current_retrievability(
                    state.into(),
                    days,
                    decay,
                )
            });

@user1823
Copy link
Contributor

After open-spaced-repetition/fsrs-rs#333 by Luc, the code in FSRS-rs looks much cleaner. So, you can disregard my suggestion above as it's probably cleaner to create a new function for handling elapsed time in seconds if we are going to use it in multiple places.

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.

3 participants