{"id":20723600,"url":"https://github.com/networks-learning/memorize","last_synced_at":"2025-08-21T05:32:00.040Z","repository":{"id":46148788,"uuid":"164701909","full_name":"Networks-Learning/memorize","owner":"Networks-Learning","description":"Code and real data for \"Enhancing Human Learning via Spaced Repetition Optimization\", PNAS 2019","archived":false,"fork":false,"pushed_at":"2023-01-10T15:40:38.000Z","size":1058,"stargazers_count":181,"open_issues_count":0,"forks_count":28,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-12-12T19:44:14.360Z","etag":null,"topics":["algorithm","control","duolingo","machine-learning","pnas","point-processes","spaced-repetition"],"latest_commit_sha":null,"homepage":"http://learning.mpi-sws.org/memorize/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Networks-Learning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-08T17:41:12.000Z","updated_at":"2024-12-09T16:01:40.000Z","dependencies_parsed_at":"2023-02-08T19:16:04.883Z","dependency_job_id":null,"html_url":"https://github.com/Networks-Learning/memorize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Networks-Learning%2Fmemorize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Networks-Learning%2Fmemorize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Networks-Learning%2Fmemorize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Networks-Learning%2Fmemorize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Networks-Learning","download_url":"https://codeload.github.com/Networks-Learning/memorize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494917,"owners_count":18235046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","control","duolingo","machine-learning","pnas","point-processes","spaced-repetition"],"created_at":"2024-11-17T04:09:11.866Z","updated_at":"2024-12-19T20:06:49.742Z","avatar_url":"https://github.com/Networks-Learning.png","language":"Jupyter Notebook","readme":"# Memorize\n\nThis is a repository containing code and data for the paper:\n\n\u003e B. Tabibian, U. Upadhyay, A. De, A. Zarezade, Bernhard Schölkopf, and M. Gomez-Rodriguez. _Enhancing Human Learning via Spaced Repetition Optimization._ Proceedings of the National Academy of Sciences (PNAS), March, 2019. \n\nThe paper is available [from PNAS website](https://www.pnas.org/content/116/10/3988) and the [supporting website](http://learning.mpi-sws.org/memorize/) also gives a description of our algorithm in a nutshell.\n\nAs a follow-up of this work, we tested a variant of the algorithm presented here (named [Select](https://github.com/Networks-Learning/spaced-selection)) in the wild by means of a Randomized Trial and found that it performed significantly better than competitive baselines. We present those findings in the following [paper](https://www.nature.com/articles/s41539-021-00105-8):\n\n\u003e U. Upadhyay, G. Lancashire, C. Moser and M. Gomez-Rodriguez. Large-scale randomized experiment reveals machine learning helps people learn and remember more effectively., npj Science of Learning, 6, Article number: 26 (2021).\n\n## Pre-requisites\n\nThis code depends on the following packages:\n\n 1. `numpy`\n 2. `pandas`\n 3. `matplotlib`\n 4. `seaborn`\n 5. `scipy`\n 6. `dill`\n 7. `click`\n \nApart from this, the instructions assume that the [Duolingo dataset](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/N8XJME) has been downloaded, extracted, and saved at `./data/raw/duolingo.csv`.\n\n## Code structure\n\n - `memorize.py` contains the memorize algorithm.\n - `preprocesed_weights.csv` contains estimated model parameters for the [HLR model](https://github.com/duolingo/halflife-regression), as described in section 8 of supplementary materials.\n - `observations_1k.csv` contains a set of 1K user-item pairs and associated number of total/correct attempts by every user for given items. This dataset has been curated from a larger dataset released by Duolingo, available [here](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/N8XJME).\n\n## Execution\n\nThe code can by executed as follows:\n\n`python memorize.py`\n\nThe code will use default parameter value (q) used in the code.\n\n----\n\n# Experiments with Duolingo data\n\n## Pre-processing\n\nConvert to Python `dict` by `user_id, lexeme_id` and pruning it for reading it:\n\n    python dataset2dict.py ./data/raw/duolingo.csv ./data/duo_dict.dill --success_prob 0.99 --max_days 30 \n    python process_raw_data.py ./data/raw/duolingo.csv ./data/duolingo_reduced.csv\n\n## Plots\n\nSee the notebook `plots.ipynb`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworks-learning%2Fmemorize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetworks-learning%2Fmemorize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworks-learning%2Fmemorize/lists"}