I can use the function Predict[] with pre-defined dataset successfully.
A = {1, 2, 3, 4, 5, 6, 7, 8, 9} -> {1, 2, 3, 4, 5, 6, 7, 8, 9}^3;
p = Predict[A]
However, when the length of dataset is unknown. How can I to build the dataset in runtime?
e.g.
(* There are 125 items, the length is unknown until runtime *)
data = {123.5, 123,1, 123.2, 123.3, 123.6,......}
(* "Argument {1,8,27,64,125,216,343,512,729} should be a rule or a list of rules" *)
p = predict[data]
Please feel free to comments.
Predict
assuming you havedata = {1.1, 2.1, 3.1}
and assuming the length ofdata
isn't known a priori. $\endgroup$(Range@Length@# -> #) &@data
? $\endgroup$