{"id":50324212,"url":"https://github.com/juno-hwang/juno-dkt","last_synced_at":"2026-05-29T05:00:44.207Z","repository":{"id":62573329,"uuid":"396788781","full_name":"juno-hwang/juno-dkt","owner":"juno-hwang","description":"Scikit-learn style implementation of Deep Knowledge Tracing models based on pytorch.","archived":false,"fork":false,"pushed_at":"2022-01-27T09:04:22.000Z","size":852,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-25T02:48:02.280Z","etag":null,"topics":["deep-knowledge-tracing","deep-learning","dkt","learning-analytics","lstm","machine-learning","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juno-hwang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-16T12:38:58.000Z","updated_at":"2023-11-08T12:15:55.000Z","dependencies_parsed_at":"2022-11-03T17:00:53.377Z","dependency_job_id":null,"html_url":"https://github.com/juno-hwang/juno-dkt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juno-hwang/juno-dkt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juno-hwang%2Fjuno-dkt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juno-hwang%2Fjuno-dkt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juno-hwang%2Fjuno-dkt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juno-hwang%2Fjuno-dkt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juno-hwang","download_url":"https://codeload.github.com/juno-hwang/juno-dkt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juno-hwang%2Fjuno-dkt/sbom","scorecard":{"id":542930,"data":{"date":"2025-08-11","repo":{"name":"github.com/juno-hwang/juno-dkt","commit":"5036b3e258ca271dcc0f8ede822f7f4eaf47b05e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}}]},"last_synced_at":"2025-08-20T08:41:43.440Z","repository_id":62573329,"created_at":"2025-08-20T08:41:43.440Z","updated_at":"2025-08-20T08:41:43.440Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33637485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["deep-knowledge-tracing","deep-learning","dkt","learning-analytics","lstm","machine-learning","pytorch"],"created_at":"2026-05-29T05:00:31.451Z","updated_at":"2026-05-29T05:00:44.192Z","avatar_url":"https://github.com/juno-hwang.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Juno-DKT (Deep Knowledge Tracing) pytorch implementation\nScikit-learn style implementation of Deep Knowledge Tracing models based on pytorch.\n\n## 설치 방법\n1. 운영체제와 GPU 사용 여부 등을 고려하여 `pytorch`를 설치한다.(https://pytorch.org/get-started/locally/) (Google Colab에서 사용시 생략 가능)\n2. 터미널 혹은 명령 프롬프트에서 `pip install juno-dkt`를 실행한다.\n3. `juno_dkt`를 import 하여 사용한다. *(pip 패키지 이름은 '-'로 연결되어 있으나, import 할때의 패키지 이름은 '_'로 연결되어 있음에 주의)*\n\n## ASSISTment2015 데이터 예제 (Google Colab)\n\n`example/ASSISTment2015.ipynb`파일과 동일함\n\n(https://colab.research.google.com/drive/1v-f7XKyfzyEwycpEa-z9kuMthRznw7zk?usp=sharing)\n\n### Result\n\n![figure](figure.png)\n\nTest score :  ROC AUC 0.73230  / Binary Cross Entropy 0.54384\n\n\n## API Reference\n\n### ItemEncoder Class\n명목형으로 된 학생 id, 문항 id, 정오답 여부에 대한 데이터를 one-hot encoding한 후 `torch.Tensor`의 `list`로 바꿔준다.\n\n**ItemEncoder(n_items=None, binary_only=False)**\n* `n_items` _(int, Default:None)_ - 문항 수를 명시적으로 지정해야 할 경우 사용하고, 그렇지 않을 경우 기본값 `None`으로 설정하면 데이터에 의해 결정됨.\n* `binary_only` _(bool, Default:False)_ - 문항의 정오답 여부가 이진 값(0 또는 1)인 것만 필터링 할 경우 True로 설정, 그렇지 않을 경우 0.3과 같은 실수 값은 `{0.3정답, 0.6오답}`과 같이 인코딩 됨.\n\n**ItemEncoder.transform(self, students, items, answers)**\n\n_students, items, answers 파라미터의 길이는 동일해야 함._\n* `students` _(list of int or str)_ - 정수형 혹은 문자열로 된 학생들의 id 목록\n* `items` _(list of int or str)_ - 정수형 혹은 문자열로 된 문항이나 작업의 id 목록\n* `answers` _(list of float or int)_ 학생의 정오답 여부를 0~1로 나타낸 값의 목록\n\n\n### DKT Class\n\n**DKT(n_hidden, batch_size, lr, n_embedding=None, device='cpu')**\n\n*Deep knowledge tracing (Piech, Chris, et al., 2015) 에 기초한 모델을 생성한다. Adam optimizer를 사용하여 학습된다.*\n* `n_hidden` _(int)_ - 모델의 시계열 분석에 활용되는 LSTM의 은닉층 차원\n* `batch_size` _(int)_ - 하나의 배치(batch)에 들어갈 데이터의 학생 수\n* `lr` _(float)_ - Adam optimizer의 학습률\n* `n_embedding` _(int, Default:None)_ - Compressed sensing 방식으로 구현할 때, 입력층의 one-hot vector가 인코딩되는 차원. 기본값인 `None`일 경우 compressed sensing을 사용하지 않고 one-hot vector가 직접 LSTM으로 입력됨.\n* `device` _(str, Default:'cpu')_ - 학습 및 추론시 사용할 연산장치. 기본값인 `'cpu'`일 경우 cpu를 사용하고, `'cuda'`일 경우 그래픽카드 사용. _(cuda 버전에 알맞은 pytorch 설치 필요)_\n\n**DKT.fit(batches, n_iter, test_set=None)**\n\n_모델을 주어진 데이터로 학습시키고 평가한다._\n\n* `batches` _(list of torch.Tensor)_ - ItemEncoder에 의해 변환된 학습 데이터\n* `n_iter` _(int)_ 전체 데이터를 반복하여 학습할 횟수(epoch)\n* `test_set` _(list of torch.Tensor, Default:None)_ - 훈련 과정애서 각각의 epoch이 끝난 후 지표를 평가할 테스트집합. 기본값인 `None`일 경우 평가를 생략함.\n\n**DKT.roc_auc_score(batches)**\n\n_데이터에 대한 ROC AUC(수신자 조작 특성 곡선의 밑넓이) 점수를 반환함_\n* `batches` _(list of torch.Tensor)_ - ItemEncoder에 의해 변환된 데이터\n* **return** _(float)_ - ROC AUC 점수\n\n**DKT.bce_score(batches)**\n\n_데이터에 대한 binary cross entropy 점수를 반환함_\n* `batches` _(list of torch.Tensor)_ - ItemEncoder에 의해 변환된 데이터\n* **return** _(float)_ - Binary cross entropy 점수\n\n**DKT.y_true_and_score(batches)**\n\n_데이터에 대해 참값과 예측값을 반환함. (flattened)_\n* `batches` _(list of torch.Tensor)_ - ItemEncoder에 의해 변환된 데이터\n* **return** `y_true, y_score` _(np.ndarray, np.ndarray)_ - 입력된 데이터의 정오답 참값과 예측값에 대해 나열된 `np.ndarray`형태의 데이터\n\n**DKT.predict(data)**\n* `data` _(list of torch.Tensor, or torch.Tensor)_ - ItemEncoder로 변환된 학생 데이터의 리스트, 혹은 개별 학생의 데이터.\n* **return** `predictions` _(list of np.ndarray, or np.ndarray)_ 문항반응 예측의 변화를 나타낸 개별 `np.ndarray` 혹은 그 리스트. 각 학생에 대한 `np.ndarray`는 (학생의 응답 수, 전체 문항수)의 크기를 가진다.\n\n**DKT.influence_matrix()**\n\n_모델의 연관 행렬을 `np.ndarray` 형식으로 반환한다._\n* **return** `matrix` _(np.ndarray)_ - 연관 행렬 $J$\n\n**DKT.graph(item_encoder, method='conditional', use_label=False, threshold=0.1, pair_threshold=0)**\n\n_모델의 지식 공간의 그래프를 `networkx.DiGraph` 형식으로 반환한다._\n* `item_encoder` *(ItemEncoder)* - 데이터를 변환할 때 사용된 `ItemEncoder` 객체\n* `method` _(str, Default:'conditional')_ - 그래프의 가중치를 부여하는 방법. 기본값인 `'conditional'`일 경우, 한 문항에서 다른 문항으로 전이될 확률(transition probability)에 모델이 추정한 점수를 곱하여 사용. `'transition'`일 경우, 전이 확률만을 사용.\n* `use_label` _(bool, Default:False)_ - `ItemEncoder`에 입력된 원본 라벨을 사용할 것인지에 대한 여부. 기본값인 `False`로 설정시, 자연수 인덱스로 대체됨.\n* `threshold` _(float, Default:0.1)_ - 그래프의 엣지를 생성하기 위한 임계값. 원본 논문에서는 Khan dataset에 대해 0.1을 사용함.\n* `pair_threshold` _(float, Default:0)_ - 엣지가 생성되기 위해 문항의 {A, B} 순서쌍이 가져야 할 최소 빈도. 원본 논문에서는 Khan dataset에 대해 0.01을 사용함.\n* **return** `g` _(networkx.DiGraph)_ - 가중치가 부여된 유향 그래프 객체\n\n## Author Contact\n\n황준오 (wnsdh10@snu.ac.kr)\n\n서울대학교 물리교육과 데이터사이언스 연구실\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuno-hwang%2Fjuno-dkt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuno-hwang%2Fjuno-dkt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuno-hwang%2Fjuno-dkt/lists"}