Changeset 19


Ignore:
Timestamp:
08/20/09 16:17:45 (15 years ago)
Author:
pinsard
Message:

add tool to run script_correc.m and save stdout, stderr and figures

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) 
     57if ~ exist('fid_log','var') 
     58 fid_log = 1; 
     59end 
     60 
     61% +++vérification si ouverture du fichier de sortie "Affichage" si différent  
     62% de stdout 
     63fid_log_is_stdout = isequal(fid_log,1); 
     64if fid_log_is_stdout == 0 
     65 fullfilename = ['./', mfilename, '.log']; 
     66 fid_log = fopen(fullfilename,'w'); 
     67 clear fullfilename; 
     68end 
     69 
    170archi=[20 40 60 80 100]; 
    271init=[1 2]; 
     
    776for n=1:length(archi) 
    877  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)); 
    1180    %Init du reseau 
    1281    [nets(n,i).W1 nets(n,i).W2]=MLPinit(base_app_n(:,1:end-1),base_app_n(:,end),archi(n)); 
    13      
     82 
    1483    %Apprentissage du reseau 
    1584    [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), ... 
    1685                                       base_app_n(:,end),nets(n,i).W1,nets(n,i).W2,'tah','lin',[1500,1e-6],[100,1]); 
    17          
    18      
     86 
     87 
    1988    %Restitution du reseau 
    2089  tau_nn=MLPval(base_val_n(:,1:end-1),nets(n,i).W1,nets(n,i).W2); 
    21    
     90 
    2291  %Performance du reseau 
    2392  delta=(decenred(base_val_n(:,end),moy(end),et(end)) - decenred(tau_nn,moy(end),et(end))).^2; 
    2493  perf(n,i)=sqrt((1./length(delta))*sum(delta)); 
    25      
     94 
    2695  end %for i 
    2796end %for n 
  • trunk/private/script_correc.m

    r17 r19  
    1616% 
    1717%  - ``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 
    1829% 
    1930%  - ``script_correc_thetav.eps`` : 
     
    7182% 
    7283% .. _intersect_octave.m : intersect_octave.m.html 
     84% 
     85% script_app.m_ 
     86% 
     87% .. _script_app.m : script_app.m.html 
    7388% 
    7489% TODO 
     
    241256end 
    242257 
    243 % ouverture du ficher de sortie "Affichage" si différent de stdout 
     258% ouverture du fichier de sortie "Affichage" si différent de stdout 
    244259fid_log_is_stdout = isequal(fid_log,1); 
    245260 
Note: See TracChangeset for help on using the changeset viewer.