Skip to content

Commit

Permalink
Structured as package.
Browse files Browse the repository at this point in the history
  • Loading branch information
madrury committed Jun 15, 2014
1 parent 54ca103 commit 06d242e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from glmnet.elastic_net import ElasticNet
from glmnet.logistic_net import LogisticNet
4 changes: 2 additions & 2 deletions glmnet/example_elastic_net.py → example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from elastic_net import ElasticNet
from lognet import LogNet
from logistic_net import LogisticNet

display_bar = '-'*70

Expand Down Expand Up @@ -39,7 +39,7 @@
p = 1 /( 1 + np.exp(-np.dot(X, w)) )
y = np.float64(p > .5)

lnet = LogNet(alpha=.75)
lnet = LogisticNet(alpha=.75)
lnet.fit(X, y)

print lnet
Expand Down
2 changes: 2 additions & 0 deletions glmnet/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from elastic_net import ElasticNet
from logistic_net import LogisticNet
2 changes: 1 addition & 1 deletion glmnet/lognet.py → glmnet/logistic_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import _glmnet
from glmnet import GlmNet

class LogNet(GlmNet):
class LogisticNet(GlmNet):
'''The logistic net: a multivariate logistic model with both L1 and L2
regularizers.
Expand Down

0 comments on commit 06d242e

Please sign in to comment.