Very cool. In the experiment, my neural network was far more accurate than YIQ, at least according to my preferences.
The neural network approach goes a step further and accounts for how the brain processes color. There's no reason to consider that notion of "contrast" less valid than the brain-agnostic eye based model. In fact, in the context of readability, the psychovisual notion is far more useful.
W3C, in Web Content Accessibility Guidelines (WCAG) 2.0 [1] recommends a different and more complex algorithm [2] for calculating contrast between colours, which could be used instead for choosing white or black text. It would be interesting to see how the two approaches compare.
1. http://www.w3.org/TR/2008/REC-WCAG20-20081211/
2. http://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-...