Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %Question 3c
- a1 = lasso(Phi_c * Psi, y_c, 'Lambda', 1);
- next_img1 = reshape((Psi * a1) / max(Psi * a1), [64,64]);
- subplot(2,2,1)
- imshow(next_img1)
- title('Lasso Regression w/ Lambda = 1')
- a2 = lasso(Phi_c * Psi, y_c, 'Lambda', .1);
- next_img2 = reshape((Psi * a2) / max(Psi * a2), [64,64]);
- subplot(2,2,2)
- imshow(next_img2)
- title('Lasso Regression w/ Lambda = .1')
- a3 = lasso(Phi_c * Psi, y_c, 'Lambda', .01);
- next_img3 = reshape((Psi * a3) / max(Psi * a3), [64,64]);
- subplot(2,2,3)
- imshow(next_img3)
- title('Lasso Regression w/ Lambda = .01')
- a4 = lasso(Phi_c * Psi, y_c, 'Lambda', .001);
- next_img4 = reshape((Psi * a4) / max(Psi * a4), [64,64]);
- subplot(2,2,4)
- imshow(next_img4)
- title('Lasso Regression w/ Lambda = .001')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement