Comments (13)
I update the test version for notebook: https://github.com/open-spaced-repetition/fsrs4anki/blob/test/fsrs4anki_optimizer_test.ipynb
You can set the group_key to last_s_bin
, last_d_bin
and last_r_bin
.
from fsrs-optimizer.
Please, add 3 more graphs:
- new S as a function of previous S
- new S as a function of last R
- new S as a function of last D
Done:
from fsrs-optimizer.
Is there no way to speed this code up? It takes more time than any other part of the code related to plotting graphs.
Done in open-spaced-repetition/fsrs4anki@a5ae9f1
from fsrs-optimizer.
Thank you. A few more suggestions, nothing urgent:
Done in: open-spaced-repetition/fsrs4anki@7cb2bb4
from fsrs-optimizer.
@L-M-Sherlock, thank you for making a Google colab notebook! Please, implement my suggestion above as well.
from fsrs-optimizer.
I noticed something, I think Sherlock mentioned a similar phenomenon before.
I replaced the function for calculating PLS with a different one, and while RMSE for "Again" got better, the overall RMSE got worse.
RMSE for "Good" became worse somehow. I have no idea why.
However, I still believe that analyzing how PLS (and eventually S) depends on DSR will be helpful. That would require adding more graphs, which, hopefully, won't bother Sherlock too much.
from fsrs-optimizer.
It's not exactly what I wanted, I wanted 3 charts just like the one you originally made, but thank you.
Also, it would be useful to have some kind of fitness metric for fig5
, like RMSE between true and predicted stability or R^2.
Like this: rmse = mean_squared_error(pls_df_group["true_s"], pls_df_group["predicted_s"], sample_weight=pls_df_group["total_count"], squared=False)
EDIT: actuall,y I can just copy-paste the code you provided 3 times. Not the most elegant solution, but eh.
from fsrs-optimizer.
@L-M-Sherlock I have another request. It seems that no matter how I improve the formula for PLS, it somehow makes the overall RMSE worse, which means that we need to analyze the main formula the same way to find out what's wrong. Please, add 3 more graphs:
- new S as a function of previous S
- new S as a function of last R
- new S as a function of last D
And remove grades 2 and 4, leaving only 3. In other words, only reviews when user pressed "Good" should be used for analysis, to simplify things.
Also, for some reason predicted PLS is usually overestimated. Take a look at the following 3 charts (and this is after I modified the formulas):
Notice that the orange curve is usually above blue dots on all 3 charts. I don't know how to fix that.
Maybe S is usually underestimated, and overestimation of PLS somehow offsets underestimation of S, so the optimizer tries that? That's the only idea I have right now.
from fsrs-optimizer.
Is there no way to speed this code up? It takes more time than any other part of the code related to plotting graphs.
ns_dataset["last_state"] = ns_dataset.progress_apply(
lambda x: my_collection.predict(
",".join(x["t_history"].split(",")[:-1]),
",".join(x["r_history"].split(",")[:-1]),
),
axis=1,
)
from fsrs-optimizer.
Interestingly, S as function of previous S provides practically a perfect fit (log coordinates):
from fsrs-optimizer.
Thank you. A few more suggestions, nothing urgent:
- Add RMSE between true S and predicted S (and do that for PLS too), like this:
rmse = mean_squared_error(pls_df_group["true_s"], pls_df_group["predicted_s"], sample_weight=pls_df_group["total_count"], squared=False)
print(f'RMSE={rmse:.2f}')
- Analyzing new S as a function of previous S is more convenient when both are in log coordinates (same for PLS), so add this:
if group_key == "last_s_bin":
ax1.set_ylim(max(ns_df_group["predicted_s"].min(), 0.1), ns_df_group["predicted_s"].max() * 1.1)
ax1.set_xscale("log")
ax1.set_yscale("log")
- Change the bounds. It seems that the estimate of true stability is capped at 365, I would suggest 3650 instead
- Use this to set
y_lim
of S and PLS:
ax1.set_ylim(0, min(pls_df_group["predicted_s"].max(), pls_df_group["true_s"].max()) * 1.1)
from fsrs-optimizer.
By the way, you may be interested in these charts for my collection. Also, this is with a modified formula for PLS that provides a better fit than the previous formula (see open-spaced-repetition/fsrs4anki#461 (comment))
It seems that the main formula provides a good fit overall (though the function for R could be improved, it seems), but the formula for PLS tends to overestimate S
from fsrs-optimizer.
Nice. Once you have enough free time, please test my idea regarding PLS: open-spaced-repetition/fsrs4anki#461 (comment)
from fsrs-optimizer.
Related Issues (20)
- how to input data from obsidian-spaced-repetition-recall, ob-revlog.csv, into optimizer HOT 26
- [Feature request] A way to extrapolate values of S0 without curve_fit HOT 8
- [BUG] file not found when running local optimizer for multiple decks HOT 2
- Use results from benchmark experiment as initial values of S0 HOT 12
- Command Line typo on usage section fsrs-optimizer doesn't exist [BUG] HOT 1
- [BUG] Loosen the clamping for w[10] and w[8] HOT 5
- [Feature Request] write plot files to local directory
- [Feature Request] Loosen the clampings for w[9] HOT 5
- index 1 is out of bounds for axis 0 with size 1 [BUG] HOT 1
- Training data is inadequate. HOT 5
- [Question] Explain how the optimizer calculates retention that minimizes review times HOT 12
- [Feature Request] make the simulator more precise by using different values of recall_cost for Hard, Good and Easy
- [Bug] Can't use absolute path as arg HOT 1
- [BUG] 'Optimizer' object has no attribute 'w' HOT 1
- See if this code could be used to speed up finding optimal retention HOT 16
- [Feature Request] Investigate how robust are parameters and RMSE HOT 18
- Optimized w[3] too low HOT 12
- [Feature Request] Add another condition to the outlier filter HOT 4
- [BUG] Optimizer error: "stack expects each tensor to be equal size, but got [...] at entry 0 and [...] at entry 1" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsrs-optimizer.