Monday, December 16, 2019

"NeuralNetwork" Method


train=Table[x->Sin[x]*Exp[x]+RandomVariate[NormalDistribution[0,1]],
{x,RandomReal[{-3,3},100]}];
methods={"NeuralNetwork","RandomForest","GaussianProcess"};
{NN,RF,GP}=Predict[train, Method->#] &/@ methods;
Show[ListPlot[List@@@train,PlotStyle->Black,PlotLegends->{"Data"}],
         Plot[{NN[x],RF[x],GP[x]},{x,-3,3},PlotLegends->methods]]


No comments:

Post a Comment