chamrik 0 Newbie Poster

Hi everyone

How are you, hope good. I am new to this forum and if there is anything that I included here which I am not supposed to have, pls let me know. However,can you please help me with matlab. I want to built a classifier to use in predicting the secondary structure of my proteins into three classes of helix, sheet and coil. Since I have the data of 357*10766 inputs and 3*10766 targets. I tried separating the training set(357*8324) into two sets, and left the remaining data for testing. There is just no progress. I doubt if any there is any training happening.

Suppose I have something like this:
x = inputs;
>> data = inputstrain;
>> targets = target_arrayK_Htrain;
>> testdata = inputstest;
>> testtargets = target_arrayK_Htest;
>> mmx = minmax(x);
>> net = newff(mmx,[2,2],{'logsig','purelin'},'trainrp');
>>wm1 =net.IW[1,1};
>>wm2 = net.b{2,1};
>>b1 = net.b{1};
>>b2 = net.b{2};
>>for k = 100
>>[wm1,b1,wm2,b2] = protein_step1(mmx,data2,targets2,wm1,b1,wm2,b2);
>> [wm1,b1,wm2,b2] = protein_step1(mmx,data1,targets1,wm1,b1,wm2,b2);
end

and protein step is give below:

function [wm1,b1,wm2,b2] = protein_step1(mmx,data,targets,wm1,b1,wm2,b2)

% inputs: data1, targets1,weightmatrix1,bias1,weightmatrix2,bias2,m mx=minmax(data)(created outside the function);
% Output: new weightmatrix1, new bias1, new weightmatrix2, b2.


net = newff(mmx,[2,2],{'logsig','purelin'},'trainrp');

net.IW{1,1} = wm1;
net.b{1} = b1;
net.LW{2,1} = wm2;
net.b{2} = b2;


epochnumber = 1;
net.trainParam.epochs = epochnumber;

net = train(net,data,targets);

wm1 = net.IW{1,1}; % new weights and biases obtained after training.
b1 = net.b{1};
wm2 = net.LW{2,1};
b2 = net.b{2};

return

Why is it that it does not train the data the way I may want it to? I am just stuck. Its even worse when I want to repeat the training process because I doubt if it ever does that.

Thank you.

Regards,
Chamrik

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.