{"id":13696596,"url":"https://github.com/yao8839836/PTM","last_synced_at":"2025-05-03T17:31:44.273Z","repository":{"id":83445697,"uuid":"50910742","full_name":"yao8839836/PTM","owner":"yao8839836","description":"A Topic Modeling Approach for Traditional Chinese Medicine Prescriptions. TKDE 2018","archived":false,"fork":false,"pushed_at":"2019-11-30T16:54:56.000Z","size":20720,"stargazers_count":76,"open_issues_count":2,"forks_count":26,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T18:48:13.117Z","etag":null,"topics":["herbs","knowledge","prescriptions","symptoms","topic-modeling","traditional-chinese-medicine"],"latest_commit_sha":null,"homepage":"","language":"Java","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/yao8839836.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,"governance":null}},"created_at":"2016-02-02T09:51:39.000Z","updated_at":"2025-04-22T11:54:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"bafdfd13-0a4b-45f4-a147-1f86daec889d","html_url":"https://github.com/yao8839836/PTM","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/yao8839836%2FPTM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yao8839836%2FPTM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yao8839836%2FPTM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yao8839836%2FPTM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yao8839836","download_url":"https://codeload.github.com/yao8839836/PTM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252226766,"owners_count":21714866,"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":["herbs","knowledge","prescriptions","symptoms","topic-modeling","traditional-chinese-medicine"],"created_at":"2024-08-02T18:00:43.174Z","updated_at":"2025-05-03T17:31:39.262Z","avatar_url":"https://github.com/yao8839836.png","language":"Java","funding_links":[],"categories":["Models"],"sub_categories":["Exotic models"],"readme":"# PTM\n\nThe dataset and implementation of Prescription Topic Model in our paper:\n\nLiang Yao, Yin Zhang, Baogang Wei, Wenjin Zhang, Zhe Jin. (2018). \"A Topic Modeling Approach for Traditional Chinese Medicine Prescriptions\". IEEE Transactions on Knowledge and Data Engineering (TKDE) 30(6), pp.1007-1021. \n\n\n# Require\nJava 7 or above, I use Java 8 in this project.\n\nEclipse\n\n\n# Data\n\nThe Copyright holder of the dataset is [China Knowledge\nCentre for Engineering Sciences and Technology (CKCEST)](http://zcy.ckcest.cn/tcm/). The dataset is for research use only. Any commercial use, sale, or other monetization is prohibited.\n\n98,334 raw prescriptions with herbs and symptoms are in `/data/prescriptions.txt` . Each line is for a prescription, symptoms are on the left and herbs are on the right.\n\nThe preprocessed 33,765 prescriptions: `/data/pre_herbs.txt`, `/data/pre_symptoms.txt`. \n\n`Training set`: `/data/pre_herbs_train.txt`, `/data/pre_symptoms_train.txt`\n\n`Test set`: `/data/pre_herbs_test.txt`, `/data/pre_symptoms_test.txt`\n\nNote: \n1. Each line in above files is for a prescription, the same line in `/data/pre_herbsX.txt` and `/data/pre_symptomsX.txt` (X is _train or _test or ' ' ) is for the same prescription.\n\n2. Each number in above files means an herb or a symptom, each number is an index of the following herb list or symptom list. For example, '5' in `/file/pre_herbs_train.txt` means the 6th herb in the herb list `/data/herbs_contains.txt`, '17' in `/file/pre_symptoms_train.txt` means the 18th symptom in the symptom list `/data/symptom_contains.txt`. \n\n\nHerb list: `/data/herbs_contains.txt`\n\nSymptom list: `/data/symptom_contains.txt`\n\nTCM MeSH herb-symptom correspondence knowledge: `/data/symptom_herb_tcm_mesh.txt`\n\nSymptom Category: `/data/symptom_category.txt`\n\n# Demo\n\n`PTM(a)`: /src/test/RunPTMa.java (reproducing prescribing patterns discovery results)\n\n`PTM(b)`: /src/test/RunPTMb.java\n\n`PTM(c)`: /src/test/RunPTMc.java\n\n`PTM(d)`: /src/test/RunPTMd.java\n\n# Herbs and symptoms prediction/recommendation tasks \n(reproducing herbs/symptoms predictive perplexity and precision@N results)\n\n`PTM(a)`: /src/test/PTMaPredict.java\n\n`PTM(b)`: /src/test/PTMbPredict.java\n\n`PTM(c)`: /src/test/PTMcPredict.java\n\n`PTM(d)`: /src/test/PTMdPredict.java\n\n# Topic herb precision\n\n/src/test/TopicPrecisionSymToHerb.java\n\n# Prescription predictive perplexity\n\n`PTM(a)`: src/perplexity/PTMaPerplexity.java\n\n`PTM(b)`: src/perplexity/PTMbPerplexity.java\n\n`PTM(c)`: src/perplexity/PTMcPerplexity.java\n\n`PTM(d)`: src/perplexity/PTMdPerplexity.java\n \n# Topic symptom coherence\n\n/src/test/TopicKnowCoherence.java\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyao8839836%2FPTM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyao8839836%2FPTM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyao8839836%2FPTM/lists"}