Now recording link existence history.
Partially added cost history to cost model.  The F-score is greatly improved by this change but for my sanity check test case its pulling the prediction in the wrong.  Temporarily commenting out its effect so that the tests still pass and I can check in the code changes before debugging the situation.
(1) added some tests for ErrorMetrics as a sanity check
(2) found and fix bug with data stream - was mistakenly appending to array and then shuffling it, instead of trashing old array
Okay, cost history has been properly added to the cost model and model performance is looking much better.  The bug was that I was training on the label, oops ;-)