You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x = [ones(64, 1), (fullfact([222222]) -1.5) /4.0];
b = [020-18-2259]';
y =x*b;
Cmat = [0111000; 0010100];
dvec = [0; -20];
Emat = [0001100];
fvec =0;
penidx = [false; true(6, 1)]; % intercept unpenalized
[ldapath, bpath] = lsq_classopath(x, y, -Cmat, -dvec, Emat, fvec, ...
'qp_solver', 'matlab', 'init_method', 'qp', ...
'penidx', penidx, 'epsilon', 1e-8)
i =5;
0.5* sum((y-x* bpath(:, i)).^2) + ldapath(i) * sum(abs(bpath(penidx, i)))
% set estimate of intercept as zero
bpath2 =bpath; bpath2(1, :) =0.0;
0.5* sum((y-x* bpath2(:, i)).^2) + ldapath(i) * sum(abs(bpath2(penidx, i)))
At the 5th tuning parameter value, setting intercept estimate to 0 gives a better objective value (214) than the solution from lsq_classopath (215.7578). This can also be confirmed by the estimate by lsq_constrsparsereg at the fixed tuning parameter
Reported by Peng Zeng @ Auburn University
To reproduce the problem:
At the 5th tuning parameter value, setting intercept estimate to 0 gives a better objective value (214) than the solution from
lsq_classopath
(215.7578). This can also be confirmed by the estimate bylsq_constrsparsereg
at the fixed tuning parameterThe text was updated successfully, but these errors were encountered: