Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. data = Table[
  2. x -> x^2 + RandomVariate[NormalDistribution[]], {x,
  3. RandomReal[{-10, 10}, 50]}];
  4. dataplot = ListPlot[List @@@ data];
  5.  
  6. fullyconnectedpredictor =
  7. Predict[data,
  8. Method -> {"NeuralNetwork", "NetworkType" -> "FullyConnected"}]
  9.  
  10. convolutionalpredictor =
  11. Predict[data,
  12. Method -> {"NeuralNetwork", "NetworkType" -> "Convolutional"}]
  13.  
  14. Show[dataplot,
  15. Plot[{fullyconnectedpredictor[x],
  16. convolutionalpredictor[x]}, {x, -10, 10},
  17. PlotLegends -> {"FullyConnected", "Convolutional"}]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement