Changeset 120 for distools/kpca.m


Ignore:
Timestamp:
04/09/17 20:54:03 (8 years ago)
Author:
bduin
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • distools/kpca.m

    r79 r120  
    4242
    4343
    44 function [W,L] = kpca (K,alf)
     44function [W,L] = kpca (K,alf,reg)
    4545
    4646if nargin < 2 | isempty(alf),
     
    4848end
    4949if nargin < 1 | isempty(K),
    50   W = prmapping(mfilename,alf);
     50  W = prmapping(mfilename,{alf,reg});
    5151  W = setname(W,'Kernel PCA');
    5252  return
    5353end
    5454
     55if nargin > 2 && ~isempty(reg)
     56  K = K+reg*eye(size(K,1));
     57end
    5558
    5659if (isdataset(K) | isa(K,'double')),
Note: See TracChangeset for help on using the changeset viewer.