Asked by winston
on 28 Mar 2013

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?

*No products are associated with this question.*

Answer by Greg Heath
on 28 Mar 2013

Accepted answer

1. Learn how to format your submissions e.g., indent equations 1 space

2. Transpose your matrices (as explained in the documentation)

**Thank you for formally accepting my answer**

Greg

winston
on 29 Mar 2013

Thanks Greg and sorry for the casual submission. But if i add the transpose apostrophe, the response i get is this;

>> [pn, ps] = mapstd(Training_Set.’); ??? [pn, ps] = mapstd(Training_Set.’); | Error: The input character is not valid in MATLAB statements or expressions.

>> [pn, ps] = mapstd(Training_Set ’); ??? [pn, ps] = mapstd(Training_Set ’); | Error: The input character is not valid in MATLAB statements or expressions.

>> [pn, ps] = mapstd(Training_Set’); [tn, ts] = mapstd(Target_Set’); ??? [pn, ps] = mapstd(Training_Set’); | Error: The input character is not valid in MATLAB statements or expressions.

Opportunities for recent engineering grads.

## 0 Comments