Message Boards Message Boards

Use method NeuralNetwork of Predict in V12?

Posted 5 years ago

Hello, I installed Mathematica 12 on a Mac Book Pro Computer with Mojave OS on which I previously had installed a Mathematica 11 and now upgrade to the 12, and tried to use the Predict function using neuralNetwork method that previously (on 11 version worked), but it seem that it doesn't make any correct prediction. I tried the same on the Mathematica online version and all worked OK, so I ask you to fix the apparent bug on MAC or explain me what could be the problem.

As an example I show you a code sample taken from your reference that doesn't work on Mathematica 12 for MAC:

data = Table[
  x -> x + RandomVariate[NormalDistribution[0, 2]], {x, 
   RandomReal[{-5, 5}, 100]}]; ListPlot[List @@@ data]

p = Predict[data, Method -> "NeuralNetwork"]

Show[Plot[{p[x], p[x] + StandardDeviation[p[x, "Distribution"]], 
   p[x] - StandardDeviation[p[x, "Distribution"]]}, {x, -5, 5}, 
  PlotStyle -> {Blue, Gray, Gray}, Filling -> {2 -> {3}}, 
  Exclusions -> False, PerformanceGoal -> "Speed", 
  PlotLegends -> {"Prediction", "Confidence Interval"}], 
 ListPlot[List @@@ data, PlotStyle -> Red, PlotLegends -> {"Data"}]]

the return of this function on the MAC with Mathematica 12 is a prediction completely FLAT in the middle of output graph while it's OK on the browser for the online version of Mathematica. I tried also reinstalling Mathematica 12, but the problems persist.

Thank you for your attention.

Giovanni Del Papa

Attachment

Attachments:

Hi! It works perfectly in my laptop (Windows) and I get a nice positive prediction line with the confidence interval!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract