A Noise Metric on Binary Training Inputs and a Framework for Learning Generalization