Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion glmnet_python/lognet.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def lognet(x, is_sparse, irs, pcs, y, weights, offset, parm,
raise ValueError('offset should have the same number of values as observations in binominal/multinomial call to glmnet')
if nc == 1:
if do[1] == 1:
offset = scipy.column_stack((offset, -offset), 1)
offset = scipy.column_stack((offset, -offset))
if do[1] > 2:
raise ValueError('offset should have 1 or 2 columns in binomial call to glmnet')
if (family == 'multinomial') and (do[1] != nc):
Expand Down