ircv3-ideas icon indicating copy to clipboard operation
ircv3-ideas copied to clipboard

Server favicon of sorts

Open ValwareIRC opened this issue 1 year ago • 5 comments

Perhaps a nice idea for a server to provide a favicon for the client to display somewhere appropriate like the server window icon or cough like discord down the left hand side =]]] cough

ValwareIRC avatar May 23 '24 12:05 ValwareIRC

Welcome back @tomaszkacprzak ! $\epsilon$ is a vector, so I'm not sure how $1[\epsilon > 0]$ is to be interpreted, when multiplying $\Vert \epsilon \Vert^2$?

Is it not something like:

$L (\epsilon, \alpha) = 2 · \sum_i ( \alpha + (1 − 2\alpha) · 1[\epsilon_i > 0] ) \epsilon_i^2$

Can you give the implementation a try through a PR, like you did for positive group lasso ? Thanks a lot

mathurinm avatar Jul 29 '24 10:07 mathurinm

Also I believe it should be $1 / 2$ instead of $2$ to get ride of the coefficient that pops up after differentiation

$L (\epsilon, \alpha) = \frac{1}{2} \sum_i ( \alpha + (1 − 2\alpha) · 1[\epsilon_i > 0] ) \epsilon_i^2$

Badr-MOUFAD avatar Jul 29 '24 10:07 Badr-MOUFAD

Hi @mathurinm thank you for a fast reply. Indeed there was a mistake in my equation, the one you gave should be right. I can try a PR. I could start with a Quadratic and modify all the functions. Do you expect any difficulties for optimisation?

tomaszkacprzak avatar Jul 29 '24 11:07 tomaszkacprzak

Yes that sounds like a plan, and no I don't foresee any difficulty!

mathurinm avatar Jul 29 '24 14:07 mathurinm

@tomaszkacprzak could you also please let us know in which context you use skglm, and what it brings you compared to alternatives?

mathurinm avatar Jul 29 '24 15:07 mathurinm

Hi @tomaszkacprzak, any news on this?

mathurinm avatar Aug 27 '24 09:08 mathurinm

Hi @mathurinm i recently gone through your discussion approach is understandable. I can try a PR

Aishwarya0811 avatar Aug 12 '25 10:08 Aishwarya0811

Hi @mathurinm @tomaszkacprzak!

I've successfully implemented the DoubleQuadratic datafit as discussed.

Implementation highlights:

  • Asymmetric quadratic loss: L(ε,α) = (1/2n) * Σᵢ (2α + 2(1-2α) * 1[εᵢ>0]) * εᵢ²
  • When α=0.5, gives identical results to standard Quadratic (verified )
  • Support for both dense and sparse matrices
  • Full compatibility with existing penalties (L1, MCP, etc.)
  • Comprehensive test coverage

Verification:

  • α=0.5 matches Quadratic exactly (loss and gradient)
  • Integration with AndersonCD solver works
  • Asymmetric behavior confirmed for α≠0.5
  • All tests pass

I'll submit the PR shortly. Thanks for the clear mathematical specification!

Aishwarya0811 avatar Aug 12 '25 12:08 Aishwarya0811

Hi @mathurinm @Badr-MOUFAD @tomaszkacprzak 👋

Just wanted to follow up on this PR adding the DoubleQuadratic datafit discussed in issue #272.
The implementation is complete, all tests are green , and the behavior matches Quadratic when α=0.5 while supporting asymmetric loss otherwise.

Would you be able to take a look when you get a chance?
Happy to adjust anything if needed. Thanks a lot for your time and review 🙏

Aishwarya0811 avatar Aug 21 '25 21:08 Aishwarya0811