I am using matlab r2010a to design a neural network to model 13,440 samples of numeral data of 3 input variables and 1 target. When i try to train, i get the following message;Targets are incorrectly sized for network. Matrix must have 3 columns
显示 更早的评论
The following is the code i have used;
Data_Inputs = xlsread('tvdiary10080.xlsx'); Testing_Data = xlsread('tvdiary3360.xlsx'); Shuffling_Inputs = Data_Inputs(randperm(10080),1:4); Training_Set = Shuffling_Inputs(1:10080,1:3)% specify training set [1st - 21st] Target_Set = Shuffling_Inputs(1:10080,4) % specify target set [22nd – 28th] Testing_Set = Testing_Data(1:3360,1:3) % specify Testing set [1st - 21st] Testing_Target_Set = Testing_Data(1:3360,4) % specify Testing set, Target [22nd – 28th] [pn, ps] = mapstd(Training_Set); [tn, ts] = mapstd(Target_Set); MyNetwork = newff (pn,tn, [20] , {'logsig'}); MyNetwork.trainFcn = 'trainlm'; MyNetwork.trainparam.min_grad = 0.00000001; MyNetwork.trainParam.epochs = 1000; MyNetwork.trainParam.lr = 0.4; MyNetwork.trainParam.max_fail =20; %MyNetwork= newrb(pn,tn,goal,spread, mn, df); MyNetwork = train(MyNetwork,pn,tn); save(NetworkName,'MyNetwork'); y = sim(MyNetwork, testn); % simulate network y_again = mapstd('reverse',y, targets) % denormlized %Daily_Result = performance(y,t,'all', 'v') % calculate statstics
What am i doing wrong?
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!