shortr

A little lab of learning algorithms (in LUA). Less XAI, but better

https://github.com/timm/shortr

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary

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
Last synced: 4 months ago · JSON representation ·

Repository

A little lab of learning algorithms (in LUA). Less XAI, but better

Basic Info
  • Host: GitHub
  • Owner: timm
  • License: other
  • Language: HTML
  • Default Branch: master
  • Homepage: http://menzies.us/shortr
  • Size: 29.2 MB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 3
  • Open Issues: 7
  • Releases: 3
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
Created over 6 years ago · Last pushed about 3 years ago
Metadata Files
Readme License Code of conduct Citation

README.md

shortr.lua:
less, but better XAI. :eyes:

Semi-supervised multi-objective optimization XAI.
From N items, find and explain the best ones, using just log(N) evals.



DOI

 

Dieter Rams:
"Less, but better."

Alan Perlis:
"Simplicity does not precede complexity, but follows it."

Tony Hoare:
"Inside every large program is a small program struggling to get out."

Now that you've done it, did you really understand it? Let's check.

Can you do it better? Can you now write it in fewer lines and do you know how to make it run faster? Can you see how it is same/different to other things? And can you use those similarities to do more things with it? Finally, can you teach it quickly to newcomers?

E.g. do I understand a multi-objective semi-supervised XAI? Well, maybe. Here's all that, most of which is background stuff that could be used for other learners. Once I build that, I found that decision trees, Naive Bayes classifiers, and nearest neighbors were all tiny extensions. Also included here is literate programming, self-documenting code and support for test-driven development.

All in a few hundreds lines of LUA:

awk '!/^(--|[ \t]*$)/{n++} END {print n" lines"}' *.lua => 511 lines

Share and enjoy.

Coding conventions

Before reading this code, it might be best to review these local coding conventions.

And why, you may ask, is this written in LUA? Well. the whole point of this code is make people say "hey, that is so easy I can write it in Rust, Typescript, Python, Julia, Erlang, Ruby, etc, etc...". So this code steers clear of clever coding practices 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.

(Aside: also, for me, LUA is kinda fun to use.)

Jack Diederich , Hilary Mason , Brian McFee , Brian Kernighan , Joel Grus.

Especially the LISPers:
(Peter Seibel (Conrad Barski (Paul Graham
(Peter Norvig (Guy Steele))))).

Role Models

People that inspire me to code less, but better:
Jack Diederich , Hilary Mason , Brian Kernighan , Joel Grus , Brian McFee.
Especially the LISPers:
(Peter Seibel (Conrad Barski (Paul Graham (Peter Norvig (Guy Steele))))).

Owner

  • Name: Tim Menzies
  • Login: timm
  • Kind: user
  • Location: Raleigh, North Carolina, USA
  • Company: CS, NC State, USA

IEEE Fellow, prof, phd, computer scientist, ex-nurse, rocketman, taxi-driver, journalist (it all made sense at the time).

Citation (CITATION.cff)

@article{shortr22, 
  title={timm/shortr: less AI, but better}, 
  DOI={10.5281/zenodo.6607038}, 
  abstractNote={A little lab of learners (in LUA)}, 
  publisher={Zenodo}, 
  author={Tim Menzies}, 
  year={2022}, 
  month={Jun} 
}

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 8
  • Total pull requests: 1
  • Average time to close issues: over 1 year
  • Average time to close pull requests: less than a minute
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 0.13
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • timm (7)
  • bennyschudel (1)
