1
$\begingroup$

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.

$\endgroup$

closed as off-topic by Niki Estner, MarcoB, halirutan Aug 1 '18 at 12:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant." – Niki Estner, MarcoB, halirutan
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Works fine in version 11.3 on macOS (apart from the fact that result of "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. $\endgroup$ – Henrik Schumacher Jul 24 '18 at 17:19
  • $\begingroup$ @Henrik Schumacher: Thank you for your interest to my question. If you carefully read my answer, you will see I looked in "Why Beep". A new kernel does not help. $\endgroup$ – user64494 Jul 24 '18 at 17:37
  • $\begingroup$ Ah sorry. Well, then I guess this is a OS-related bug. $\endgroup$ – Henrik Schumacher Jul 24 '18 at 17:39
  • $\begingroup$ @Henrik Schumacher: I work in version 11.3 on Windows 10 32-bit. $\endgroup$ – user64494 Jul 24 '18 at 17:41
  • $\begingroup$ It works fine on my machine running Windows 10, 64bit $\endgroup$ – Niki Estner Jul 24 '18 at 17:48

Browse other questions tagged or ask your own question.