Changeset 19
- Timestamp:
- 08/20/09 16:17:45 (15 years ago)
- Location:
- trunk/private
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/private/script_app.m
r14 r19 1 %SCRIPT_APP correction 2 3 %+ 4 % module 5 % ====== 6 % 7 % correction du TP 8 % 9 % 10 % DESCRIPTION 11 % =========== 12 % 13 % ++ 14 % 15 % ``script_app`` 16 % 17 % If ``fid_log`` is not set, log informations are printed on stdout. 18 % 19 % +++If ``fid_log`` set previous launching ``script_correc`` to more than 1, 20 % log informations are saved in ``script_correc.log``. 21 % 22 % EXAMPLES 23 % ======== 24 % 25 % This script can not be launched directly. 26 % 27 % see script_correc.m_ 28 % 29 % SEE ALSO 30 % ======== 31 % 32 % script_correc.m_ 33 % 34 % .. _script_correc.m : script_correc.m.html 35 % 36 % 37 % TODO 38 % ==== 39 % 40 % improve description 41 % 42 % EVOLUTIONS 43 % ========== 44 % 45 % $Id$ 46 % 47 % - fplod 2009-08-18T15:41:07Z aedon.locean-ipsl.upmc.fr (Darwin) 48 % 49 % * add header 50 % * log information either on screen (stdout) or in file associated to 51 % fid_log file identifier and already opened 52 % 53 %- 54 % 55 % définition du fichier de sortie "Affichage" 56 % if not set, fid_log is set to 1 (stdout) 57 if ~ exist('fid_log','var') 58 fid_log = 1; 59 end 60 61 % +++vérification si ouverture du fichier de sortie "Affichage" si différent 62 % de stdout 63 fid_log_is_stdout = isequal(fid_log,1); 64 if fid_log_is_stdout == 0 65 fullfilename = ['./', mfilename, '.log']; 66 fid_log = fopen(fullfilename,'w'); 67 clear fullfilename; 68 end 69 1 70 archi=[20 40 60 80 100]; 2 71 init=[1 2]; … … 7 76 for n=1:length(archi) 8 77 for i=1:length(init) 9 10 fprintf( 1,'\nApprentissage %d neurones cachees, initialisation #%d\n',archi(n),init(i));78 79 fprintf(fid_log,'\nApprentissage %d neurones cachees, initialisation #%d\n',archi(n),init(i)); 11 80 %Init du reseau 12 81 [nets(n,i).W1 nets(n,i).W2]=MLPinit(base_app_n(:,1:end-1),base_app_n(:,end),archi(n)); 13 82 14 83 %Apprentissage du reseau 15 84 [nets(n,i).W1 nets(n,i).W2]=MLPfit(base_val_n(:,1:end-1),base_val_n(:,end),base_app_n(:,1:end-1), ... 16 85 base_app_n(:,end),nets(n,i).W1,nets(n,i).W2,'tah','lin',[1500,1e-6],[100,1]); 17 18 86 87 19 88 %Restitution du reseau 20 89 tau_nn=MLPval(base_val_n(:,1:end-1),nets(n,i).W1,nets(n,i).W2); 21 90 22 91 %Performance du reseau 23 92 delta=(decenred(base_val_n(:,end),moy(end),et(end)) - decenred(tau_nn,moy(end),et(end))).^2; 24 93 perf(n,i)=sqrt((1./length(delta))*sum(delta)); 25 94 26 95 end %for i 27 96 end %for n -
trunk/private/script_correc.m
r17 r19 16 16 % 17 17 % - ``script_correc_thetas.eps`` : 18 % 19 % figure:: script_correc_thetas.eps 20 % :scale: 50 % 21 % :alt: script_correc_thetas.eps 22 % 23 % This is the caption of the figure (a simple paragraph). 24 % 25 % The legend consists of all elements after the caption. In this 26 % case, the legend consists of this paragraph and the following 27 % table: 28 18 29 % 19 30 % - ``script_correc_thetav.eps`` : … … 71 82 % 72 83 % .. _intersect_octave.m : intersect_octave.m.html 84 % 85 % script_app.m_ 86 % 87 % .. _script_app.m : script_app.m.html 73 88 % 74 89 % TODO … … 241 256 end 242 257 243 % ouverture du fich er de sortie "Affichage" si différent de stdout258 % ouverture du fichier de sortie "Affichage" si différent de stdout 244 259 fid_log_is_stdout = isequal(fid_log,1); 245 260
Note: See TracChangeset
for help on using the changeset viewer.