Pull Request Authors
  • timm (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/tests.yml actions
  • actions/checkout v2 composite
etc/src/node_modules/form-data/node_modules/async/bower.json bower
  • lodash >=2.4.1 development
  • nodelint >0.0.0 development
  • nodeunit >0.0.0 development
  • uglify-js 1.2.x development
etc/src/node_modules/asn1/package.json npm
  • tap 0.1.4 development
etc/src/node_modules/async/package.json npm
  • nodelint >0.0.0 development
  • nodeunit >0.0.0 development
  • uglify-js 1.2.x development
etc/src/node_modules/boom/package.json npm
  • complexity-report 0.x.x development
  • lab 0.1.x development
  • hoek 0.9.x
etc/src/node_modules/combined-stream/package.json npm
  • far ~0.0.7 development
  • delayed-stream 0.0.5
etc/src/node_modules/commander/package.json npm
  • should >= 0.0.1 development
etc/src/node_modules/cryptiles/package.json npm
  • complexity-report 0.x.x development
  • lab 0.1.x development
  • boom 0.4.x
etc/src/node_modules/delayed-stream/package.json npm
  • fake 0.2.0 development
  • far 0.0.1 development
etc/src/node_modules/form-data/node_modules/async/package.json npm
  • lodash >=2.4.1 development
  • nodelint >0.0.0 development
  • nodeunit >0.0.0 development
  • uglify-js 1.2.x development
etc/src/node_modules/form-data/package.json npm
  • fake ~0.2.2 development
  • far ~0.0.7 development
  • formidable ~1.0.14 development
  • request ~2.36.0 development
  • async ~0.9.0
  • combined-stream ~0.0.4
  • mime ~1.2.11
etc/src/node_modules/hawk/package.json npm
  • complexity-report 0.x.x development
  • lab 0.1.x development
  • localStorage 1.0.x development
  • boom 0.4.x
  • cryptiles 0.2.x
  • hoek 0.9.x
  • sntp 0.2.x
etc/src/node_modules/hoek/package.json npm
  • complexity-report 0.x.x development
  • lab 0.1.x development
etc/src/node_modules/http-signature/package.json npm
  • node-uuid ^1.4.1 development
  • tap 0.4.2 development
  • asn1 0.1.11
  • assert-plus ^0.1.5
  • ctype 0.5.3
etc/src/node_modules/json-stringify-safe/package.json npm
  • mocha >= 2.1.0 < 3 development
  • must >= 0.12 < 0.13 development
  • sinon >= 1.12.2 < 2 development
etc/src/node_modules/mkdirp/package.json npm
  • tap ~0.4.0 development
etc/src/node_modules/ms/package.json npm
  • expect.js * development
  • mocha * development
  • serve * development
etc/src/node_modules/node-uuid/package.json npm
  • nyc ^2.2.0 development
etc/src/node_modules/psl/package.json npm
  • JSONStream ^1.3.5 development
  • browserify ^17.0.0 development
  • browserslist-browserstack ^3.1.1 development
  • browserstack-local ^1.5.1 development
  • chai ^4.3.6 development
  • commit-and-pr ^1.0.4 development
  • eslint ^8.19.0 development
  • mocha ^7.2.0 development
  • porch ^2.0.0 development
  • request ^2.88.2 development
  • selenium-webdriver ^4.3.0 development
  • serve-handler ^6.1.3 development
  • uglify-js ^3.16.2 development
  • watchify ^4.0.0 development
etc/src/node_modules/punycode/package.json npm
  • codecov ^1.0.1 development
  • istanbul ^0.4.1 development
  • mocha ^2.5.3 development
etc/src/node_modules/qs/package.json npm
  • expect.js * development
  • mocha * development
etc/src/node_modules/quotemeta/package.json npm
  • tap ~0.3.0 development
  • tape ~0.1.5 development
etc/src/node_modules/request/package.json npm
  • forever-agent ~0.5.0
  • json-stringify-safe ~5.0.0
  • mime ~1.2.9
  • node-uuid ~1.4.0
  • qs ~0.6.0
etc/src/node_modules/sntp/package.json npm
  • complexity-report 0.x.x development
  • lab 0.1.x development
  • hoek 0.9.x
etc/src/node_modules/tldr/package.json npm
  • connect ~2.11.2 development
  • mocha ~1.15.1 development
  • should ~2.1.1 development
  • ansicolors ~0.3.2
  • ansistyles ~0.1.3
  • async ~0.2.9
  • commander ~2.1.0
  • markit ~0.1.0
  • mkdirp ~0.3.5
  • ms ~0.6.2
  • request ~2.33.0
  • rimraf ~2.2.6
  • unhtml ~0.1.0
etc/src/node_modules/tough-cookie/package.json npm
  • async ^2.6.2 development
  • eslint ^5.16.0 development
  • eslint-config-prettier ^4.2.0 development
  • eslint-plugin-prettier ^3.0.1 development
  • genversion ^2.1.0 development
  • nyc ^14.0.0 development
  • prettier ^1.17.0 development
  • vows ^0.8.2 development
  • psl ^1.1.33
  • punycode ^2.1.1
  • universalify ^0.1.2
etc/src/node_modules/unhtml/package.json npm
  • tape ~0.2.2 development
  • html5-entities ~0.5.0
  • quotemeta ~0.0.0
etc/src/node_modules/universalify/package.json npm
  • colortape ^0.1.2 development
  • coveralls ^3.0.1 development
  • nyc ^10.2.0 development
  • standard ^10.0.1 development
  • tape ^4.6.3 development
etc/src/package-lock.json npm
  • ansicolors 0.3.2
  • ansistyles 0.1.3
  • asn1 0.1.11
  • assert-plus 0.1.5
  • async 0.2.10
  • async 0.9.2
  • aws-sign2 0.5.0
  • boom 0.4.2
  • combined-stream 0.0.7
  • commander 2.1.0
  • cryptiles 0.2.2
  • ctype 0.5.3
  • delayed-stream 0.0.5
  • forever-agent 0.5.2
  • form-data 0.1.4
  • hawk 1.0.0
  • hoek 0.9.1
  • html5-entities 0.5.1
  • http-signature 0.10.1
  • json-stringify-safe 5.0.1
  • markit 0.1.0
  • mime 1.2.11
  • mkdirp 0.3.5
  • ms 0.6.2
  • node-uuid 1.4.8
  • oauth-sign 0.3.0
  • psl 1.9.0
  • punycode 2.1.1
  • qs 0.6.6
  • quotemeta 0.0.0
  • request 2.33.0
  • rimraf 2.2.8
  • sntp 0.2.4
  • tldr 0.0.6
  • tough-cookie 4.0.0
  • tunnel-agent 0.3.0
  • unhtml 0.1.0
  • universalify 0.1.2
etc/src/package.json npm
  • tldr ^0.0.6