{"id":13696283,"url":"https://github.com/angeloskath/supervised-lda","last_synced_at":"2025-10-12T00:06:55.724Z","repository":{"id":75493441,"uuid":"52209660","full_name":"angeloskath/supervised-lda","owner":"angeloskath","description":"A flexible variational inference LDA library.","archived":false,"fork":false,"pushed_at":"2019-03-15T16:03:29.000Z","size":5721,"stargazers_count":23,"open_issues_count":4,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-22T05:48:42.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/angeloskath.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-02-21T14:11:47.000Z","updated_at":"2025-07-04T21:22:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"54aad889-d7ae-43ec-b7e0-32da22661ba7","html_url":"https://github.com/angeloskath/supervised-lda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angeloskath/supervised-lda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeloskath%2Fsupervised-lda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeloskath%2Fsupervised-lda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeloskath%2Fsupervised-lda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeloskath%2Fsupervised-lda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angeloskath","download_url":"https://codeload.github.com/angeloskath/supervised-lda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angeloskath%2Fsupervised-lda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009475,"owners_count":26084609,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":[],"created_at":"2024-08-02T18:00:38.065Z","updated_at":"2025-10-12T00:06:55.667Z","avatar_url":"https://github.com/angeloskath.png","language":"C++","funding_links":[],"categories":["Libraries \u0026 Toolkits"],"sub_categories":[],"readme":"LDA++\n=====\n\nLDA++ is a C++ library and a set of accompanying console applications that\nenable the inference of various [Latent Dirichlet\nAllocation](https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation) models.\n\nThe project provides three [console applications](http://ldaplusplus.com/console-applications/)\n\n* **lda** implementing **LDA**\n* **slda** implementing **Supervised LDA**\n* **fslda** implementing **Fast Supervised LDA**\n\nand a library that can be used from your own C++ projects.\n\nYou can read the documentation site at\n[ldaplusplus.com](http://ldaplusplus.com/) and there is of course an [API\ndocumentation](http://ldaplusplus.com/api/) as well.\n\nHow to get it\n-------------\n\nWe use CMake for building the project and currently only provide the option to\nbuild from source. The [LDA++\ninstallation](http://ldaplusplus.com/installation/) process is straightforward\nand documented at our site.\n\nConsole applications\n--------------------\n\nWe expect that the preferred way of using LDA++ will be through the provided\nconsole applications. You can read thorough [documentation for\nthem](http://ldaplusplus.com/console-applications/) as well. All our console\napplications are designed to read matrix files serialized in numpy format so\nthat one can easily create files in a python session.\n\nIt suffices to say that the following shell session runs the Fast Supervised\nLDA (fsLDA) on the scikit learn digits dataset (provided you have installed\nLDA++).\n\n    $ python\n    Python 2.7.12 (default, Jul  1 2016, 15:12:24) \n    [GCC 5.4.0 20160609] on linux2\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e from sklearn.datasets import load_digits\n    \u003e\u003e\u003e import numpy as np\n    \u003e\u003e\u003e d = load_digits()\n    \u003e\u003e\u003e with open(\"digits.npy\", \"wb\") as f:\n    ...     np.save(f, d.data.astype(np.int32).T)\n    ...     np.save(f, d.target.astype(np.int32))\n    ... \n    \u003e\u003e\u003e exit()\n    $ fslda train digits.npy model.npy\n    E-M Iteration 1\n    100\n    200\n    300\n    400\n    500\n    600\n    700\n    800\n    900\n    1000\n    1100\n    1200\n    1300\n    1400\n    1500\n    1600\n    1700\n    log p(y | \\bar{z}, eta): -4137.75\n    log p(y | \\bar{z}, eta): -3230.67\n    log p(y | \\bar{z}, eta): -2758.81\n    log p(y | \\bar{z}, eta): -2498.32\n    log p(y | \\bar{z}, eta): -2341.4\n    log p(y | \\bar{z}, eta): -2240.48\n    log p(y | \\bar{z}, eta): -2172.38\n    log p(y | \\bar{z}, eta): -2124.71\n    log p(y | \\bar{z}, eta): -2090.4\n    log p(y | \\bar{z}, eta): -2065.15\n    ...\n    $ python\n    Python 2.7.12 (default, Jul  1 2016, 15:12:24) \n    [GCC 5.4.0 20160609] on linux2\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e import numpy as np\n    \u003e\u003e\u003e with open(\"model.npy\") as f:\n    ...     alpha = np.load(f)\n    ...     beta = np.load(f)\n    ...     eta = np.load(f)\n    ...\n    \u003e\u003e\u003e import matplotlib.pyplot as plt\n    \u003e\u003e\u003e plt.imshow(beta[0].reshape(8, 8), interpolation='nearest', cmap='gray')\n    \u003cmatplotlib.image.AxesImage object at 0x7f4cf201b810\u003e\n    \u003e\u003e\u003e plt.show()\n    \u003e\u003e\u003e exit()\n\nLicense\n-------\n\nMIT license found in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeloskath%2Fsupervised-lda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangeloskath%2Fsupervised-lda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangeloskath%2Fsupervised-lda/lists"}