Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed group lasso w/ extra weights #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions commit/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ cdef class Evaluation :
Aty = np.asarray(At.dot(y))
return np.max(np.abs(Aty[start:start+size]) / w_coeff)

def compute_lambda_max_group(w_group, idx_group):
def compute_lambda_max_group(w_group, idx_group):
# Ref. Yuan, Lin - 'Model selection and estimation in regression with grouped variables'
At = self.A.T
y = self.get_y()
Expand Down Expand Up @@ -997,7 +997,7 @@ cdef class Evaluation :
# In case of 'group_lasso' or 'sparse_group_lasso' update the group indices and compute group weights
if regularisation['regIC'] == 'group_lasso' or regularisation['regIC'] == 'sparse_group_lasso':
if 'group_weights_extra' in dictIC_params:
weightsIC_group = dictIC_params['group_weights_extra']
weightsIC_group = dictIC_params['group_weights_extra'].copy()
else:
weightsIC_group = np.ones(dictIC_params['group_idx'].size, dtype=np.float64)
# update the group indices considering only the kept elements
Expand Down