This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch as T | |
def h_poly_helper(tt): | |
A = T.tensor([ | |
[1, 0, -3, 2], | |
[0, 1, -2, 1], | |
[0, 0, 3, -2], | |
[0, 0, -1, 1] | |
], dtype=tt[-1].dtype) | |
return [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Solve LASSO regression problem with ISTA and FISTA | |
# iterative solvers. | |
# Author : Alexandre Gramfort, [email protected] | |
# License BSD | |
import time | |
from math import sqrt |