#10 Implement NN bias prediction

This code will be merged as is (without a very thorough check).  The code is known to work.