This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Generalized linear models via coordinate descent | |
Author: Fabian Pedregosa <[email protected]> | |
""" | |
import numpy as np | |
from scipy import linalg |
This file contains hidden or 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 numpy as np | |
from cd_regression import enet_f | |
def fsign(f): | |
if f == 0: | |
return 0 | |
elif f > 0: | |
return 1.0 | |
else: |