Skip to main content
edited title
Link
user64494
  • 29.1k
  • 4
  • 29
  • 56

How to predict number from a set of data?

Source Link

How to predict number from a set of data

I have 2 sets of data. For example,

a={1,2,3,4,5}
b={5,4,3,2,1}
data= MapThread[List,{a,b}];
p = Predict[Rule @@@ ta12, 
  Method -> {"NearestNeighbors", Range[1,5]}]

I expect to have a set of {1,3},{3,5}.. something like this. Unfortunately, I got an error that the format is incorrect. How Should I fix it? Thank you very much.