Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %LVQ Neural network training
- clear all
- nntwarn off
- load DANE
- S1 = [4:1:10 15:5:100];
- epoch = [1:400:1600 2000:2000:20000];
- lr = [0.01 : .01: 1];
- x = length(S1)*length(epoch)*length(rate);
- i = 1;
- wynik = zeros([x length(T)]);
- index = zeros([x 5]);
- Tc = ind2vec(T);
- for S1_ite = 1:length(S1)
- for epoch_ite = 1:length(epoch)
- for lr_ite = 1:length(rate)
- TP = [1000 epoch(epoch_ite) lr(lr_ite)];
- [w1, w2] = initlvq(Pn, S1(S1_ite), Tc);
- [w1, w2] = trainlvq(w1, w2, Pn, Tc, TP);
- a = simulvq(Pn, w1, w2);
- wynik = vec2ind(a);
- sprawnosc = (1-sum(abs(T-wynik)>=0.5)/length(Pn))*100
- Procent = i/x*100
- index(i,:) = [i, S1(S1_ite), epoch(epoch_ite), lr(lr_ite), sprawnosc];
- i=i+1;
- end
- end
- end
- save Wyniki index
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement