Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data = Table[
- x -> x^2 + RandomVariate[NormalDistribution[]], {x,
- RandomReal[{-10, 10}, 50]}];
- dataplot = ListPlot[List @@@ data];
- fullyconnectedpredictor =
- Predict[data,
- Method -> {"NeuralNetwork", "NetworkType" -> "FullyConnected"}]
- convolutionalpredictor =
- Predict[data,
- Method -> {"NeuralNetwork", "NetworkType" -> "Convolutional"}]
- Show[dataplot,
- Plot[{fullyconnectedpredictor[x],
- convolutionalpredictor[x]}, {x, -10, 10},
- PlotLegends -> {"FullyConnected", "Convolutional"}]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement