Skip to content

Latest commit

 

History

History
102 lines (65 loc) · 4.12 KB

README.md

File metadata and controls

102 lines (65 loc) · 4.12 KB

shortr.lua:
less, but better XAI. 👀

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))))).