344

LESSWRONG
LW

343
Software ToolsAI
Frontpage

5

[ Question ]

What's a good way to test basic machine learning code?

by Kenny
11th Mar 2021
1 min read
A
2
9

5

5

What's a good way to test basic machine learning code?
3Kenny
3gwern
1Kenny
2Zac Hatfield-Dodds
1Kenny
1Kenny
2Zac Hatfield-Dodds
1Kenny
1Kenny
New Answer
New Comment

2 Answers sorted by
top scoring

Kenny

Mar 17, 2021

30

Someone suggested these resources:

  • UCI Machine Learning Repository
  • MLPerf, which is apparently now part of MLCommons
  • Stanford DAWN Deep Learning Benchmark (DAWNBench) ·
  • deepmind/lab: A customisable 3D platform for agent-based AI research

They specifically suggested "ALE/DMLab for DRL" but I couldn't find an obvious result for "ALE" when I searched for it. (It's a common acronym!)

Add Comment
[-]gwern4y30

ALE is doubtless the Atari Learning Environment. I've never seen an 'ALE' in DRL discussions which refers to something else.

Reply
1Kenny4y
Thanks! Of course you would know :)

Zac Hatfield-Dodds

Mar 14, 2021

20

I don't know of any courses specifically on testing ML (or numerical) code, but 'property-based testing' gives you great tools for testing code where coming up with input-output pairs is difficult. I wrote a paper on testing numerical or scientific code last year, and QuiviQ makes great PBT tools for Elixr.

Add Comment
[-]Kenny4y10

Your paper is excellent so far – very readable! Thanks again!

Reply
1Kenny4y
The whole paper was great – I'm sold on property testing!
2Zac Hatfield-Dodds4y
Thanks - I'm glad you liked it, and hope it helps!
[-]Kenny4y10

I see now that my question title could be better. I'm more looking for test cases, than testing tools.

I've added your paper to my reading queue! Thanks!

Reply
Rendering 1/7 comments, sorted by
top scoring
(show more)
Click to highlight new comments since: Today at 2:24 AM
[-]Kenny4y10

I started working on re-implementing my Octave code for the course I took previously and it's going pretty well!

Reply
Moderation Log
More from Kenny
View more
Curated and popular this week
A
2
1
Software ToolsAI
Frontpage

I originally 'scoped' this question based on my inspiration, i.e. a set of example data and their expected answers for various machine learning algorithms or their code components. In other words, a set of test cases that could be used to test implementations of those algorithms or components.

I took the Coursera course Machine Learning (by { Stanford University / Andrew Ng}) and it was great!

I took it because I wanted some 'finger practice' of writing machine learning code and actually running it on my own computer. The course was perfect for that!

One thing in particular that was nice is that the exercises/quizzes/tests that required writing code would have some kind of automated 'endpoint' whereby you could submit your code for testing. (That kind of 'test kata' practice is a really fun way to learn any kind of programming topic, e.g. a new programming language.)

I found these links, on the above course's forum on Coursera, linking to some of the info about the exercises:

  • Machine Learning - Discussions | Coursera
  • Machine Learning - Discussions | Coursera

The course uses Octave, which was fine.

But I want to basically repeat the course – but using completely different tools. (I want to play with this library in particular.)

What are the best alternatives to the course I took, or similar resources that would be helpful in implementing basic machine learning algorithms, but with arbitrary programming tools?