update optimal retention and parameters tooltip (#3148)

* update optimal retention and parameters tooltip

* Revert "update optimal retention and parameters tooltip"

This reverts commit 32fdc5c1c3.

* update optimal retention and parameters tooltip

* check num of revlogs at first

* use new translation string

* Update deck-config.ftl

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Update deck-config.ftl

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Update deck-config.ftl

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Update ftl/core/deck-config.ftl

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* fix position of translation string

* Update deck-config.ftl

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* Update deck-config.ftl

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* Update deck-config.ftl

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
This commit is contained in:
Jarrett Ye 2024-04-24 09:38:52 +08:00 committed by GitHub
parent 790c52f012
commit 2c9accf595
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 43 additions and 24 deletions

View file

@ -394,10 +394,9 @@ deck-config-historical-retention-tooltip =
The latter is quite rare, so unless you've used the former option, you probably don't need to adjust
this setting.
deck-config-weights-tooltip =
FSRS parameters affect how cards are scheduled. Anki will start with default parameters. Once
you've accumulated 1000+ reviews, you can use the option below to optimize the parameters to best
match your performance in decks using this preset.
deck-config-weights-tooltip2 =
FSRS parameters affect how cards are scheduled. Anki will start with default parameters. You can use
the option below to optimize the parameters to best match your performance in decks using this preset.
deck-config-reschedule-cards-on-change-tooltip =
Affects the entire collection, and is not saved.
@ -414,22 +413,22 @@ deck-config-reschedule-cards-warning =
deck-config-ignore-before-tooltip =
If set, reviews before the provided date will be ignored when optimizing & evaluating FSRS parameters.
This can be useful if you imported someone else's scheduling data, or have changed the way you use the answer buttons.
deck-config-compute-optimal-weights-tooltip =
Once you've done 1000+ reviews in Anki, you can use the Optimize button to analyze your review history,
and automatically generate parameters that are optimal for your memory and the content you're studying.
If you have decks that vary wildly in difficulty, it is recommended to assign them separate presets, as
the parameters for easy decks and hard decks will be different. There is no need to optimize your parameters
frequently - once every few months is sufficient.
deck-config-compute-optimal-weights-tooltip2 =
When you click the Optimize button, FSRS will analyze your review history, and generate parameters that are
optimal for your memory and the content you're studying. If your decks vary wildly in difficulty, it
is recommended to assign them separate presets, as the parameters for easy decks and hard decks will be different.
You don't need to optimize your parameters frequently - once every few months is sufficient.
By default, parameters will be calculated from the review history of all decks using the current preset. You can
optionally adjust the search before calculating the parameters, if you'd like to alter which cards are used for
optimizing the parameters.
deck-config-compute-optimal-retention-tooltip2 =
This tool assumes that youre starting with 0 learned cards, and will attempt to find the desired retention
value that will lead to the most material learnt, in the least amount of time. This number can be used as a
reference when deciding what to set your desired retention to. You may wish to choose a higher desired retention,
if youre willing to trade more study time for a greater recall rate. Setting your desired retention lower than
the minimum is not recommended, as it will lead to more work without benefit.
deck-config-compute-optimal-retention-tooltip3 =
This tool assumes that youre starting with 0 learned cards, and will attempt to find the desired retention value
that will lead to the most material learnt, in the least amount of time. To accurately simulate your learning process,
this feature requires a minimum of 400+ reviews. The calculated number can serve as a reference when deciding what to
set your desired retention to. You may wish to choose a higher desired retention, if youre willing to trade more study
time for a greater recall rate. Setting your desired retention lower than the minimum is not recommended, as it will
lead to a higher workload, because of the high forgetting rate.
deck-config-please-save-your-changes-first = Please save your changes first.
deck-config-a-100-day-interval =
{ $days ->
@ -480,3 +479,23 @@ deck-config-compute-optimal-retention-tooltip =
deck-config-compute-optimal-retention = Compute minimum recommended retention
deck-config-predicted-optimal-retention = Minimum recommended retention: { $num }
deck-config-weights-tooltip =
FSRS parameters affect how cards are scheduled. Anki will start with default parameters. Once
you've accumulated 1000+ reviews, you can use the option below to optimize the parameters to best
match your performance in decks using this preset.
deck-config-compute-optimal-weights-tooltip =
Once you've done 1000+ reviews in Anki, you can use the Optimize button to analyze your review history,
and automatically generate parameters that are optimal for your memory and the content you're studying.
If you have decks that vary wildly in difficulty, it is recommended to assign them separate presets, as
the parameters for easy decks and hard decks will be different. There is no need to optimize your parameters
frequently - once every few months is sufficient.
By default, parameters will be calculated from the review history of all decks using the current preset. You can
optionally adjust the search before calculating the parameters, if you'd like to alter which cards are used for
optimizing the parameters.
deck-config-compute-optimal-retention-tooltip2 =
This tool assumes that youre starting with 0 learned cards, and will attempt to find the desired retention
value that will lead to the most material learnt, in the least amount of time. This number can be used as a
reference when deciding what to set your desired retention to. You may wish to choose a higher desired retention,
if youre willing to trade more study time for a greater recall rate. Setting your desired retention lower than
the minimum is not recommended, as it will lead to more work without benefit.

View file

@ -79,6 +79,11 @@ impl Collection {
&mut self,
revlogs: Vec<RevlogEntry>,
) -> Result<OptimalRetentionParameters> {
if revlogs.len() < 400 {
return Err(AnkiError::FsrsInsufficientReviews {
count: revlogs.len(),
});
}
let first_rating_count = revlogs
.iter()
.group_by(|r| r.cid)
@ -108,11 +113,6 @@ impl Collection {
.filter(|r| r.review_kind == RevlogReviewKind::Review && r.button_chosen != 1)
.counts_by(|r| r.button_chosen);
let total_reviews = review_rating_count.values().sum::<usize>();
if total_reviews < 400 {
return Err(AnkiError::FsrsInsufficientReviews {
count: total_reviews,
});
}
let review_rating_prob = if total_reviews as f64 > 0.0 {
let mut arr = [0.0; 3];
review_rating_count

View file

@ -40,9 +40,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
modelWeights: {
title: tr.deckConfigWeights(),
help:
tr.deckConfigWeightsTooltip() +
tr.deckConfigWeightsTooltip2() +
"\n\n" +
tr.deckConfigComputeOptimalWeightsTooltip(),
tr.deckConfigComputeOptimalWeightsTooltip2(),
sched: HelpItemScheduler.FSRS,
},
ignoreRevlogsBeforeMs: {
@ -57,7 +57,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
},
computeOptimalRetention: {
title: tr.deckConfigComputeOptimalRetention(),
help: tr.deckConfigComputeOptimalRetentionTooltip2(),
help: tr.deckConfigComputeOptimalRetentionTooltip3(),
sched: HelpItemScheduler.FSRS,
},
};