[SciPy-dev] Any advice on testing scientific algorithms?
Fernando.Perez at colorado.edu
Thu Jan 26 16:13:08 CST 2006
Jonathan Taylor wrote:
> I am wondering if any of you have thoughts on how to test scientific
> algorithms. For example, an algorithm that tries to learn some sort
> of probalistic model.
> The only thing that really comes to mind is regression testing. Any
> suggestions here?
> Would I just print the output to output.txt once, and then as a test,
> rerun and make sure I get the same output.txt?
> I suppose I would have to use a fixed seed, to make sure that I get
> the same results. Will floating point numbers show up differently on
> different architectures?
Sorry that I can't give a longer answer right now, but the scipy test suite is
a good place to look at for pointers. It also contains a bunch of utilities
for testing, including comparisons for arrays with controlled floating point
accuracy. I use those a lot, they're quite handy.
More information about the Scipy-dev