海南最权威的打奖公众号海南梦兆
梦想和梦兆,一个都不能少
————START————
海南梦兆团队自主研发人工智能预测算法。
基于七星彩和排列五历史开奖数据进行机器学习训练,并模拟预测最新一期结果。
算法采用LSTM(Long Short-Term Memory),LSTM是长短期记忆网络,是一种时间循环神经网络,适合于处理和预测时间序列中间隔和延迟相对较长的重要事件。
LSTM 已经在科技领域有了多种应用。基于 LSTM 的系统可以学习翻译语言、控制机器人、图像分析、文档摘要、语音识别图像识别、手写识别、控制聊天机器人、预测疾病、点击率和股票、合成音乐等等任务。
模拟过程截图:
预测源代码:
% Solve an Autoregression Time-Series Problem with a NAR Neural Network% Script generated by Neural Time Series app% Created 22-May-2019 11:27:38%% This script assumes this variable is defined:%% data - feedback time series.
T = tonndata(data,false,false);
% Choose a Training Function% For a list of all training functions type: help nntrain% 'trainlm' is usually fastest.% 'trainbr' takes longer but may be better for challenging problems.% 'trainscg' uses less memory. Suitable in low memory situations.trainFcn = 'trainbr'; % Levenberg-Marquardt backpropagation.
% Create a Nonlinear Autoregressive NetworkfeedbackDelays = 1:2;hiddenLayerSize = 10;net = narnet(feedbackDelays,hiddenLayerSize,'open',trainFcn);
% Prepare the Data for Training and Simulation% The function PREPARETS prepares timeseries data for a particular network,% shifting time by the minimum amount to fill input states and layer% states. Using PREPARETS allows you to keep your original time series data% unchanged, while easily customizing it for networks with differing% numbers of delays, with open loop or closed loop feedback modes.[x,xi,ai,t] = preparets(net,{},{},T);
% Setup Division of Data for Training, Validation, Testingnet.divideParam.trainRatio = 70/100;net.divideParam.valRatio = 15/100;net.divideParam.testRatio = 15/100;
% Train the Network[net,tr] = train(net,x,t,xi,ai);
% Test the Networky = net(x,xi,ai);e = gsubtract(t,y);performance = perform(net,t,y)
% View the Networkview(net)
% Plots% Uncomment these lines to enable various plots.%figure, plotperform(tr)%figure, plottrainstate(tr)%figure, ploterrhist(e)%figure, plotregression(t,y)%figure, plotresponse(t,y)%figure, ploterrcorr(e)%figure, plotinerrcorr(x,e)
% Closed Loop Network% Use this network to do multi-step prediction.% The function CLOSELOOP replaces the feedback input with a direct% connection from the outout layer.netc = closeloop(net);netc.name = [net.name ' - Closed Loop'];view(netc)[xc,xic,aic,tc] = preparets(netc,{},{},T);yc = netc(xc,xic,aic);closedLoopPerformance = perform(net,tc,yc)
% Step-Ahead Prediction Network% For some applications it helps to get the prediction a timestep early.% The original network returns predicted y(t+1) at the same time it is% given y(t+1). For some applications such as decision making, it would% help to have predicted y(t+1) once y(t) is available, but before the% actual y(t+1) occurs. The network can be made to return its output a% timestep early by removing one delay so that its minimal tap delay is now% 0 instead of 1. The new network returns the same outputs as the original% network, but outputs are shifted left one timestep.nets = removedelay(net);nets.name = [net.name ' - Predict One Step Ahead'];view(nets)[xs,xis,ais,ts] = preparets(nets,{},{},T);ys = nets(xs,xis,ais);stepAheadPerformance = perform(nets,ts,ys)
最新推荐请往下拉:
日期类型期号预测号码开奖2019-6-5排列五19149971288052019-6-6排列五19150359896632019-6-7排列五19151109857582019-6-7七星彩19065702043362019-6-8排列五19152359128562019-6-9排列五19153408906042019-6-9七星彩19066241167782019-6-10排列五19154005737832019-6-11排列五19155792308112019-6-11七星彩19067995808852019-6-12排列五19156566365922019-6-13排列五19157838331262019-6-14
排列五19158442272102019-6-14七星彩19068181966332019-6-15排列五19159388619632019-6-16七星彩19069415866802019-6-16排列五19160452746592019-6-17排列五19161997899732019-6-18七星彩19070949742492019-6-18排列五19162737061022019-6-19排列五19163331449392019-6-20排列五19164595279712019-6-21七星彩
19071069324982019-6-21排列五19165660911202019-6-22排列五19166020086562019-6-23七星彩19072466386102019-6-23排列五19167265130752019-6-24排列五19168127870322019-6-25七星彩19073103222452019-6-25排列五19169525304152019-6-26排列五19170548036472019-6-27排列五19171038844372019-6-28七星彩19074957309562019-6-28排列五19172141175252019-6-29排列五19173049388472019-6-30
七星彩19075160183322019-6-30排列五19174521139912019-7-1排列五1917541033895
2019-7-2七星彩190764049
2597
2019-7-2排列五191765837
0964
2019-7-3排列五191774371
2326
2019-7-4排列五191787714
7746
2019-7-5七星彩190770408
4251
2019-7-5排列五191798671
7613
2019-7-6排列五191806565
2485
2019-7-7
七星彩190785477
4070
2019-7-7排列五191812295
3060
2019-7-8排列五191827867
7615
2019-7-9七星彩190792418
9854
2019-7-9排列五191835639
8326
2019-7-10排列五191849912
4495
2019-7-11排列五191855224
4369
2019-7-12七星彩190806673
3255
2019-7-12排列五191860952
5476
2019-7-13排列五191878074
8998
2019-7-14七星彩190819337
4307
2019-7-14排列五1918853403162
2019-7-15排列五191896496
8909
2019-7-16七星彩190821041
0673
2019-7-16排列五191902084
1702
2019-7-17排列五191918108
2503
2019-7-18排列五191925097
7294
2019-7-19
七星彩190837384
0495
2019-7-19排列五191935086
6520
2019-7-21
七星彩190847433
6479
2019-7-21排列五1919560486891
2019-7-22排列五1919607046452
2019-7-23七星彩1908553017198
2019-7-23排列五1919730386225
2019-7-24排列五1919887572573
2019-7-25排列五1919987724762
2019-7-26七星彩190865240
2353
2019-7-26排列五192001963
4717
2019-7-27排列五192011022
2320
2019-7-28七星彩190875989
1681
2019-7-28排列五192024246
8239
2019-7-29排列五192034656
1039
2019-7-30七星彩190889977
6299
2019-7-30排列五192042399
5621
2019-7-31排列五192054520
1871
2019-8-1排列五192065597
9178
2019-8-2七星彩190892946
5863
2019-8-2排列五192072582
1177
2019-8-5排列五192107806
7736
2019-8-6七星彩1909144993855
2019-8-6排列五192117030
5900
2019-8-9七星彩1909216258811
2019-8-9排列五192144476
9211
2019-8-13七星彩1909458304085
2019-8-13排列五192183861
6492
2019-8-16七星彩1909589313908
2019-8-16排列五192210719
7961
2019-8-18七星彩1909680402460
2019-8-18排列五192232956
5347
2019-8-20七星彩1909769416165
2019-8-20排列五192254181
3916
2019-8-23七星彩1909813486053
2019-8-23排列五192287430
9789
2019-8-25七星彩1909938839773
2019-8-25排列五192305333
6305
2019-8-27七星彩1910085990787
2019-8-27排列五192323364
7727
2019-8-30七星彩1910127290563
2019-8-30排列五192350685
4222
2019-9-1七星彩1910216351053
2019-9-1排列五192370340
8082
2019-9-10七星彩1910625208734
2019-9-10排列五192463886
4275
2019-9-15七星彩1910807750801
2019-9-15排列五192519430
2725
2019-9-17七星彩1910917904399
2019-9-17排列五192536774
6390
2019-9-20七星彩1911062056928
2019-9-20排列五192569531
4741
2019-9-22七星彩1911108615035
2019-9-22排列五192589307
5119
2019-9-24七星彩1911211781417
2019-9-24排列五192602925
1620
2019-9-27七星彩1911350596599
2019-9-27排列五1926363879840
2019-9-29七星彩1911450582774
2019-9-29排列五1926514255906
2019-10-8七星彩1911574914683
2019-10-8排列五1926705070354
2019-10-11七星彩1911626053058
2019-10-11排列五1927081176018
2019-10-15七星彩1911857163781
2019-10-15排列五1927430451020
2019-10-18七星彩1911922699592
2019-10-18排列五1927742027379
2019-10-20七星彩1912090558403
2019-10-20排列五1927946031775
2019-10-22七星彩1912191393398
2019-10-22排列五1928129250052
2019-10-25七星彩1912223596870
2019-10-25排列五1928493209929
2019-10-27七星彩191230377
2019-10-27排列五192868496
海南梦兆独家研发,严禁转载!
梦想和梦兆,一个都不能少
————END————