Mastering my Machine Learning, I try arithmetic:
ClearAll["Global`*"];
trainingset = {"2+2" -> 4, "2+3*2" -> 8, "(12+7)*5" -> 95, "7*6" -> 42,
"7+22" -> 29, "4+5" -> 9, "4*1+5" -> 9, "17*3+4*5" -> 41, "7+9*2" -> 25, "11+3" -> 14,
"6+6" -> 12, "4*5+6" -> 26, "5*7" -> 35, "3*2" -> 6, "3+2" -> 5, "9*3" -> 27,
"3*9" -> 27, "6*3+8*2" -> 34, "5*4" -> 20};
Making use of different methods, I'd like to compare the results:
p = Predict[trainingset, Method -> "RandomForest"]; p["4+6"]
24.6316
r = Predict[trainingset, Method -> "LinearRegression"]; r["4+6"]
20.3651
t = Predict[trainingset, Method -> "NearestNeighbors"]; t["4+6"]
26.
u = Predict[trainingset, Method -> "DecisionTree"]; u["4+6"]
14.1
w = Predict[trainingset, Method -> "GradientBoostedTrees"]; w["4+6"]
13.7925
However,
s = Predict[trainingset, Method -> "NeuralNetwork"]; s["4+6"]
Beep:The kernel Local has quit (exited) during the course of an evaluation.
Looking in the help, I don't understand that behavior of Predict.
Addition. I mean the result with Method -> "NeuralNetwork". It's clear that a training set of 19 elements is too small to train Predict. My another question is how to generate a training set consisting of 200 examples in an automatic way.
"4+6"is rubbish). Probably a nasty memory related bug. Try also to restart the kernel. Also you can go into the help menu and click "Why the beep?..." Maybe that gives you some idea what happened. Maybe not. – Henrik Schumacher Jul 24 '18 at 17:19