-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Question] How can I set the parameters in a way which can make the prediction closer to Anki's #150
Comments
There are three differences:
|
Thanks for the info. |
Hey man, can you help me? How can I change the last one to a value that I assume is more correct? |
There are currently no configurable parameters, but you can handle it using afterHandler.
example: (online: https://jsfiddle.net/ishiko/9vmgdys8/2) import { createEmptyCard, fsrs, Grade, Rating, RecordLogItem, State } from 'ts-fsrs'
const learningSteps: Map<Grade, number> = new Map([
[Rating.Again, 10 /** min */],
[Rating.Hard, 30 /** min */],
[Rating.Good, 60 /** min */],
])
const relearningSteps: Map<Grade, number> = new Map([
[Rating.Again, 30 /** min */],
[Rating.Hard, 60 /** min */],
])
function changeStep(item: RecordLogItem) {
const grade = item.log.rating as Grade
if (item.card.state === State.Learning) {
const review: Date = new Date(item.card.last_review!)
review.setTime(review.getTime() + learningSteps.get(grade)! * 60 * 1000)
item.card.due = review
} else if (item.card.state === State.Relearning && relearningSteps.has(grade)) {
const review: Date = new Date(item.card.last_review!)
review.setTime(review.getTime() + relearningSteps.get(grade)! * 60 * 1000)
item.card.due = review
}
return item
}
const f = fsrs()
const now = new Date('2025-03-10T00:00:00.000Z')
const card = createEmptyCard(now)
const grade = Rating.Easy
const items_change_step = f.next(card, now, grade, changeStep) |
Right now this is what I have,so basically it sets the new values to the same as ankis and I set the same default weights aswell and if I continuosly press good 3 times it seems like maxes the time out there and then it just procceeds to change around only because fuzziness is turned on in anki it keeps increasing. and values changes for each rating keeps changing...How can I adjust the parameters to have a closer to result to that of anki am I doing something wrong??
The text was updated successfully, but these errors were encountered: