'modif perceptron'
This commit is contained in:
parent
dfe200f290
commit
b2daadb463
2 changed files with 7 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
function [net, rt, errort, perft] = PMC_training(entree, sortie, n_cache, nb_apprentissage)
|
||||
function [net, rt] = PMC_training(entree, sortie, n_cache, nb_apprentissage)
|
||||
|
||||
[n_entree, nb_echantillons] = size(entree);
|
||||
[n_sortie, ~] = size(sortie);
|
||||
|
@ -22,8 +22,8 @@ net.divideParam.testRatio = (nb_echantillons - nb_apprentissage) / nb_echantillo
|
|||
|
||||
net = train(net, entree, sortie);
|
||||
|
||||
entree_test = entree((nb_apprentissage + 1): nb_echantillons,:);
|
||||
sortie_test = sortie((nb_apprentissage + 1): nb_echantillons,:);
|
||||
[rt, pf, af, errort, perft] = sim(net, entree_test, [], [], sortie_test);
|
||||
entree_test = entree(:,(nb_apprentissage + 1): nb_echantillons);
|
||||
sortie_test = sortie(:,(nb_apprentissage + 1): nb_echantillons);
|
||||
rt = sim(net, entree_test, [], [], sortie_test);
|
||||
end
|
||||
|
||||
|
|
|
@ -78,6 +78,8 @@ end
|
|||
|
||||
% utilisation de l'algorithme du perceptron multicouches
|
||||
|
||||
[net, resultats_test, ecarts, erreur] = PMC_training(vecteurs, classes, 10, 900);
|
||||
[net, resultats_test] = PMC_training(vecteurs, classes, 10, 800);
|
||||
|
||||
%faire une prediction : y = net(x)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue