scikit-learn / scikit-learn/scikit-learn

Add individual penalization to precision matrix in graphical_lasso.py

Open
#27,652 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Decision New Feature
Dominant language
Python
Stars
67.3k
Forks
27.4k
Avg merge
1d 15h
Merged PRs (30d)
58

Description

Describe the workflow you want to enable

Friedman et al. (2008) describe the coordinate descent procedure used for the graphical lasso.
In the paper, there is a REMARK 2.1, which states that the objective function to be optimized can be modified to allow for a matrix of penalty values, rather than a scalar value.

Describe your proposed solution

This has been implemented here.
However, linear_model._cd_fast.pyx still has to be updated to allow for vectorized alpha input in enet_coordinate_descent_gram

Describe alternatives you've considered, if relevant

No response

Additional context

This change is motivated to allow for prior incorporation into the inference procedure. When strong priors for edges are available, this can affect the strength of the corresponding edges' penalization.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with graphical_lasso.py and the referenced coordinate-descent procedure in Friedman et al. (2008), then inspect linear_model._cd_fast.pyx, especially enet_coordinate_descent_gram. Review the linked implementation for the proposed matrix penalty behavior. Done means supporting vectorized alpha input and individual penalization in the precision matrix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.