神经网络功能预测

时间:2015-04-26 16:09:11

标签: matlab neural-network

我试图使用matlab提供的神经网络工具箱来预测窦功能值。

我需要网络能够根据两个或多个周期预测单个周期的功能值。我认为这不是很困难,因为罪是简单的功能。

不幸的是,我的网络似乎预测了除我期望之外的一切。

这是我的代码:

x = 0:0.01:20;
y = sin(x);


net = fitnet(7);

net = init(net);

net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;

net = train(net, x, y);


x = 21:0.01:25;
y = sin(x);

z = sim(net, x);

plot(x, [y; z]);

这是情节: enter image description here

我尝试更改传递给fitnet的参数并使用带有各种参数的netff。我错过了什么?

1 个答案:

答案 0 :(得分:0)

第一点是研究期间的标准化(训练集的标准化)。我看不出你以某种方式应用它。另一个考虑因素是测试集的规范化,我无法找到你如何将规范化应用于测试集。还有一个考虑因素,您的测试集在训练集中根本没有任何表示。我的意思是你训练了范围[0; 20]的网络和检查结果[21; 25]。规范化将帮助您解决此问题。我提议你考虑将用于研究的值转换为弧度,并从[-1; 1]中以弧度为单位缩放值