{"id":22039102,"url":"https://github.com/timm/shortr","last_synced_at":"2025-05-07T21:27:18.177Z","repository":{"id":37273127,"uuid":"206205826","full_name":"timm/shortr","owner":"timm","description":"A little lab of learning algorithms (in LUA). Less XAI, but better","archived":false,"fork":false,"pushed_at":"2022-10-01T23:14:04.000Z","size":30594,"stargazers_count":4,"open_issues_count":7,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-31T08:10:28.445Z","etag":null,"topics":["ai","clustering","data-mining","decision-trees","explanation","less-is-more","lua","multi-objective-optimization","naive-bayes-classifier","nearest-neighbors","random-projection","semi-supervised-learning","teaching","xai"],"latest_commit_sha":null,"homepage":"http://menzies.us/shortr","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null}},"created_at":"2019-09-04T01:40:41.000Z","updated_at":"2023-07-31T08:10:28.446Z","dependencies_parsed_at":"2023-01-19T01:46:13.424Z","dependency_job_id":null,"html_url":"https://github.com/timm/shortr","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timm%2Fshortr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timm%2Fshortr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timm%2Fshortr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timm%2Fshortr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timm","download_url":"https://codeload.github.com/timm/shortr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227323966,"owners_count":17764604,"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":["ai","clustering","data-mining","decision-trees","explanation","less-is-more","lua","multi-objective-optimization","naive-bayes-classifier","nearest-neighbors","random-projection","semi-supervised-learning","teaching","xai"],"created_at":"2024-11-30T11:09:26.095Z","updated_at":"2024-11-30T11:09:31.793Z","avatar_url":"https://github.com/timm.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n   \u003cimg width=200 align=right src=\"https://raw.githubusercontent.com/timm/shortr/master/docs/img/cup.png\"\u003e\n \n\n# shortr.lua:\u003cbr\u003e  less, but better XAI. :eyes:\n\n\n Semi-supervised multi-objective optimization XAI.   \nFrom N items, find and explain the best ones, using just log(N) evals.\n \n\n \u003ca href=\"http://menzies.us/shortr\"\u003e \u003cimg align=left src=\"docs/img/docs.png\" width=200\u003e\u003c/a\u003e\u003cbr\u003e  \n  \u003ca  \nhref=\"https://zenodo.org/badge/latestdoi/206205826\"\u003e \u003cimg src=\"https://zenodo.org/badge/206205826.svg\" alt=\"DOI\"\u003e\u003c/a\u003e\u003cbr\u003e\n \u003ca href=\"https://github.com/timm/shortr/actions/workflows/tests.yml\"\u003e\u003cimg src=\"https://github.com/timm/shortr/actions/workflows/tests.yml/badge.svg\"\u003e\u003c/a\u003e  \n \u003cp\u003e\u0026nbsp;\n \n \n\u003e __Dieter Rams:__      \n_\"Less, but better.\"_\n\n\u003e __Alan Perlis:__    \n_\"Simplicity does not precede complexity, but follows it.\"_ \n\n\n\n\u003e __Tony Hoare:__    \n_\"Inside every large program is a small program struggling to get out.\"_\n\n \n\n \n\nNow that you've done _it_, did you really understand _it_? Let's check.\n\nCan you do _it_ better?\nCan you now\nwrite _it_ in fewer lines and do you know how to make _it_ run faster?\nCan you see how _it_ is same/different to other things?\nAnd can you use those similarities to do more things with  _it_? \nFinally, can you teach _it_ quickly to newcomers?\n\nE.g. do I understand a multi-objective semi-supervised XAI?\nWell, maybe. Here's all that, most of which is\nbackground stuff that could be used for other learners.\nOnce\nI build that, I found that decision trees, Naive Bayes classifiers,\nand nearest neighbors were all tiny extensions. \nAlso included here\nis literate programming, self-documenting code and support for\ntest-driven development. \n\nAll in a few hundreds  lines of LUA: \u003cbr\u003e\n\n`awk '!/^(--|[ \\t]*$)/{n++} END {print n\" lines\"}' *.lua`   =\u003e 511 lines\n     \nShare and enjoy.\n\n\n\n### Coding conventions \nBefore reading this code, it might be best to   [review  these local coding conventions](https://github.com/timm/shortr/blob/master/CONTRIBUTE.md).\n\nAnd why, you may ask, is this written in LUA? Well. the whole point of this code is make people say \"hey, that\n   is so easy I can write it in Rust, Typescript, Python, Julia, Erlang,  Ruby, etc, etc...\". So this code steers\n   clear of clever coding practices\n   that might not easily port. Off-the-shelf LUA has less than 2 dozen built-ins-- which makes it pretty useful as a simple executable specification system.\n\n   (Aside: also, for me, LUA is kinda fun to use.)\n   \n[Jack Diederich](https://www.youtube.com/watch?v=o9pEzgHorH0) \n, [Hilary Mason](https://www.youtube.com/watch?v=l2btv0yUPNQ)\n, [Brian McFee](https://brianmcfee.net/papers/ismir2011_sptree.pdf)\n, [Brian Kernighan](https://www.oreilly.com/library/view/beautiful-code/9780596510046/ch01.html)\n, [Joel Grus](https://github.com/joelgrus/data-science-from-scratch).\u003cp\u003e\nEspecially the LISPers: \u003cbr\u003e\n([Peter Seibel](https://gigamonkeys.com/book/)\n  ([Conrad Barski](https://doc.lagout.org/programmation/Lisp/Land%20of%20Lisp_%20Learn%20to%20Program%20in%20Lisp%2C%20One%20Game%20at%20a%20Time%20%5BBarski%202010-11-15%5D.pdf)\n  ([Paul Graham](http://www.paulgraham.com/onlisp.html)\u003cbr\u003e\n    ([Peter Norvig](http://norvig.com/lispy.html)\n      ([Guy Steele](https://dspace.mit.edu/bitstream/handle/1721.1/5790/AIM-353.pdf?sequence=2\u0026isAllowed=y)))))).\n\n\n\n### Role Models\n People that inspire me to code less, but better:\u003cbr\u003e\n[Jack Diederich](https://www.youtube.com/watch?v=o9pEzgHorH0) \n, [Hilary Mason](https://www.youtube.com/watch?v=l2btv0yUPNQ)\n, [Brian Kernighan](https://www.oreilly.com/library/view/beautiful-code/9780596510046/ch01.html)\n, [Joel Grus](https://github.com/joelgrus/data-science-from-scratch)\n, [Brian McFee](https://brianmcfee.net/papers/ismir2011_sptree.pdf).    \nEspecially the LISPers: \u003cbr\u003e\n([Peter Seibel](https://gigamonkeys.com/book/)\n  ([Conrad Barski](https://doc.lagout.org/programmation/Lisp/Land%20of%20Lisp_%20Learn%20to%20Program%20in%20Lisp%2C%20One%20Game%20at%20a%20Time%20%5BBarski%202010-11-15%5D.pdf)\n  ([Paul Graham](http://www.paulgraham.com/onlisp.html)\n    ([Peter Norvig](http://norvig.com/lispy.html)\n      ([Guy Steele](https://dspace.mit.edu/bitstream/handle/1721.1/5790/AIM-353.pdf?sequence=2\u0026isAllowed=y)))))).\n \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimm%2Fshortr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimm%2Fshortr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimm%2Fshortr/lists"}