Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. %Question 3c
  2. a1 = lasso(Phi_c * Psi, y_c, 'Lambda', 1);
  3. next_img1 = reshape((Psi * a1) / max(Psi * a1), [64,64]);
  4. subplot(2,2,1)
  5. imshow(next_img1)
  6. title('Lasso Regression w/ Lambda = 1')
  7.  
  8. a2 = lasso(Phi_c * Psi, y_c, 'Lambda', .1);
  9. next_img2 = reshape((Psi * a2) / max(Psi * a2), [64,64]);
  10. subplot(2,2,2)
  11. imshow(next_img2)
  12. title('Lasso Regression w/ Lambda = .1')
  13.  
  14. a3 = lasso(Phi_c * Psi, y_c, 'Lambda', .01);
  15. next_img3 = reshape((Psi * a3) / max(Psi * a3), [64,64]);
  16. subplot(2,2,3)
  17. imshow(next_img3)
  18. title('Lasso Regression w/ Lambda = .01')
  19.  
  20. a4 = lasso(Phi_c * Psi, y_c, 'Lambda', .001);
  21. next_img4 = reshape((Psi * a4) / max(Psi * a4), [64,64]);
  22. subplot(2,2,4)
  23. imshow(next_img4)
  24. title('Lasso Regression w/ Lambda = .001')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement