Update

Negative and positive examples are selected randomly for training now
and code updated to look cleaner