I am reading a file
test = ReadList["https://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.data", {Record, Record, Record, Record, Record, Record, Record, Record, Record}, 768, RecordSeparators -> {",", "\n", "\r", "\r\n"}]
I want to get that data in the following format (I only show a snippet)
data = {{6, 148, 72, 35, 0, 33.6, 0.627, 50} -> 1, {1, 85, 66, 29, 0, 26.6, 0.351, 31} -> 0, {8, 183, 64, 0, 0, 23.3, 0.672, 32} -> 1, {1, 89, 66, 23, 94, 28.1, 0.167, 21} -> 0, {0, 137, 40, 35, 168, 43.1, 2.288, 33} -> 1}
I was able to use the following, but cannot seem to finish it to be like the above using
data1 = Table[Insert[test[[i]], "->", 9], {i, 1, Length[test]}]
Next, I would like to be able to select some number of those $ 768$ randomly, say $ 700$ of them in one list and then the other $ 68$ in another list. Is there a simple command that can do that (been searching, but no luck so far)?
The whole purpose for this is to put the data in a format to use the Classify command.