Quantco / Quantco/glum

Adding Group Lasso Penalization

Open
#925 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
386
Forks
36
Avg merge
23h 24m
Merged PRs (30d)
2

Description

Hi,

First of all, thank you for the great work on the GLUM package — it's nearly perfect for my needs!

I’m currently working on my master's thesis and was wondering if Group Lasso penalization is something planned for future development (related to #478)? This feature would be very helpful for my use case, and I’d love to know if it’s on your roadmap.

I’m planning to use GLUM for two main tasks:

  1. Standard GLM Regression
    My input dataframe X contains variables that are naturally grouped — for example, categorical variables. I’d like the regularization to treat these variables as groups, penalizing or selecting them as a whole, instead of selecting/deselecting individual categories within a single variable.

  2. Generalized Additive Model (GAM)-like Regression
    I’m introducing spline transformations to my numerical variables to capture non-linear relationships. Each variable is represented by a set of spline basis functions. Ideally, the penalty would apply to all splines for a variable as a group, to either select or drop the entire set together.

Note that P2 matrix allows me to smooth my splines, then no problem on this side as shown by this notebook.

Given this, I have two questions:

  • Is there a way to achieve this behavior with the current version of GLUM?

  • Or, would it be better for me to fork the code and adapt it to my specific needs?

Thanks again for this great tool — it's been very helpful in my research!

Best

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 by reviewing related issue #478 and the current GLUM penalization capabilities. Use the linked penalized-splines notebook to understand the stated spline use case; the work is complete only when grouped penalties can select or drop categorical groups and spline bases together.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.