使用神经网络进行降雨模式识别/分类

时间:2015-08-29 09:42:06

标签: matlab matrix neural-network classification pattern-recognition

我正在完成题为“使用ANN的降雨模式识别”的任务。对于培训和验证建议,我有时间序列的降雨数据,范围从1976年到2006年的两个地铁站。我已经在EXCEL中安排了数据,我从哪里导入并将其转换为矩阵。输入矩阵包含480 * 5。其中480 cloums,5行代表

  

年,月,经度,纬度和海拔

     

,输出矩阵包含该月的平均降雨量(mm)值   大小为480 * 1.

例如,

输入参数是

  

1976 1 31.5400 74.2200 214

,输出

  

23.9000

我使用了PattternNet“”,代码在

之下
 net = patternnet(10);

% Setup Division of Data for Training, Validation, Testing
% For a list of all data division functions type: help nndivide
net.divideFcn = 'dividerand';  % Divide data randomly
net.divideMode = 'sample';  % Divide up every sample
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;

load Input
load Target
P = transpose(Input); 
T = transpose(Target); 
x=P;
y=T;


[net,tr] = train(net,x,y);
nntraintool
view(net)
% The network outputs will be in the range 0 to 1,
% so we can use vec2ind function to get the class indices as the position of the highest element in each output vector.
testX = x(:,tr.testInd);
testT = y(:,tr.testInd);
testY = net(testX);
testIndices = vec2ind(testY)
% the overall percentages of correct and incorrect classification.
[c,cm] = confusion(testT,testY)
fprintf('Percentage Correct Classification   : %f%%\n', 100*(1-c));
fprintf('Percentage Incorrect Classification : %f%%\n', 100*c);
% View the Network
view(net)

% Plots
% Uncomment these lines to enable various plots.
%figure, plotperform(tr)
%figure, plottrainstate(tr)
%figure, plotconfusion(targets,outputs)
%figure, ploterrhist(errors)

我转置输入和输出值,但结果不理想,因为

  

百分比正确分类= 85%

     

最佳验证性能图表值位于所有纪元的同一轴上

     

回归值为27.36

     

ROC线在训练,验证和测试中为0

输入和目标的上述参数是否以正确的形式存在且对于准确和精确的结果是否有效?我是否正在使用正确的方式/代码进行此提议?请给我任何建议。

感谢您的时间......!

0 个答案:

没有答案