2012-04-16 50 views
0

我正在面對在MATLAB中運行龐大數據集的問題NN Toolbox-問題是 - >當我使用trainlm算法時,NN Toolbox無法運行數據並顯示內存不足錯誤,但對於其他算法則不存在內存問題。這是爲什麼?而且,當我把隱藏的神經元超過15個時,它也顯示出內存不足。如何解決這類問題?還有一件事:我把10%,45%,45%的數據劃分爲訓練驗證和測試,但是在運行代碼之後,我發現在工作空間裏它執行了25%的訓練數據,37%的數據用於驗證,和37%的數據用於測試目的。如何解決這個問題?MATLAB中的內存不足錯誤NN工具箱和訓練數據集中的數據分割問題

有沒有人有想法如何解決這類問題?我很樂意收到意見和任何建議。謝謝。

我在我的電腦上使用MATLAB的R2010b中的版本,其在Windows 7

這裏運行是我用於「訓練」之前訓練數據集

EX_355 = xlsread('Training Dataset.xlsx','B2:B435106'); 

EX_532 = xlsread('Training Dataset.xlsx','C2:C435106'); 

BA_355 = xlsread('Training Dataset.xlsx','D2:D435106'); 

BA_532 = xlsread('Training Dataset.xlsx','E2:E435106'); 

BA_1064 = xlsread('Training Dataset.xlsx','F2:F435106'); 

Reff = xlsread('Training Dataset.xlsx','G2:G435106'); 

Input(1,:) = EX_355; 

Input(2,:) = EX_532; 

Input(3,:) = BA_355; 

Input(4,:) = BA_532; 

Input(5,:) = BA_1064; 

Target(1,:) = Reff; 

net = feedforwardnet; 

net = configure(net,Input,Target); 

net = init(net); 

inputs = Input; 

targets = Target; 

hiddenLayerSize = 10; 

net = fitnet(hiddenLayerSize); 

net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'}; 

net.outputs{2}.processFcns = {'removeconstantrows','mapminmax'}; 

net.divideFcn = 'dividerand'; 

net.divideMode = 'sample'; 

net.divideParam.trainRatio = 10/100; 

net.divideParam.valRatio = 45/100; 

net.divideParam.testRatio = 45/100; 

net.trainFcn = 'trainlm'; 

net.performFcn = 'mse'; 

net.plotFcns = {'plotperform','plottrainstate','ploterrhist', ... 'plotregression', 'plotfit'}; 

[net,tr] = train(net,inputs,targets); 

outputs = net(inputs); 

errors = gsubtract(targets,outputs); 

performance = perform(net,targets,outputs) 

trainTargets = targets .* tr.trainMask{1}; 

valTargets = targets .* tr.valMask{1}; 

testTargets = targets .* tr.testMask{1}; 

net.trainParam.epochs; 

net.trainParam.time; 

net.trainParam.goal; 

net.trainParam.min_grad; 

net.trainParam.mu_max; 

net.trainParam.max_fail; 

net.trainParam.show; 

回答

相關問題