Changeset 79


Ignore:
Timestamp:
07/23/13 12:22:18 (11 years ago)
Author:
bduin
Message:
 
Location:
distools
Files:
52 edited

Legend:

Unmodified
Added
Removed
  • distools/aucdlpc.m

    r10 r79  
    4343
    4444if nargin < 1 | isempty(d)
    45     w = mapping(mfilename,C);
     45    w = prmapping(mfilename,C);
    4646    w = setname(w,'AUCDLPC');
    4747    return
  • distools/augpsem.m

    r10 r79  
    6767if nargin < 2 | isempty(alf), alf = inf; end
    6868if nargin < 1 | isempty(d)
    69    W = mapping(mfilename,alf,pzero);
     69   W = prmapping(mfilename,alf,pzero);
    7070   W = setname(W,'Augmented PE embedding');
    7171   return
     
    196196%%%%% ---------------------------------------------- %%%%%
    197197
    198 W = mapping(mfilename,'trained',{Wp,Wn,dme,pzero,tsig,sig,tol},[],m,sum(sig));
     198W = prmapping(mfilename,'trained',{Wp,Wn,dme,pzero,tsig,sig,tol},[],m,sum(sig));
    199199W = setname(W,'Augmented PE embedding');
    200200return
  • distools/checkeucl.m

    r10 r79  
    4949        end
    5050
    51         D = dataset(D,1);  % we are not interested in labels here.
     51        D = prdataset(D,1);  % we are not interested in labels here.
    5252        D = setfeatlab(D,ones(m,1));
    5353       
  • distools/checksubeucl.m

    r10 r79  
    2020discheck(d)
    2121m = size(d,1);
    22 d = dataset(+d,1);
     22d = prdataset(+d,1);
    2323d = setfeatlab(d,ones(m,1));
    2424
  • distools/corrdistm.m

    r10 r79  
    1010%
    1111% OUTPUT
    12 %   D   NxM dissimilarity matrix or dataset; D in [0,1]
     12%   D   NxM dissimilarity matrix or prdataset; D in [0,1]
    1313%
    1414% DESCRIPTION
  • distools/cosdistm.m

    r10 r79  
    1010%
    1111% OUTPUT
    12 %   D   NxM Dissimilarity matrix or dataset; D in [0,1]
     12%   D   NxM Dissimilarity matrix or prdataset; D in [0,1]
    1313%
    1414% DESCRIPTION
  • distools/discc.m

    r10 r79  
    3434if nargin < 1 | isempty(d)
    3535        if isstr(par)   % untrained classifier, par = 'loo' or 'all'
    36                 W = mapping('discc',par);
     36                W = prmapping('discc',par);
    3737        else                    % fixed classifier, par = knn
    38                 W = mapping('discc','fixed',par);
     38                W = prmapping('discc','fixed',par);
    3939        end
    4040        return
    4141end
    4242
    43 [nlab,lablist,m,k,c,p,featlist] = dataset(d);
     43[nlab,lablist,m,k,c,p,featlist] = prdataset(d);
    4444[clab,classlist] = renumlab(featlist);
    4545c = size(classlist,1);
     
    7878                        K = K+k;
    7979                end
    80                 w = +(dataset(s,2-(t==r))*loglc);
    81                 W = mapping('discc',w,lablist,k,c,1);
     80                w = +(prdataset(s,2-(t==r))*loglc);
     81                W = prmapping('discc',w,lablist,k,c,1);
    8282        elseif strcmp(par,'all')
    8383                n = m*k;
     
    9292                        K = K+k;
    9393                end
    94                 w = +(dataset(s,2-(t==r))*loglc);
    95                 W = mapping('discc',w,lablist,k,c,1);
     94                w = +(prdataset(s,2-(t==r))*loglc);
     95                W = prmapping('discc',w,lablist,k,c,1);
    9696        else
    9797                error(['Unknown option ''' par ''''])
     
    102102        % testing for given mapping
    103103               
    104         if isa(par,'mapping')
     104        if isa(par,'prmapping')
    105105                w = +par;
    106106                W = d*w(1) + w(2);
  • distools/disnorm.m

    r18 r79  
    3535
    3636if nargin == 0 | isempty(D)
    37   V = mapping(mfilename,{opt});
     37  V = prmapping(mfilename,{opt});
    3838  V = setname(V,'Disnorm');
    3939  return
     
    4141
    4242if ~isdataset(D)
    43         D = dataset(D,1);
     43        D = prdataset(D,1);
    4444        D = setfeatlab(D,getlabels(D));
    4545end
     
    6060                D = D./m;
    6161        end     
    62     V = mapping(mfilename,'trained',{m},[],size(D,2),size(D,2));
     62    V = prmapping(mfilename,'trained',{m},[],size(D,2),size(D,2));
    6363        return;
    6464end
  • distools/dispc.m

    r10 r79  
    1515
    1616if nargin < 1 | isempty(a) % empty call (untrained classifier)
    17         w = mapping('dispc');
     17        w = prmapping('dispc');
    1818               
    1919elseif nargin == 1    % training
    20         [nlab,lablist,m,k,c,p] = dataset(a);
     20        [nlab,lablist,m,k,c,p] = prdataset(a);
    2121        [nn,nf,fl] = renumlab(lablist,getfeat(a));
    2222        if c < 2
     
    3737
    3838                b = {+a(find(nlab==nf(j)),j) +a(find(nlab~=nf(j)),j)};
    39                 w = [w; mapping('distrc',b,fl(nf(j),:),1,1,1)];
     39                w = [w; prmapping('distrc',b,fl(nf(j),:),1,1,1)];
    4040        end
    4141
     
    5454        w2(R2(L2)-n2) = (n2+2-(L2-[1:m]'))/(n2+2);
    5555%       disp([w1;w2])
    56         w = invsig(dataset((w1+w2)/2,getlab(a),getfeat(v)));
     56        w = invsig(prdataset((w1+w2)/2,getlab(a),getfeat(v)));
    5757else
    5858        error('Illegal call')
  • distools/disrc.m

    r10 r79  
    2929
    3030if nargin < 1 | isempty(a) % empty call (untrained classifier)
    31         w = mapping('disrc');
     31        w = prmapping('disrc');
    3232               
    3333elseif nargin == 1    % training
    34         [nlab,lablist,m,k,c,p] = dataset(a);
     34        [nlab,lablist,m,k,c,p] = prdataset(a);
    3535        [nn,nf,fl] = renumlab(lablist,getfeat(a));
    3636        if c < 2
     
    4343        for j = 1:k
    4444                b = {+a(find(nlab==nf(j)),j) +a(find(nlab~=nf(j)),j)};
    45                 w = [w; mapping('disrc',b,fl(nf(j),:),1,1,1)];
     45                w = [w; prmapping('disrc',b,fl(nf(j),:),1,1,1)];
    4646        end
    4747
     
    6060        w2(R2(L2)-n2) = (n2+2-(L2-[1:m]'))/(n2+2);
    6161%       disp([w1;w2])
    62         w = invsig(dataset((w1+w2)/2,getlab(a),getfeat(v)));
     62        w = invsig(prdataset((w1+w2)/2,getlab(a),getfeat(v)));
    6363else
    6464        error('Illegal call')
  • distools/dissimt.m

    r10 r79  
    5858end
    5959if nargin == 0 | isempty(D)
    60   W = mapping(mfilename,'fixed',{type,p});
     60  W = prmapping(mfilename,'fixed',{type,p});
    6161  W = setname(W,'Fixed proximity transformation');
    6262  return
  • distools/dlpc.m

    r10 r79  
    2525%   W1  LP-Classifier in the complete dissimilarity space
    2626%   W2  LP-Classifier in a reduced dissimilarity space
    27 %   W3  Object selection mapping; the indices of support objects are in +W3.
     27%   W3  Object selection prmapping; the indices of support objects are in +W3.
    2828%
    2929% DEFAULTS
     
    125125if nargin < 2 | isempty(is_w0), is_w0 = 1; end
    126126if nargin < 1 | isempty(d)
    127   W1 = mapping(mfilename,{is_w0,type,par,usematlab});
     127  W1 = prmapping(mfilename,{is_w0,type,par,usematlab});
    128128  W1 = setname(W1,'DLPC');
    129129  W2 = [];
     
    176176% If more than 2 classes, do one against all others.
    177177if C > 2,
    178 % W1 = mclassc(d,mapping(mfilename,{is_w0,type,par,usematlab}));
     178% W1 = mclassc(d,prmapping(mfilename,{is_w0,type,par,usematlab}));
    179179
    180180  W1 = [];
  • distools/dmstspm.m

    r10 r79  
    4343end
    4444if nargin < 1 | isempty(D)
    45    W = mapping(mfilename,{K,p});
     45   W = prmapping(mfilename,{K,p});
    4646   W = setname(W,'dmstspm');
    4747   return
     
    140140
    141141    [Lmst,d] = kdmst(D,K,p);
    142     W = mapping(mfilename,'trained',{Lmst,d,K},[],n,n);
     142    W = prmapping(mfilename,'trained',{Lmst,d,K},[],n,n);
    143143    W = setname(W,'dmstspm');
    144144  end
  • distools/dprocrustdm.m

    r10 r79  
    5454%
    5555% SEE ALSO
    56 % MDS, PCA, PSEM, KPCA, MAPPINGS, DATASETS
     56% MDS, PCAM, PSEM, KPCA, MAPPINGS, DATASETS
    5757%
    5858% REFERENCE
  • distools/drsscc.m

    r10 r79  
    4444end
    4545if nargin < 1 | isempty(D)
    46   W = mapping('DRSSCC',{v,N,M,crule});
     46  W = prmapping('DRSSCC',{v,N,M,crule});
    4747  return
    4848end
  • distools/expdistm.m

    r10 r79  
    6464end
    6565
    66 isda = isa(A,'dataset');
    67 isdb = isa(B,'dataset');
     66isda = isa(A,'prdataset');
     67isdb = isa(B,'prdataset');
    6868a = +A;
    6969b = +B;
  • distools/fastmapd.m

    r10 r79  
    4040end
    4141if nargin < 1 | isempty(D)
    42    W = mapping(mfilename,K);
     42   W = prmapping(mfilename,K);
    4343   W = setname(W,'Fastmapd');
    4444   return
     
    6666      end
    6767                end             
    68     W = dataset(Y,nlab);
     68    W = prdataset(Y,nlab);
    6969    return
    7070  end
     
    133133end
    134134
    135 W = mapping(mfilename,'trained',{P,dd,X,KK},[],n,KK);
     135W = prmapping(mfilename,'trained',{P,dd,X,KK},[],n,KK);
    136136W = setname(W,'Fastmapd');
    137137return
  • distools/genballd.m

    r10 r79  
    4545
    4646labs = genlab(n);
    47 d = dataset(d,labs);
     47d = prdataset(d,labs);
    4848d = setfeatlab(d,labs);
    4949d = setprior(d,0);
  • distools/genddat.m

    r28 r79  
    100100end
    101101
    102 [ja,jb] = gendat(dataset([1:n]',nlab),m);
     102[ja,jb] = gendat(prdataset([1:n]',nlab),m);
    103103ja = +ja;
    104104jb = +jb;
  • distools/genrep.m

    r10 r79  
    8686    L = [R; setdiff(L,R)];
    8787  end
    88   DR = dataset(D(L,R),labels(L,:),'featlab',labels(R,:));
     88  DR = prdataset(D(L,R),labels(L,:),'featlab',labels(R,:));
    8989else
    9090  if strcmp(strl,'exclude')
     
    9696    ;
    9797  end
    98   DR = dataset(D(L,R),labels(L,:),'featlab',labels(R,:));
    99   DT = dataset(D(T,R),labels(T,:),'featlab',labels(R,:));
     98  DR = prdataset(D(L,R),labels(L,:),'featlab',labels(R,:));
     99  DT = prdataset(D(T,R),labels(T,:),'featlab',labels(R,:));
    100100end
    101101return
  • distools/ikfd.m

    r10 r79  
    4343end
    4444if nargin < 1 | isempty(K),
    45   W = mapping(mfilename,{alf,isb0});
     45  W = prmapping(mfilename,{alf,isb0});
    4646  W = setname(W,'IKFD');
    4747  return
  • distools/ikpca.m

    r10 r79  
    4444%
    4545% SEE ALSO
    46 % MAPPINGS, DATASETS, PCA, PSEM
     46% MAPPINGS, DATASETS, PCAM, PSEM
    4747%
    4848% REFERENCE
     
    7171end
    7272if nargin < 1 | isempty(K),
    73   W = mapping(mfilename,alf,prec);
     73  W = prmapping(mfilename,alf,prec);
    7474  W = setname(W,'IKPCA');
    7575  return
     
    117117  L       = L(J);                  % Eigenvalues
    118118
    119   W = mapping(mfilename,'trained',{QL,pars{2},L,sig,pars{5}},[],m,length(J));
     119  W = prmapping(mfilename,'trained',{QL,pars{2},L,sig,pars{5}},[],m,length(J));
    120120  W = setname(W,'IKPCA');
    121121  return
     
    173173
    174174% Determine the mapping
    175 W = mapping(mfilename,'trained',{QL,Kme,L,sig,prec},[],m,sum(sig));
     175W = prmapping(mfilename,'trained',{QL,Kme,L,sig,prec},[],m,sum(sig));
    176176W = setname(W,'IKPCA');
    177177return
  • distools/ispe_em.m

    r10 r79  
    2222        prtrace(mfilename);
    2323       
    24         if isa(w,'mapping') & strcmp(w.mapping_file,'pe_em')
     24        if isa(w,'prmapping') & strcmp(w.mapping_file,'pe_em')
    2525                n = 1;
    2626        else
  • distools/ispsem.m

    r10 r79  
    2222        prtrace(mfilename);
    2323       
    24         if isa(w,'mapping') & strcmp(w.mapping_file,'psem')
     24        if isa(w,'prmapping') & strcmp(w.mapping_file,'psem')
    2525                n = 1;
    2626        else
  • distools/jacsimdistm.m

    r10 r79  
    1010%
    1111% OUTPUT
    12 %   D   NxM Dissimilarity matrix or dataset; D in [0,1]
     12%   D   NxM Dissimilarity matrix or prdataset; D in [0,1]
    1313%
    1414% DESCRIPTION
  • distools/kcenterm.m

    r10 r79  
    3939
    4040if nargin < 1 | isempty(K)
    41    V = mapping(mfilename);
     41   V = prmapping(mfilename);
    4242   V = setname(V,'kcenterm');
    4343   return
     
    101101end
    102102
    103 V = mapping(mfilename,'trained',{v,Kwm},[],m,m);
     103V = prmapping(mfilename,'trained',{v,Kwm},[],m,m);
    104104V = setname(V,'kcenterm');
    105105return
  • distools/kem.m

    r18 r79  
    4747%
    4848% SEE ALSO
    49 % MAPPINGS, DATASETS, PE_EM, AUGPSEM, PCA, PE_PCA, PE_SPEC, GETSIG, SETSIG
     49% MAPPINGS, DATASETS, PE_EM, AUGPSEM, PCAM, PE_PCA, PE_SPEC, GETSIG, SETSIG
    5050%
    5151% LITERATURE
     
    7373
    7474if nargin < 1 | isempty(d),
    75   W = mapping(mfilename,{alf,pzero,prec});
     75  W = prmapping(mfilename,{alf,pzero,prec});
    7676  W = setname(W,'PE embedding');
    7777  return
     
    146146  data.eval = L(J);          % Eigenvalues
    147147 
    148   W = mapping(mfilename,'trained',data,[],m,length(J));
     148  W = prmapping(mfilename,'trained',data,[],m,length(J));
    149149  W = setname(W,'PE embedding');
    150150  return
     
    204204% Determine the mapping depending on pzero
    205205if pzero == 0,
    206   W = mapping(mfilename,'trained',data,[],m,sum(sig));
     206  W = prmapping(mfilename,'trained',data,[],m,sum(sig));
    207207else
    208208  data.mdis = +d(:,pzero)';
    209   W = mapping(mfilename,'trained',data,[],m,sum(sig));
     209  W = prmapping(mfilename,'trained',data,[],m,sum(sig));
    210210end
    211211W = setname(W,'PE embedding');
  • distools/kfd.m

    r10 r79  
    4343end
    4444if nargin < 1 | isempty(K),
    45   W = mapping(mfilename,{alf,isb0});
     45  W = prmapping(mfilename,{alf,isb0});
    4646  W = setname(W,'KFD');
    4747  return
  • distools/knndc.m

    r10 r79  
    5959% empty call, to handle d*knnd, or d*knnd([],par)                       
    6060if nargin < 1 | isempty(d)
    61         W = mapping(mfilename,'untrained',knn,par);
     61        W = prmapping(mfilename,'untrained',knn,par);
    6262        W = setname(W,'KNND');
    6363        return
     
    7070p        = getprior(d);
    7171
    72 %[nlab,lablist,m,k,c,p,featlist] = dataset(d);
     72%[nlab,lablist,m,k,c,p,featlist] = prdataset(d);
    7373[clab,classlist] = renumlab(featlist);
    7474[cl,nc] = renumlab(classlist,lablist);
     
    131131        end
    132132       
    133         W = mapping(mfilename,'trained',{knn,JJ},lablist,k,c);
     133        W = prmapping(mfilename,'trained',{knn,JJ},lablist,k,c);
    134134        W = setname(W,'KNNDC');
    135135       
  • distools/kpca.m

    r10 r79  
    3131%
    3232% SEE ALSO
    33 % MAPPINGS, DATASETS, PCA, PSEM
     33% MAPPINGS, DATASETS, PCAM, PSEM
    3434%
    3535% REFERENCE
     
    4848end
    4949if nargin < 1 | isempty(K),
    50   W = mapping(mfilename,alf);
     50  W = prmapping(mfilename,alf);
    5151  W = setname(W,'Kernel PCA');
    5252  return
     
    100100  L = L(J);                 % Eigenvalues
    101101
    102   W = mapping(mfilename,'trained',{Q,pars{2},L},[],m,length(J));
     102  W = prmapping(mfilename,'trained',{Q,pars{2},L},[],m,length(J));
    103103  W = setname(W,'KPCA');
    104104  return
     
    154154
    155155% Determine the mapping
    156 W = mapping(mfilename,'trained',{Q,Kme,L},[],m,length(J));
     156W = prmapping(mfilename,'trained',{Q,Kme,L},[],m,length(J));
    157157W = setname(W,'KPCA');
    158158return
  • distools/ksvc.m

    r10 r79  
    9595end
    9696if nargin < 1 | isempty(K),
    97   W = mapping(mfilename,{C,kc,r});
     97  W = prmapping(mfilename,{C,kc,r});
    9898  W = setname(W,'Kernel Support Vector Classifier (KSVC)');
    9999  return;
     
    115115
    116116% TRAIN THE CLASSIFIER
    117 if ~isa(C,'mapping')
     117if ~isa(C,'prmapping')
    118118  islabtype(K,'crisp');
    119119  isvaldset(K,1,2);      % Expect at least 1 object per class and 2 classes
     
    167167
    168168    % Store the results
    169     W = mapping(mfilename,'trained',{me,J,T,v,reg},getlablist(K),k,2);
     169    W = prmapping(mfilename,'trained',{me,J,T,v,reg},getlablist(K),k,2);
    170170    % W = cnormc(W,K);
    171171    W = setname(W,'Kernel Support Vector Classifier (KSVC)');
  • distools/ksvc_nu.m

    r10 r79  
    113113end
    114114if nargin < 1 | isempty(K),
    115   W = mapping(mfilename,{nu,kc,r});
     115  W = prmapping(mfilename,{nu,kc,r});
    116116  W = setname(W,'Kernel Support Vector Classifier (KSVC-NU)');
    117117  return;
     
    134134
    135135% TRAIN THE CLASSIFIER
    136 if ~isa(nu,'mapping')
     136if ~isa(nu,'prmapping')
    137137  islabtype(K,'crisp');
    138138  isvaldset(K,1,2);      % Expect at least 1 object per class and 2 classes
     
    187187
    188188    % Store the results
    189     W = mapping(mfilename,'trained',{me,J,T,v},getlablist(K),k,2);
     189    W = prmapping(mfilename,'trained',{me,J,T,v},getlablist(K),k,2);
    190190    %W = cnormc(W,a);
    191191    W = setname(W,'Kernel Support Vector Classifier (KSVC-NU)');
  • distools/mclassdc.m

    r10 r79  
    5050end
    5151if nargin < 1 | isempty(D)
    52         w = mapping(mfilename,{classf,mode});
     52        w = prmapping(mfilename,{classf,mode});
    5353        return
    5454end
     
    6565varout = {};
    6666if c == 2
    67         varargout = map(D,classf);
     67        varargout = prmap(D,classf);
    6868        return
    6969end
     
    8282                          Dtargets = gettargets(D);
    8383                          targets  = [Dtargets(:,i) 1-Dtargets(:,i)];
    84                           DD                     = dataset(+D,mlab,targets,'lablist',[1 2]');
     84                          DD                     = prdataset(+D,mlab,targets,'lablist',[1 2]');
    8585                  end
    8686                        if nargout(classf.mapping_file) > 1
    87                                 [v,varo] = map(DD,classf);
     87                                [v,varo] = prmap(DD,classf);
    8888                                varout   = [varout {varo}];
    8989                        else
    90                                 v = map(DD,classf);
     90                                v = prmap(DD,classf);
    9191                        end
    9292                        w = [w,setlabels(v(:,1),lablist(i,:))];
     
    114114                  I1 = setdiff([1:c],z);
    115115                        if nargout(classf.mapping_file) > 1
    116                                 [v,varo] = map(DD,classf);
     116                                [v,varo] = prmap(DD,classf);
    117117                                varout   = [varout {varo}];
    118118                        else
    119                                 v = map(DD,classf);
     119                                v = prmap(DD,classf);
    120120                        end
    121121                        w = [w,setlabels(v(:,1),lab)];
  • distools/parzenddc.m

    r18 r79  
    2929  % No input arguments: return an untrained mapping.
    3030  if nargin == 0 | isempty(d)
    31     W = mapping(mfilename,h);
     31    W = prmapping(mfilename,h);
    3232    W = setname(W,'Parzen DisRep Classifier');
    3333    return;
     
    146146  par.weights = ones(m,1);
    147147   
    148   W = mapping('parzend_map','trained',par,getlablist(d),k,c);
     148  W = prmapping('parzend_map','trained',par,getlablist(d),k,c);
    149149  W = setname(W,'Parzen DisRep Classifier');
    150150  W = setcost(W,d);
  • distools/pe_affine.m

    r10 r79  
    1818        par.map = arg1;
    1919        par.sig = arg2;
    20         argout = mapping(mfilename,'trained',par,getlabels(arg1),n1,n2);
     20        argout = prmapping(mfilename,'trained',par,getlabels(arg1),n1,n2);
    2121else
    2222        isdataset(arg1);
  • distools/pe_distm.m

    r10 r79  
    3232%
    3333% SEE ALSO
    34 % DATASET, SETSIG, DISTM
     34% PRDATASET, SETSIG, DISTM
    3535
    3636% Copyright: Elzbieta Pekalska, ela.pekalska@googlemail.com
     
    4747  sig = getsig(A);
    4848
    49   if ~isdataset(B), B = dataset(B,1); end
     49  if ~isdataset(B), B = prdataset(B,1); end
    5050
    5151  a    = +A;
  • distools/pe_em.m

    r28 r79  
    4343%
    4444% SEE ALSO
    45 % MAPPINGS, DATASETS, AUGPSEM, PCA, GETSIG, SETSIG
     45% MAPPINGS, DATASETS, AUGPSEM, PCAM, GETSIG, SETSIG
    4646%
    4747% LITERATURE
     
    7070
    7171if nargin < 1 | isempty(d),
    72   W = mapping(mfilename,{alf,pzero,prec});
     72  W = prmapping(mfilename,{alf,pzero,prec});
    7373  W = setname(W,'PE embedding');
    7474  return
     
    143143  data.eval = L(J);          % Eigenvalues
    144144 
    145   W = mapping(mfilename,'trained',data,[],m,length(J));
     145  W = prmapping(mfilename,'trained',data,[],m,length(J));
    146146  W = setname(W,'PE embedding');
    147147  return
     
    200200% Determine the mapping depending on pzero
    201201if pzero == 0,
    202   W = mapping(mfilename,'trained',data,[],m,sum(sig));
     202  W = prmapping(mfilename,'trained',data,[],m,sum(sig));
    203203else
    204204  data.mdis = +d(:,pzero)';
    205   W = mapping(mfilename,'trained',data,[],m,sum(sig));
     205  W = prmapping(mfilename,'trained',data,[],m,sum(sig));
    206206end
    207207W = setname(W,'PE embedding');
  • distools/pe_kernelm.m

    r10 r79  
    5353        if (nargin < 1) | (isempty(a) & nargin == 1) 
    5454                % Definition: pe kernel mapping.
    55                 w = mapping(mfilename,{b});
     55                w = prmapping(mfilename,{b});
    5656                w = setname(w,mapname);
    5757  elseif isempty(a)
    58     w = mapping(mfilename,'trained',b,getlab(b),size(b,2),size(b,1));
     58    w = prmapping(mfilename,'trained',b,getlab(b),size(b,2),size(b,1));
    5959                w = setname(w,mapname);
    6060  elseif isdataset(a) & ~isempty(a)
    6161    if isempty(b)   % store a as rep set, 'training'
    62       w = mapping(mfilename,'trained',a,getlab(a),size(a,2),size(a,1));
     62      w = prmapping(mfilename,'trained',a,getlab(a),size(a,2),size(a,1));
    6363                  w = setname(w,mapname);
    6464    elseif isdataset(b); % compute kernel between a and b
     
    6666    elseif ismapping(b)
    6767      if isuntrained(b) % nothing stored yet, do it now, a is rep set
    68         w = mapping(mfilename,'trained',a,getlab(a),size(a,2),size(a,1));
     68        w = prmapping(mfilename,'trained',a,getlab(a),size(a,2),size(a,1));
    6969                    w = setname(w,mapname);
    7070      else % we have already a rep set: compute kernel matrix
     
    7777   
    7878  else  % may be double ???
    79     a = dataset(a);
     79    a = prdataset(a);
    8080    w = feval(mfilename,a,b);
    8181   
  • distools/pe_knnc.m

    r10 r79  
    3131
    3232        if nargin == 0 | isempty(a)
    33                 w = mapping(mfilename,'untrained',{k});
     33                w = prmapping(mfilename,'untrained',{k});
    3434                w = setname(w,'PE K-NN Classifier');
    3535               
     
    4545        e = testkd(pe_distm(a),k,'loo');
    4646                        end
    47                         w = mapping(mfilename,'trained',{a,k},getlablist(a),size(a,2),getsize(a,3));
     47                        w = prmapping(mfilename,'trained',{a,k},getlablist(a),size(a,2),getsize(a,3));
    4848                end
    4949               
  • distools/pe_libsvc.m

    r10 r79  
    4242
    4343        if nargin == 0 | isempty(a)
    44                 w = mapping(mfilename,'untrained',{c});
     44                w = prmapping(mfilename,'untrained',{c});
    4545                w = setname(w,'PE LIBSVC');
    4646               
     
    5353                        ktrain = pe_kernelm(a,a)
    5454                        v = libsvc(ktrain,0);
    55                         w = mapping(mfilename,'trained',{v,a},getlablist(a),size(a,2),getsize(a,3));
     55                        w = prmapping(mfilename,'trained',{v,a},getlablist(a),size(a,2),getsize(a,3));
    5656                end
    5757               
  • distools/pe_nmc.m

    r10 r79  
    2424
    2525  if nargin == 0 | isempty(a)
    26     w = mapping(mfilename,'untrained');
     26    w = prmapping(mfilename,'untrained');
    2727    w = setname(w,'PE Nearest Mean');
    2828   
  • distools/pe_parzenc.m

    r10 r79  
    3131
    3232  if nargin == 0 | isempty(a)
    33     w = mapping(mfilename,'untrained',{h});
     33    w = prmapping(mfilename,'untrained',{h});
    3434    w = setname(w,'PE Parzen Classifier');
    3535   
     
    4646        e = testpd(sqrt(pe_distm(a)),h,'loo');
    4747      end
    48       w = mapping(mfilename,'trained',{a,h},getlablist(a),size(a,2),getsize(a,3));
     48      w = prmapping(mfilename,'trained',{a,h},getlablist(a),size(a,2),getsize(a,3));
    4949    end
    5050   
  • distools/private/auclpm.m

    r13 r79  
    5555                error('Please check your input parameters: C should be a double.');
    5656        end
    57         w = mapping(mfilename,{C,rtype,par,unitnorm,usematlab});
     57        w = prmapping(mfilename,{C,rtype,par,unitnorm,usematlab});
    5858        w = setname(w,defauclpmname(C,rtype,par,unitnorm));
    5959        return
     
    204204        W.rel = rel;
    205205        W.C = C;
    206         w = mapping(mfilename,'trained',W,tlab,dim,1);
     206        w = prmapping(mfilename,'trained',W,tlab,dim,1);
    207207        w = setname(w,defauclpmname(C,rtype,par,unitnorm));
    208208       
  • distools/protselfd.m

    r66 r79  
    6767
    6868  if nargin < 1 || isempty(D)  % allow for D*protselfd([],pars)
    69     R = mapping(mfilename,'untrained',{ksel,type});
     69    R = prmapping(mfilename,'untrained',{ksel,type});
    7070    R = setname(R,'Forward Prototype Sel');
    7171    return
  • distools/proxxm.m

    r10 r79  
    8080% No data, return an UNTRAINED mapping
    8181if (nargin < 1) | (isempty(A))
    82   W = mapping(mfilename,{type,s,weights});
     82  W = prmapping(mfilename,{type,s,weights});
    8383  W = setname(W,'Proximity mapping');
    8484  return;
     
    104104  [m,k] = size(A);
    105105  if isdataset(A)
    106     W = mapping(mfilename,'trained',{A,type,s,weights},getlab(A),getfeatsize(A),getobjsize(A));
     106    W = prmapping(mfilename,'trained',{A,type,s,weights},getlab(A),getfeatsize(A),getobjsize(A));
    107107  else
    108     W = mapping(mfilename,'trained',{A,type,s,weights},[],k,m);
     108    W = prmapping(mfilename,'trained',{A,type,s,weights},[],k,m);
    109109  end
    110110  W = setname(W,'Proximity mapping');
  • distools/prtbunke.m

    r10 r79  
    3434      end
    3535      if ~isempty(lab),
    36         D = dataset(D,lab,'featlab',lab);
     36        D = prdataset(D,lab,'featlab',lab);
    3737        C = classsizes(D);
    3838        % Should it be class frequencies or equal priors?
  • distools/psem.m

    r10 r79  
    7979end
    8080if nargin < 1 | isempty(d),
    81   W = mapping(mfilename,{alf,pzero,prec});
     81  W = prmapping(mfilename,{alf,pzero,prec});
    8282  W = setname(W,'PE embedding');
    8383  return
     
    133133  L = L(J);          % Eigenvalues
    134134
    135   W = mapping(mfilename,'trained',{Q, pars{2},pars{3},L,pars{5},pars{6}},[],m,length(J));
     135  W = prmapping(mfilename,'trained',{Q, pars{2},pars{3},L,pars{5},pars{6}},[],m,length(J));
    136136  W = setname(W,'PE embedding');
    137137  return
     
    186186% Determine the mapping depending on pzero
    187187if pzero == 0,
    188   W = mapping(mfilename,'trained',{Q,mean(+d,2)',pzero,L,sig,prec},[],m,sum(sig));
     188  W = prmapping(mfilename,'trained',{Q,mean(+d,2)',pzero,L,sig,prec},[],m,sum(sig));
    189189else
    190   W = mapping(mfilename,'trained',{Q,+d(:,pzero)',pzero,L,sig,prec},[],m,sum(sig));
     190  W = prmapping(mfilename,'trained',{Q,+d(:,pzero)',pzero,L,sig,prec},[],m,sum(sig));
    191191end
    192192W = setname(W,'PE embedding');
  • distools/pspca.m

    r10 r79  
    4949%
    5050% SEE ALSO
    51 % MAPPINGS, DATASETS, PCA, KPSEM, PSEM
     51% MAPPINGS, DATASETS, PCAM, KPSEM, PSEM
    5252%
    5353% LITERATURE
     
    6969if nargin < 2 | isempty(sig), sig = [size(a,1) 0]; end
    7070if nargin < 1 | isempty(a),
    71   W = mapping(mfilename,sig,alf,prec);
     71  W = prmapping(mfilename,sig,alf,prec);
    7272  W = setname(W,'Pseudo-Euclidean PCA');
    7373  return
     
    153153
    154154% Determine the mapping
    155 W = mapping(mfilename,'trained',{v,Q,outsig,sig},[],k,sum(outsig));
     155W = prmapping(mfilename,'trained',{v,Q,outsig,sig},[],k,sum(outsig));
    156156W = setname(W,'Pseudo-Euclidean PCA');
    157157return
  • distools/setsig.m

    r10 r79  
    4040  if nargin < 2, sig = []; end
    4141  if nargin < 1 | isempty(a)
    42     b = mapping(mfilename,'fixed',{sig});
     42    b = prmapping(mfilename,'fixed',{sig});
    4343    b = setname(b,'Set signature');
    4444    return
     
    5858                b = setdata(a,data);
    5959        else
    60                 a = dataset(a);
     60                a = prdataset(a);
    6161                b = setuser(a,sig,'pe_signature');
    6262        end
  • distools/simdistm.m

    r10 r79  
    88%
    99% OUTPUT
    10 %   D   NxM dissimilarity matrix or dataset; D in [0,1]
     10%   D   NxM dissimilarity matrix or prdataset; D in [0,1]
    1111%
    1212% DESCRIPTION
  • distools/sphem.m

    r10 r79  
    6262if nargin < 2 | isempty(R), R = 1; end
    6363if nargin < 1 | isempty(d),
    64   W = mapping(mfilename,{R,alf,prec});
     64  W = prmapping(mfilename,{R,alf,prec});
    6565  W = setname(W,'Spherical embedding');
    6666  return
     
    8282    W = R^2*(cos(+d/R)) * Q * diag(sqrt(abs(L))./L);
    8383    if isdataset(d),
    84       W = dataset(W,getlab(d),'prior',getprior(d));
     84      W = prdataset(W,getlab(d),'prior',getprior(d));
    8585
    8686      % Store signature in the USER field
     
    109109  L = L(J);          % Eigenvalues
    110110
    111   W = mapping(mfilename,'trained',{R,Q,L,pars{4},pars{5}},[],m,length(J));
     111  W = prmapping(mfilename,'trained',{R,Q,L,pars{4},pars{5}},[],m,length(J));
    112112  W = setname(W,'Spherical embedding');
    113113  return
     
    150150Q = Q(:,J);                   % Eigenvectors
    151151
    152 W = mapping(mfilename,'trained',{R,Q,L,sig,prec},[],m,sum(sig));
     152W = prmapping(mfilename,'trained',{R,Q,L,sig,prec},[],m,sum(sig));
    153153W = setname(W,'Spherical  embedding');
    154154return
  • distools/tqdc.m

    r10 r79  
    7777% No input arguments: return an UNTRAINED mapping
    7878if (nargin < 1) | (isempty(a))
    79   w = mapping(mfilename,{alf,r,s,dim});
     79  w = prmapping(mfilename,{alf,r,s,dim});
    8080  w = setname(w,'Trade-off Bayes-Normal-2');
    8181  return
     
    144144end
    145145
    146 w = mapping('normal_map','trained',pars,getlab(U),k,c);
     146w = prmapping('normal_map','trained',pars,getlab(U),k,c);
    147147w = setname(w,'Trade-off Bayes-Normal-2');
    148148w = setcost(w,a);
Note: See TracChangeset for help on using the changeset viewer.