[SciPy-dev] Any advice on testing scientific algorithms?

Stefan Seefeld seefeld at sympatico.ca
Thu Jan 26 16:17:33 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?

Probably, yes. In fact, if you are trying to validate
statistical / stochastic algorithms involving you probably don't want to
compare numbers bitwise, but rather make sure the numbers fall into a
valid range.

But using a fixed seed is valuable for reproducibility nonetheless. :-)

Regards,
		Stefan




More information about the Scipy-dev mailing list