Machine learning of “>” [closed]

Here is what should be a simple problem with the current state of technology:

foo = Array[With[{pair = RandomInteger[1000, 2]},
pair -> If[pair[[1]] > pair[[2]], 1, 0]] &, 2000]

p = Predict[foo]


Now, this gives me total junk, and giving "RandomForest" or "NeuralNetwork" as method does not give any joy either. Any suggestions?

• Isn't it a task for Classify? Then it performs logistic regression with almost perfect test results. – swish May 12 '17 at 23:48
• @swish I am a complete novice at this, so I had no idea these were different... – Igor Rivin May 12 '17 at 23:57
• The downvote seems uncalled for. – Igor Rivin May 13 '17 at 3:03