No BSD License
-
bootstrp(nboot,bootfun,vararg...
BOOTSTRP Bootstrap statistics.
-
lars(yin, xin, XTX, type, sto...
-
lars_getXTX(xin, no_xtx)
Utility function for lars function
-
lars_init()
RESOLUTION_OF_LARS = 1e-10;
-
lars_scale(x,varargin)
A utility function for the 'lars' function.
-
myStopTest(history, data)
This function must return a structure, and that structure must have a
-
test_template
TEST_TEMPLATE
-
View all files
from
LARS algorithm
by Sung Soo Kim
Pure vanilla implementation of LARS algorithm.
|
| myStopTest(history, data)
|
function result = myStopTest(history, data)
% This function must return a structure, and that structure must have a
% single length variable called 'stop' as a result of the test.
% In this example, return structure is 'result', and its 'stop' field is
% set to false or true.
% You can add additional information using your own field.
result.stop = false;
if length(history)>1
% Any additional information you want to record can be added.
% You can make your own data structure here.
% Here, MSE is added for example.
yin = data; % This is the data you set in stopcriterion.
ycurrent = history(length(history)).mu_OLS;
MSE = sum((yin-ycurrent).^2)/length(yin);
result.MSE = MSE;
% Some additional dummy data...
result.message = 'Good';
result.myData = rand(2,3);
% Don't Forget!!!
% To stop the algorithm, you must set 'result.stop' to 'true'.
result.stop = true;
end
|
|
Contact us at files@mathworks.com