Changeset 99 for prextra


Ignore:
Timestamp:
04/16/15 11:50:03 (10 years ago)
Author:
dtax
Message:

Allow for lasso from the statistics toolbox.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • prextra/lassoc.m

    r90 r99  
    3737    end
    3838
    39     beta=-lasso(+x,3-2*getnlab(x),lambda);
     39    if exist('lasso')==3 % we have a own compiled mex code
     40       beta=-lasso(+x,3-2*getnlab(x),lambda);
     41    else % hope that we have a modern Matlab with stats. toolbox:
     42       if ~exist('lasso')
     43          error('Cannot find the function lasso.m.');
     44       end
     45       beta=-lasso(+x,3-2*getnlab(x),'Lambda',lambda);
     46    end
    4047
    4148    % now find out how sparse the result is:
Note: See TracChangeset for help on using the changeset viewer.